Also integration test the status and mode fields

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2022-11-25 11:59:25 +01:00
parent 266dcb1e59
commit 896ed51ec1
No known key found for this signature in database
GPG key ID: 74434EFE0D2E2205
4 changed files with 29 additions and 16 deletions

View file

@ -47,7 +47,7 @@
| `participantType` | int | v1 | | Permissions level of the current user |
| `attendeeId` | int | v3 | | Unique attendee id |
| `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` |
| `actorType` | string | v3 | | Actor type of the current user (see [constants list](constants.md#attendee-types)) |
| `actorId` | string | v3 | | The unique identifier for the given actor type |
| `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)) |
@ -83,6 +83,8 @@
| `lastMessage` | message | v1 | | Last message in a conversation if available, otherwise empty. **Note:** Even when given the message will not contain the `parent` or `reactionsSelf` attribute due to performance reasons |
| `objectType` | string | v1 | | The type of object that the conversation is associated with; "share:password" if the conversation is used to request a password for a share, otherwise empty |
| `objectId` | string | v1 | | Share token if "objectType" is "share:password", otherwise empty |
| `breakoutRoomMode` | string | v4 | | Breakout room configuration mode (see [constants list](constants.md#breakout-room-modes)) (only available with `breakout-rooms-v1` capability) |
| `breakoutRoomStatus` | string | v4 | | Breakout room status (see [constants list](constants.md#breakout-room-status)) (only available with `breakout-rooms-v1` capability) |
| `status` | string | v4 | | Optional: Only available for one-to-one conversations and when `includeStatus=true` is set |
| `statusIcon` | string | v4 | | Optional: Only available for one-to-one conversations and when `includeStatus=true` is set |
| `statusMessage` | string | v4 | | Optional: Only available for one-to-one conversations and when `includeStatus=true` is set |

View file

@ -41,6 +41,7 @@ use OCA\Talk\GuestManager;
use OCA\Talk\Manager;
use OCA\Talk\MatterbridgeManager;
use OCA\Talk\Model\Attendee;
use OCA\Talk\Model\BreakoutRoom;
use OCA\Talk\Model\Session;
use OCA\Talk\Participant;
use OCA\Talk\Room;
@ -418,6 +419,8 @@ class RoomController extends AEnvironmentAwareController {
'callFlag' => Participant::FLAG_DISCONNECTED,
'messageExpiration' => 0,
'avatarUrl' => $this->avatarService->getAvatarUrl($room),
'breakoutRoomMode' => BreakoutRoom::MODE_NOT_CONFIGURED,
'breakoutRoomStatus' => BreakoutRoom::STATUS_STOPPED,
];
$lastActivity = $room->getLastActivity();
@ -486,6 +489,8 @@ class RoomController extends AEnvironmentAwareController {
'description' => $room->getDescription(),
'listable' => $room->getListable(),
'messageExpiration' => $room->getMessageExpiration(),
'breakoutRoomMode' => $room->getBreakoutRoomMode(),
'breakoutRoomStatus' => $room->getBreakoutRoomStatus(),
]);
if ($currentParticipant->getAttendee()->getReadPrivacy() === Participant::PRIVACY_PUBLIC) {

View file

@ -346,6 +346,12 @@ class FeatureContext implements Context, SnippetAcceptingContext {
if (isset($expectedRoom['lobbyState'])) {
$data['lobbyState'] = (int) $room['lobbyState'];
}
if (isset($expectedRoom['breakoutRoomMode'])) {
$data['breakoutRoomMode'] = (int) $room['breakoutRoomMode'];
}
if (isset($expectedRoom['breakoutRoomStatus'])) {
$data['breakoutRoomStatus'] = (int) $room['breakoutRoomStatus'];
}
if (isset($expectedRoom['attendeePin'])) {
$data['attendeePin'] = $room['attendeePin'] ? '**PIN**' : '';
}

View file

@ -256,11 +256,11 @@ Feature: conversation/breakout-rooms
| users | participant1 | 1 |
When user "participant1" creates 3 manual breakout rooms for "class room" with 200 (v1)
And user "participant1" is participant of the following rooms (v4)
| type | name | lobbyState |
| 3 | class room | 0 |
| 3 | Room 1 | 1 |
| 3 | Room 2 | 1 |
| 3 | Room 3 | 1 |
| type | name | lobbyState | breakoutRoomMode | breakoutRoomStatus |
| 3 | class room | 0 | 2 | 0 |
| 3 | Room 1 | 1 | 0 | 0 |
| 3 | Room 2 | 1 | 0 | 0 |
| 3 | Room 3 | 1 | 0 | 0 |
Then user "participant1" sees the following system messages in room "Room 1" with 200
| room | actorType | actorId | actorDisplayName | systemMessage |
| Room 1 | users | participant1 | participant1-displayname | conversation_created |
@ -272,11 +272,11 @@ Feature: conversation/breakout-rooms
| Room 3 | users | participant1 | participant1-displayname | conversation_created |
And user "participant1" starts breakout rooms in room "class room" with 200 (v1)
And user "participant1" is participant of the following rooms (v4)
| type | name | lobbyState |
| 3 | class room | 0 |
| 3 | Room 1 | 0 |
| 3 | Room 2 | 0 |
| 3 | Room 3 | 0 |
| type | name | lobbyState | breakoutRoomMode | breakoutRoomStatus |
| 3 | class room | 0 | 2 | 1 |
| 3 | Room 1 | 0 | 0 | 0 |
| 3 | Room 2 | 0 | 0 | 0 |
| 3 | Room 3 | 0 | 0 | 0 |
Then user "participant1" sees the following system messages in room "Room 1" with 200
| room | actorType | actorId | actorDisplayName | systemMessage |
| Room 1 | users | participant1 | participant1-displayname | breakout_rooms_started |
@ -291,11 +291,11 @@ Feature: conversation/breakout-rooms
| Room 3 | users | participant1 | participant1-displayname | conversation_created |
And user "participant1" stops breakout rooms in room "class room" with 200 (v1)
And user "participant1" is participant of the following rooms (v4)
| type | name | lobbyState |
| 3 | class room | 0 |
| 3 | Room 1 | 1 |
| 3 | Room 2 | 1 |
| 3 | Room 3 | 1 |
| type | name | lobbyState | breakoutRoomMode | breakoutRoomStatus |
| 3 | class room | 0 | 2 | 0 |
| 3 | Room 1 | 1 | 0 | 0 |
| 3 | Room 2 | 1 | 0 | 0 |
| 3 | Room 3 | 1 | 0 | 0 |
Then user "participant1" sees the following system messages in room "Room 1" with 200
| room | actorType | actorId | actorDisplayName | systemMessage |
| Room 1 | users | participant1 | participant1-displayname | breakout_rooms_stopped |