Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable30] fix(federation): No notification for call summary and other system me… #12985

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/Notification/FederationChatNotifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions tests/integration/features/federation/call.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading