summary refs log tree commit diff
path: root/src/ChatPage.cpp
diff options
context:
space:
mode:
authorDeepBlueV7.X <nicolas.werner@hotmail.de>2021-02-13 23:19:26 +0100
committerGitHub <noreply@github.com>2021-02-13 23:19:26 +0100
commitca237f36b9dfda054175aa1cbcba7e851e19f16e (patch)
tree7314588cb6701ef23ee1668e4390699a3737fcae /src/ChatPage.cpp
parentMark messages as read, when Nheko gets focused (diff)
parentInclude notifications header instead of responses header (diff)
downloadnheko-ca237f36b9dfda054175aa1cbcba7e851e19f16e.tar.xz
Merge pull request #471 from LorenDB/emoteNotif
Display notifications for emote messages properly
Diffstat (limited to 'src/ChatPage.cpp')
-rw-r--r--src/ChatPage.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/ChatPage.cpp b/src/ChatPage.cpp

index 6d67e6f2..45802789 100644 --- a/src/ChatPage.cpp +++ b/src/ChatPage.cpp
@@ -668,8 +668,6 @@ ChatPage::sendNotifications(const mtx::responses::Notifications &res) if (!cache::isNotificationSent(event_id)) { const auto room_id = QString::fromStdString(item.room_id); - const auto user_id = - QString::fromStdString(mtx::accessors::sender(item.event)); // We should only sent one notification per event. cache::markSentNotification(event_id); @@ -689,15 +687,9 @@ ChatPage::sendNotifications(const mtx::responses::Notifications &res) QString::fromStdString(info.avatar_url), 96, this, - [this, room_id, event_id, item, user_id, info]( - QPixmap image) { + [this, item](QPixmap image) { notificationsManager.postNotification( - room_id, - QString::fromStdString(event_id), - QString::fromStdString(info.name), - cache::displayName(room_id, user_id), - utils::event_body(item.event), - image.toImage()); + item, image.toImage()); }); } }