From 114fa0868a6fc4ed2762bccde5181d8be5559e4f Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Wed, 28 Dec 2022 21:43:43 +0100 Subject: Skip notifying for your own messages --- src/timeline/TimelineModel.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/timeline') 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> relatedEvents; -- cgit 1.5.1