mirror of
https://github.com/nextcloud/spreed.git
synced 2025-08-16 15:27:59 +00:00
fix(emails): Use dedicated key in API response
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
@ -1082,11 +1082,8 @@ class RoomController extends AEnvironmentAwareController {
|
||||
$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) {
|
||||
|
@ -173,6 +173,7 @@ namespace OCA\Talk;
|
||||
*
|
||||
* @psalm-type TalkParticipant = array{
|
||||
* actorId: string,
|
||||
* invitedActorId?: string,
|
||||
* actorType: string,
|
||||
* attendeeId: int,
|
||||
* attendeePermissions: int,
|
||||
@ -227,6 +228,7 @@ namespace OCA\Talk;
|
||||
*
|
||||
* @psalm-type TalkRoom = array{
|
||||
* actorId: string,
|
||||
* invitedActorId?: string,
|
||||
* actorType: string,
|
||||
* attendeeId: int,
|
||||
* attendeePermissions: int,
|
||||
|
@ -336,6 +336,9 @@ class RoomFormatter {
|
||||
$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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user