File tree Expand file tree Collapse file tree 3 files changed +14
-0
lines changed
Expand file tree Collapse file tree 3 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ class Activity
157157 * @return
158158 */
159159
160+ bool _shouldNotify = true ;
160161
161162 [[nodiscard]] Identifier ident () const ;
162163};
Original file line number Diff line number Diff line change @@ -105,6 +105,10 @@ void ServerNotificationHandler::slotNotificationsReceived(const QJsonDocument &j
105105 }
106106 }
107107
108+ if (json.contains (" shouldNotify" )) {
109+ a._shouldNotify = json.value (" shouldNotify" ).toBool (true );
110+ }
111+
108112 // 2 cases to consider:
109113 // 1. server == 24 & has Talk: object_type is chat/call/room & object_id contains conversationToken/messageId
110114 // 2. server < 24 & has Talk: object_type is chat/call/room & object_id contains _only_ conversationToken
Original file line number Diff line number Diff line change @@ -193,6 +193,10 @@ void User::slotBuildNotificationDisplay(const ActivityList &list)
193193 qCInfo (lcActivity) << " Activity already notified, skip" ;
194194 return false ;
195195 }
196+ if (!activity._shouldNotify ) {
197+ qCDebug (lcActivity) << " Activity should not be notified" ;
198+ return false ;
199+ }
196200
197201 return true ;
198202 });
@@ -226,6 +230,11 @@ void User::slotBuildIncomingCallDialogs(const ActivityList &list)
226230
227231 if (systray) {
228232 for (const auto &activity : list) {
233+ if (!activity._shouldNotify ) {
234+ qCDebug (lcActivity) << " Activity should not be notified" ;
235+ continue ;
236+ }
237+
229238 systray->createCallDialog (activity, _account);
230239 }
231240 }
You can’t perform that action at this time.
0 commit comments