Compare the correct permissions for the icons

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2021-10-22 09:47:10 +02:00
Родитель 7db93bf124
Коммит 40caf33109
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 7076EA9751AACDDA
4 изменённых файлов: 18 добавлений и 7 удалений

Просмотреть файл

@ -43,7 +43,10 @@
`attendeePin` | string | v3 | | Unique dial-in authentication code for this user, when the conversation has SIP enabled (see `sipEnabled` attribute)
`actorType` | string | v3 | | Currently known `users|guests|emails|groups|circles`
`actorId` | string | v3 | | The unique identifier for the given actor type
`permissions` | int | v4 | | Publishing permissions for the current participant (see [constants list](constants.md#attendee-permissions))
`permissions` | int | v4 | | Combined final permissions for the current participant, permissions are picked in order of attendee then call then default and the first which is `Custom` will apply (see [constants list](constants.md#attendee-permissions))
`attendeePermissions` | int | v4 | | Dedicated permissions for the current participant, if not `Custom` this are not the resulting permissions (see [constants list](constants.md#attendee-permissions))
`callPermissions` | int | v4 | | Call permissions, if not `Custom` this are not the resulting permissions, if set they will reset after the end of the call (see [constants list](constants.md#attendee-permissions))
`defaultPermissions` | int | v4 | | Default permissions for new participants (see [constants list](constants.md#attendee-permissions))
`participantInCall` | bool | v1 | v2 | **Removed:** use `participantFlags` instead
`participantFlags` | int | v1 | | "In call" flags of the user's session making the request (only available with `in-call-flags` capability)
`readOnly` | int | v1 | | Read-only state for the current user (only available with `read-only-rooms` capability)

Просмотреть файл

@ -34,7 +34,8 @@
`participantType` | int | v1 | | Permissions level of the participant (see [constants list](constants.md#participant-types))
`lastPing` | int | v1 | | Timestamp of the last ping of the user (should be used for sorting)
`inCall` | int | v1 | | Call flags the user joined with (see [constants list](constants.md#participant-in-call-flag))
`permissions` | int | v4 | | Publishing permissions for the participant (see [constants list](constants.md#attendee-permissions))
`permissions` | int | v4 | | Combined final permissions for the participant, permissions are picked in order of attendee then call then default and the first which is `Custom` will apply (see [constants list](constants.md#attendee-permissions))
`attendeePermissions` | int | v4 | | Dedicated permissions for the current participant, if not `Custom` this are not the resulting permissions (see [constants list](constants.md#attendee-permissions))
`sessionId` | string | v1 | v4 | `'0'` if not connected, otherwise a 512 character long string
`sessionIds` | array | v4 | | array of session ids, each are 512 character long strings, or empty if no session
`status` | string | v2 | | Optional: Only available with `includeStatus=true`, for users with a set status and when there are less than 100 participants in the conversation

Просмотреть файл

@ -407,6 +407,9 @@ class RoomController extends AEnvironmentAwareController {
'actorId' => '',
'attendeeId' => 0,
'permissions' => Attendee::PERMISSIONS_CUSTOM,
'attendeePermissions' => Attendee::PERMISSIONS_CUSTOM,
'callPermissions' => Attendee::PERMISSIONS_CUSTOM,
'defaultPermissions' => Attendee::PERMISSIONS_CUSTOM,
'canEnableSIP' => false,
'attendeePin' => '',
'description' => '',
@ -473,6 +476,9 @@ class RoomController extends AEnvironmentAwareController {
'actorId' => $attendee->getActorId(),
'attendeeId' => $attendee->getId(),
'permissions' => $currentParticipant->getPermissions(),
'attendeePermissions' => $attendee->getPermissions(),
'callPermissions' => $room->getCallPermissions(),
'defaultPermissions' => $room->getDefaultPermissions(),
'description' => $room->getDescription(),
'listable' => $room->getListable(),
]);
@ -957,6 +963,7 @@ class RoomController extends AEnvironmentAwareController {
'actorType' => $participant->getAttendee()->getActorType(),
'displayName' => $participant->getAttendee()->getActorId(),
'permissions' => $participant->getPermissions(),
'attendeePermissions' => $participant->getAttendee()->getPermissions(),
'attendeePin' => '',
];
if ($this->talkConfig->isSIPConfigured()

Просмотреть файл

@ -579,16 +579,16 @@ export default {
return undefined
},
participantPermissions() {
return this.participant.permissions
attendeePermissions() {
return this.participant.attendeePermissions
},
actionIcon() {
if (this.participantPermissions === (PARTICIPANT.PERMISSIONS.MAX_CUSTOM)) {
if (this.attendeePermissions === PARTICIPANT.PERMISSIONS.MAX_CUSTOM) {
return 'LockOpenVariant'
} else if (this.participantPermissions === PARTICIPANT.PERMISSIONS.CUSTOM) {
} else if (this.attendeePermissions === PARTICIPANT.PERMISSIONS.CUSTOM) {
return 'Lock'
} else if (this.participantPermissions !== this.conversation.permissions) {
} else if (this.attendeePermissions !== PARTICIPANT.PERMISSIONS.DEFAULT) {
return 'Tune'
}
return ''