summary refs log tree commit diff
path: root/src/Cache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Cache.cpp')
-rw-r--r--src/Cache.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/Cache.cpp b/src/Cache.cpp

index 016ba371..8cfc4b55 100644 --- a/src/Cache.cpp +++ b/src/Cache.cpp
@@ -960,9 +960,15 @@ Cache::saveState(const mtx::responses::Sync &res) for (const auto &room : res.rooms.join) { if (!room.second.ephemeral.receipts.empty()) { std::vector<QString> receipts; - for (const auto &receipt : room.second.ephemeral.receipts) - if (receipt.first != user_id) - receipts.push_back(QString::fromStdString(receipt.first)); + for (const auto &receipt : room.second.ephemeral.receipts) { + for (const auto &receiptUsersTs : receipt.second) { + if (receiptUsersTs.first != user_id) { + receipts.push_back( + QString::fromStdString(receipt.first)); + break; + } + } + } if (!receipts.empty()) emit newReadReceipts(QString::fromStdString(room.first), receipts); }