Fix notifications showing up repeatedly when multiple logged-in accounts are in the same room

What happens is roughly: The notification is received in one account and marked as received locally.
In the other account, the event is marked as "read" in the json, which makes us delete it from the
received messages. Then it is received on the first account...
This commit is contained in:
Tobias Fella
2023-05-15 21:26:29 +02:00
parent c63f1f0452
commit fa8164cdba

View File

@@ -144,7 +144,6 @@ void Controller::handleNotifications(QPointer<Quotient::Connection> connection)
for (const auto &n : notifications) {
const auto notification = n.toObject();
if (notification["read"].toBool()) {
oldNotifications.removeOne(notification["event"].toObject()["event_id"].toString());
continue;
}
if (oldNotifications.contains(notification["event"].toObject()["event_id"].toString())) {