Skip to content

Commit

Permalink
Fix federated user handling in chat
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Oct 10, 2023
1 parent ef03ac4 commit 9698f4b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lib/Chat/MessageParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ protected function setActor(Message $message): void {
$displayName = $botName . ' (Bot)';
}
}
} elseif ($comment->getActorType() === Attendee::ACTOR_FEDERATED_USERS) {
// FIXME Read from some addressbooks?
$displayName = $actorId;
}

$message->setActor(
Expand Down
5 changes: 4 additions & 1 deletion lib/Controller/ChatController.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ public function __construct(
}

protected function getActorInfo(string $actorDisplayName = ''): array {
if ($this->userId === null) {
if ($this->getRemoteAccessCloudId()) {
$actorType = Attendee::ACTOR_FEDERATED_USERS;
$actorId = $this->getRemoteAccessCloudId();
} elseif ($this->userId === null) {
$actorType = Attendee::ACTOR_GUESTS;
$actorId = $this->participant->getAttendee()->getActorId();

Expand Down

0 comments on commit 9698f4b

Please sign in to comment.