diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-12-28 21:43:43 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-12-28 21:57:57 +0100 |
commit | 114fa0868a6fc4ed2762bccde5181d8be5559e4f (patch) | |
tree | dcf3d3d2fc6942644e070abba58075963d52b0b2 /src/timeline | |
parent | Added translation using Weblate (Ukrainian) (diff) | |
download | nheko-114fa0868a6fc4ed2762bccde5181d8be5559e4f.tar.xz |
Skip notifying for your own messages
Diffstat (limited to 'src/timeline')
-rw-r--r-- | src/timeline/TimelineModel.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index 46f8e57c..b9725ecc 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -747,6 +747,11 @@ TimelineModel::data(const mtx::events::collections::TimelineEvents &event, int r case Notificationlevel: { const auto &push = ChatPage::instance()->pushruleEvaluator(); if (push) { + // skip our messages + auto sender = mtx::accessors::sender(event); + if (sender == http::client()->user_id().to_string()) + return qml_mtx_events::NotificationLevel::Nothing; + const auto &id = event_id(event); std::vector<std::pair<mtx::common::Relation, mtx::events::collections::TimelineEvent>> relatedEvents; |