mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-11 11:47:09 +02:00
fix: create a copy of selected TTL messages
This commit is contained in:
parent
4bce9d440e
commit
ce8650b4de
1 changed files with 3 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue