Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions lib/Federation/CloudFederationProviderTalk.php
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ private function roomModified(int $remoteAttendeeId, array $notification): array
} elseif ($notification['changedProperty'] === ARoomModifiedEvent::PROPERTY_AVATAR) {
$this->roomService->setAvatar($room, $notification['newValue']);
} elseif ($notification['changedProperty'] === ARoomModifiedEvent::PROPERTY_CALL_RECORDING) {
/** @psalm-suppress InvalidArgument */
$this->roomService->setCallRecording($room, $notification['newValue']);
} elseif ($notification['changedProperty'] === ARoomModifiedEvent::PROPERTY_DEFAULT_PERMISSIONS) {
$this->roomService->setDefaultPermissions($room, $notification['newValue']);
Expand Down
4 changes: 2 additions & 2 deletions lib/ResponseDefinitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
* breakoutRoomStatus: int,
* callFlag: int,
* callPermissions: int,
* callRecording: int,
* callRecording: 0|1|2|3|4|5,
* callStartTime: int,
* canDeleteConversation: bool,
* canEnableSIP: bool,
Expand All @@ -256,7 +256,7 @@
* listable: int,
* lobbyState: int,
* lobbyTimer: int,
* mentionPermissions: int,
* mentionPermissions: 0|1,
* messageExpiration: int,
* name: string,
* notificationCalls: int,
Expand Down
16 changes: 15 additions & 1 deletion lib/Room.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,11 @@ class Room {
protected ?Participant $participant = null;

/**
* @psalm-param Room::TYPE_* $type
* @psalm-param self::TYPE_* $type
* @psalm-param RecordingService::CONSENT_REQUIRED_* $recordingConsent
* @psalm-param int-mask-of<self::HAS_FEDERATION_*> $hasFederation
* @psalm-param self::RECORDING_* $callRecording
* @psalm-param self::MENTION_PERMISSIONS_* $mentionPermissions
*/
public function __construct(
private Manager $manager,
Expand Down Expand Up @@ -529,10 +531,16 @@ public function setBreakoutRoomStatus(int $status): void {
$this->breakoutRoomStatus = $status;
}

/**
* @psalm-return self::RECORDING_*
*/
public function getCallRecording(): int {
return $this->callRecording;
}

/**
* @psalm-param self::RECORDING_* $callRecording
*/
public function setCallRecording(int $callRecording): void {
$this->callRecording = $callRecording;
}
Expand Down Expand Up @@ -567,10 +575,16 @@ public function setFederatedParticipants(int $hasFederation): void {
$this->hasFederation = $hasFederation;
}

/**
* @psalm-return self::MENTION_PERMISSIONS_*
*/
public function getMentionPermissions(): int {
return $this->mentionPermissions;
}

/**
* @psalm-param self::MENTION_PERMISSIONS_* $mentionPermissions
*/
public function setMentionPermissions(int $mentionPermissions): void {
$this->mentionPermissions = $mentionPermissions;
}
Expand Down
3 changes: 3 additions & 0 deletions lib/Service/RecordingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ public function __construct(
) {
}

/**
* @psalm-param Room::RECORDING_* $status
*/
public function start(Room $room, int $status, string $owner, Participant $participant): void {
$availableRecordingTypes = [Room::RECORDING_VIDEO, Room::RECORDING_AUDIO];
if (!in_array($status, $availableRecordingTypes, true)) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Service/RoomService.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ public function setAvatar(Room $room, string $avatar): void {

/**
* @param Room $room
* @param integer $status 0 none|1 video|2 audio
* @psalm-param Room::RECORDING_* $status
* @param Participant|null $participant the Participant that changed the
* state, null for the current user
* @throws CallRecordingException
Expand Down
16 changes: 14 additions & 2 deletions openapi-backend-sipbridge.json
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,15 @@
},
"callRecording": {
"type": "integer",
"format": "int64"
"format": "int64",
"enum": [
0,
1,
2,
3,
4,
5
]
},
"callStartTime": {
"type": "integer",
Expand Down Expand Up @@ -710,7 +718,11 @@
},
"mentionPermissions": {
"type": "integer",
"format": "int64"
"format": "int64",
"enum": [
0,
1
]
},
"messageExpiration": {
"type": "integer",
Expand Down
16 changes: 14 additions & 2 deletions openapi-federation.json
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,15 @@
},
"callRecording": {
"type": "integer",
"format": "int64"
"format": "int64",
"enum": [
0,
1,
2,
3,
4,
5
]
},
"callStartTime": {
"type": "integer",
Expand Down Expand Up @@ -764,7 +772,11 @@
},
"mentionPermissions": {
"type": "integer",
"format": "int64"
"format": "int64",
"enum": [
0,
1
]
},
"messageExpiration": {
"type": "integer",
Expand Down
16 changes: 14 additions & 2 deletions openapi-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -1246,7 +1246,15 @@
},
"callRecording": {
"type": "integer",
"format": "int64"
"format": "int64",
"enum": [
0,
1,
2,
3,
4,
5
]
},
"callStartTime": {
"type": "integer",
Expand Down Expand Up @@ -1323,7 +1331,11 @@
},
"mentionPermissions": {
"type": "integer",
"format": "int64"
"format": "int64",
"enum": [
0,
1
]
},
"messageExpiration": {
"type": "integer",
Expand Down
16 changes: 14 additions & 2 deletions openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,15 @@
},
"callRecording": {
"type": "integer",
"format": "int64"
"format": "int64",
"enum": [
0,
1,
2,
3,
4,
5
]
},
"callStartTime": {
"type": "integer",
Expand Down Expand Up @@ -1228,7 +1236,11 @@
},
"mentionPermissions": {
"type": "integer",
"format": "int64"
"format": "int64",
"enum": [
0,
1
]
},
"messageExpiration": {
"type": "integer",
Expand Down
14 changes: 10 additions & 4 deletions src/types/openapi/openapi-backend-sipbridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,11 @@ export type components = {
callFlag: number;
/** Format: int64 */
callPermissions: number;
/** Format: int64 */
callRecording: number;
/**
* Format: int64
* @enum {integer}
*/
callRecording: 0 | 1 | 2 | 3 | 4 | 5;
/** Format: int64 */
callStartTime: number;
canDeleteConversation: boolean;
Expand Down Expand Up @@ -308,8 +311,11 @@ export type components = {
lobbyState: number;
/** Format: int64 */
lobbyTimer: number;
/** Format: int64 */
mentionPermissions: number;
/**
* Format: int64
* @enum {integer}
*/
mentionPermissions: 0 | 1;
/** Format: int64 */
messageExpiration: number;
name: string;
Expand Down
14 changes: 10 additions & 4 deletions src/types/openapi/openapi-federation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,11 @@ export type components = {
callFlag: number;
/** Format: int64 */
callPermissions: number;
/** Format: int64 */
callRecording: number;
/**
* Format: int64
* @enum {integer}
*/
callRecording: 0 | 1 | 2 | 3 | 4 | 5;
/** Format: int64 */
callStartTime: number;
canDeleteConversation: boolean;
Expand Down Expand Up @@ -355,8 +358,11 @@ export type components = {
lobbyState: number;
/** Format: int64 */
lobbyTimer: number;
/** Format: int64 */
mentionPermissions: number;
/**
* Format: int64
* @enum {integer}
*/
mentionPermissions: 0 | 1;
/** Format: int64 */
messageExpiration: number;
name: string;
Expand Down
14 changes: 10 additions & 4 deletions src/types/openapi/openapi-full.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2294,8 +2294,11 @@ export type components = {
callFlag: number;
/** Format: int64 */
callPermissions: number;
/** Format: int64 */
callRecording: number;
/**
* Format: int64
* @enum {integer}
*/
callRecording: 0 | 1 | 2 | 3 | 4 | 5;
/** Format: int64 */
callStartTime: number;
canDeleteConversation: boolean;
Expand Down Expand Up @@ -2327,8 +2330,11 @@ export type components = {
lobbyState: number;
/** Format: int64 */
lobbyTimer: number;
/** Format: int64 */
mentionPermissions: number;
/**
* Format: int64
* @enum {integer}
*/
mentionPermissions: 0 | 1;
/** Format: int64 */
messageExpiration: number;
name: string;
Expand Down
14 changes: 10 additions & 4 deletions src/types/openapi/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1778,8 +1778,11 @@ export type components = {
callFlag: number;
/** Format: int64 */
callPermissions: number;
/** Format: int64 */
callRecording: number;
/**
* Format: int64
* @enum {integer}
*/
callRecording: 0 | 1 | 2 | 3 | 4 | 5;
/** Format: int64 */
callStartTime: number;
canDeleteConversation: boolean;
Expand Down Expand Up @@ -1811,8 +1814,11 @@ export type components = {
lobbyState: number;
/** Format: int64 */
lobbyTimer: number;
/** Format: int64 */
mentionPermissions: number;
/**
* Format: int64
* @enum {integer}
*/
mentionPermissions: 0 | 1;
/** Format: int64 */
messageExpiration: number;
name: string;
Expand Down
Loading