Browse Source

Merge pull request #11758 from nextcloud/bugfix/noid/fix-room-avatar-for-at-all

fix(federation): Fix conversation avatar for `@all`
pull/11719/head
Joas Schilling 2 years ago
committed by GitHub
parent
commit
6bb9b46242
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 5
      lib/Federation/Proxy/TalkV1/UserConverter.php
  2. 2
      lib/Notification/FederationChatNotifier.php

5
lib/Federation/Proxy/TalkV1/UserConverter.php

@ -29,6 +29,7 @@ namespace OCA\Talk\Federation\Proxy\TalkV1;
use OCA\Talk\Model\Attendee;
use OCA\Talk\ResponseDefinitions;
use OCA\Talk\Room;
use OCA\Talk\Service\AvatarService;
use OCA\Talk\Service\ParticipantService;
/**
@ -42,6 +43,7 @@ class UserConverter {
public function __construct(
protected ParticipantService $participantService,
protected AvatarService $avatarService,
) {
}
@ -105,6 +107,9 @@ class UserConverter {
$parameter['name'] = $localParticipants[$cloudId]['displayName'];
}
}
} elseif ($parameter['type'] === 'call' && $parameter['id'] === $room->getRemoteToken()) {
$parameter['id'] = $room->getToken();
$parameter['icon-url'] = $this->avatarService->getAvatarUrl($room);
}
return $parameter;
}

2
lib/Notification/FederationChatNotifier.php

@ -109,7 +109,7 @@ class FederationChatNotifier {
protected function isMentionedAll(Room $room, ProxyCacheMessage $message): bool {
foreach ($message->getParsedMessageParameters() as $parameter) {
if ($parameter['type'] === 'call' // RichObjectDefinition
&& $parameter['id'] === $room->getRemoteToken()) {
&& $parameter['id'] === $room->getToken()) {
return true;
}
}

Loading…
Cancel
Save