diff --git a/lib/Notification/FederationChatNotifier.php b/lib/Notification/FederationChatNotifier.php index ca163808c27..1660efc2eed 100644 --- a/lib/Notification/FederationChatNotifier.php +++ b/lib/Notification/FederationChatNotifier.php @@ -32,6 +32,10 @@ public function __construct( * @param array{remoteServerUrl: string, sharedSecret: string, remoteToken: string, messageData: array{remoteMessageId: int, actorType: string, actorId: string, actorDisplayName: string, messageType: string, systemMessage: string, expirationDatetime: string, message: string, messageParameter: string, creationDatetime: string, metaData: string}, unreadInfo: array{unreadMessages: int, unreadMention: bool, unreadMentionDirect: bool, lastReadMessage: int}} $inboundNotification */ public function handleChatMessage(Room $room, Participant $participant, ProxyCacheMessage $message, array $inboundNotification): void { + if (!empty($inboundNotification['messageData']['systemMessage'])) { + return; + } + if ($participant->getAttendee()->getActorType() === $inboundNotification['messageData']['actorType'] && $participant->getAttendee()->getActorId() === $inboundNotification['messageData']['actorId']) { return; diff --git a/tests/integration/features/federation/call.feature b/tests/integration/features/federation/call.feature index 4a4429db95d..420dfa832fe 100644 --- a/tests/integration/features/federation/call.feature +++ b/tests/integration/features/federation/call.feature @@ -202,6 +202,12 @@ Feature: federation/call And user "participant2" has the following notifications | app | object_type | object_id | subject | | spreed | call | LOCAL::room | A group call has started in room | + And user "participant2" joins room "LOCAL::room" with 200 (v4) + When user "participant2" joins call "LOCAL::room" with 200 (v4) + And using server "LOCAL" + When user "participant1" ends call "room" with 200 (v4) + Then using server "REMOTE" + And user "participant2" has the following notifications Scenario: normal call notification for federated user is cleared when joining Given user "participant1" creates room "room" (v4)