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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
6 additions and
1 deletions
-
lib/Federation/Proxy/TalkV1/UserConverter.php
-
lib/Notification/FederationChatNotifier.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; |
|
|
|
} |
|
|
|
|
|
|
|
@ -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; |
|
|
|
} |
|
|
|
} |
|
|
|
|