mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
fix: create a copy of selected TTL messages
This commit is contained in:
@@ -2573,7 +2573,9 @@ void Session::checkTTLs() {
|
||||
}) | ranges::views::transform([](const auto &pair) {
|
||||
return pair.second;
|
||||
}) | ranges::views::join;
|
||||
for (auto &item : toBeRemoved) {
|
||||
|
||||
auto itemsToProcess = toBeRemoved | ranges::to_vector;
|
||||
for (const auto &item : itemsToProcess) {
|
||||
// remove message from `_ttlMessages` to avoid calling this method infinitely
|
||||
item->applyTTL(0);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user