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] feat(email): Recognize guests invited via email #13617

Merged
merged 14 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix(emails): Use dedicated key in API response
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen authored and backportbot[bot] committed Oct 23, 2024
commit 4de1a98f9b8f280f62d6b59898a0a07bf0274fb2
7 changes: 2 additions & 5 deletions lib/Controller/RoomController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1082,11 +1082,8 @@ protected function formatParticipantList(array $participants, bool $includeStatu
$this->participantService->leaveRoomAsSession($this->room, $participant);
}
$result['displayName'] = $participant->getAttendee()->getDisplayName();
if ($this->participant->hasModeratorPermissions()) {
$result['status'] = IUserStatus::OFFLINE;
$result['statusIcon'] = null;
$result['statusMessage'] = $participant->getAttendee()->getInvitedCloudId();
$result['statusClearAt'] = null;
if ($this->participant->hasModeratorPermissions() || $this->participant->getAttendee()->getId() === $participant->getAttendee()->getId()) {
$result['invitedActorId'] = $participant->getAttendee()->getInvitedCloudId();
}
} elseif ($participant->getAttendee()->getActorType() === Attendee::ACTOR_FEDERATED_USERS) {
if ($participant->getSession() instanceof Session && $participant->getSession()->getLastPing() <= $maxPingAge) {
Expand Down
2 changes: 2 additions & 0 deletions lib/ResponseDefinitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
*
* @psalm-type TalkParticipant = array{
* actorId: string,
* invitedActorId?: string,
* actorType: string,
* attendeeId: int,
* attendeePermissions: int,
Expand Down Expand Up @@ -227,6 +228,7 @@
*
* @psalm-type TalkRoom = array{
* actorId: string,
* invitedActorId?: string,
* actorType: string,
* attendeeId: int,
* attendeePermissions: int,
Expand Down
3 changes: 3 additions & 0 deletions lib/Service/RoomFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ public function formatRoomV4(
$roomData['unreadMention'] = $lastMention !== 0 && $lastReadMessage < $lastMention;
$roomData['unreadMentionDirect'] = $lastMentionDirect !== 0 && $lastReadMessage < $lastMentionDirect;
} else {
if ($attendee->getActorType() === Attendee::ACTOR_EMAILS) {
$roomData['invitedActorId'] = $attendee->getInvitedCloudId();
}
$roomData['lastReadMessage'] = $attendee->getLastReadMessage();
}

Expand Down