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

👥 Multiple sessions 👥 #5194

Merged
merged 41 commits into from
Mar 9, 2021
Merged
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
6d9c838
Replace the former unique attendee key with a normal index
nickvergessen Feb 17, 2021
4031c18
Prepare selecting the correct session in case there are multiple
nickvergessen Feb 17, 2021
1caca56
Don't load session on getRoomsForUser when not needed
nickvergessen Feb 18, 2021
0e20ca5
Don't load the session by default on getParticipantsForRoom
nickvergessen Feb 18, 2021
c97f55e
Group multiple sessions of the same attendee
nickvergessen Feb 18, 2021
6ad31df
Fix selecting the session when there could be multiple
nickvergessen Feb 18, 2021
783fb00
Don't clear previous sessions when joining
nickvergessen Feb 25, 2021
723d47f
Fix session selection in signaling code
nickvergessen Feb 18, 2021
a545cff
Only load sessions on the room list for this PHP session
nickvergessen Feb 25, 2021
6184127
Make the UI handle the call state on it's interactions instead of the…
nickvergessen Feb 25, 2021
6902e57
Show a "Connecting …" screen until we finished joining
nickvergessen Feb 25, 2021
5bff56f
Move listed rooms to API v4
nickvergessen Mar 3, 2021
79d52e6
Move lobby and SIP to v4
nickvergessen Mar 3, 2021
7673f4f
Move conversation creation to v4
nickvergessen Mar 3, 2021
1b4b1c6
Move get rooms to API v4
nickvergessen Mar 3, 2021
174789f
Check users on correct endpoint
nickvergessen Mar 4, 2021
8eae2e8
Move get participants to API v4
nickvergessen Mar 4, 2021
5ba0871
Add API version to files/share integration tests
nickvergessen Mar 4, 2021
e331d29
Make joining a room API v4
nickvergessen Mar 4, 2021
6c0246b
Make leaving a room API v4
nickvergessen Mar 4, 2021
3a680dc
Move removing paricipants to v4
nickvergessen Mar 4, 2021
db7c09e
Move deleting and getting a room to v4
nickvergessen Mar 4, 2021
0aedba5
Move room modifications to API v4
nickvergessen Mar 4, 2021
4aee4e9
Move other participant handling to API v4
nickvergessen Mar 4, 2021
7eaafce
Move other room APIs to v4
nickvergessen Mar 4, 2021
3fed42b
Move call API to v4
nickvergessen Mar 4, 2021
64a28fa
Chat, Settings and Guests are v1 api only atm
nickvergessen Mar 4, 2021
7b1a8ee
Document return types as well
nickvergessen Mar 4, 2021
ba52825
Statuses are integers now
nickvergessen Mar 4, 2021
8136513
We have the full room data already
nickvergessen Mar 4, 2021
5ed91b8
Add conversation-v4 capability
nickvergessen Mar 4, 2021
a3cf504
Move to APIv4
nickvergessen Mar 4, 2021
84fa567
Remove old API version handlings
nickvergessen Mar 4, 2021
5f29407
Check the participants on the correct endpoint
nickvergessen Mar 4, 2021
1dd9297
Fix integration tests by saving the attendee id or loading it
nickvergessen Mar 5, 2021
928e047
Handle all getParticipants with multi sessions
nickvergessen Mar 5, 2021
baa1547
Trespassing only with session
nickvergessen Mar 5, 2021
1bb090a
No duplicate session warning per se
nickvergessen Mar 8, 2021
2183ffc
Leaving with a session as guest is now also not quiting anymore
nickvergessen Mar 8, 2021
12a48be
Fix HPB missing event when a session is terminated only
nickvergessen Mar 8, 2021
1e9c21e
Fix removing yourself and promoting a stranger
nickvergessen Mar 9, 2021
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
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ And in the works for the [coming versions](https://github.com/nextcloud/spreed/m

]]></description>

<version>12.0.0-dev.5</version>
<version>12.0.0-dev.6</version>
<licence>agpl</licence>

<author>Daniel Calviño Sánchez</author>
Expand Down
84 changes: 32 additions & 52 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
'url' => '/api/{apiVersion}/call/{token}',
'verb' => 'GET',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -118,7 +118,7 @@
'url' => '/api/{apiVersion}/call/{token}',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -127,7 +127,7 @@
'url' => '/api/{apiVersion}/call/{token}',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand Down Expand Up @@ -199,31 +199,31 @@
'url' => '/api/{apiVersion}/room',
'verb' => 'GET',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
],
],
[
'name' => 'Room#getListedRooms',
'url' => '/api/{apiVersion}/listed-room',
'verb' => 'GET',
'requirements' => [
'apiVersion' => 'v3',
'apiVersion' => 'v(4)',
],
],
[
'name' => 'Room#createRoom',
'url' => '/api/{apiVersion}/room',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
],
],
[
'name' => 'Room#getSingleRoom',
'url' => '/api/{apiVersion}/room/{token}',
'verb' => 'GET',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -232,7 +232,7 @@
'url' => '/api/{apiVersion}/room/{token}',
'verb' => 'PUT',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -241,7 +241,7 @@
'url' => '/api/{apiVersion}/room/{token}',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -250,7 +250,7 @@
'url' => '/api/{apiVersion}/room/{token}/public',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -259,7 +259,7 @@
'url' => '/api/{apiVersion}/room/{token}/public',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -268,7 +268,7 @@
'url' => '/api/{apiVersion}/room/{token}/description',
'verb' => 'PUT',
'requirements' => [
'apiVersion' => 'v3',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -277,7 +277,7 @@
'url' => '/api/{apiVersion}/room/{token}/read-only',
'verb' => 'PUT',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -286,7 +286,7 @@
'url' => '/api/{apiVersion}/room/{token}/listable',
'verb' => 'PUT',
'requirements' => [
'apiVersion' => 'v3',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -295,7 +295,7 @@
'url' => '/api/{apiVersion}/room/{token}/password',
'verb' => 'PUT',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -304,7 +304,7 @@
'url' => '/api/{apiVersion}/room/{token}/participants',
'verb' => 'GET',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -313,16 +313,7 @@
'url' => '/api/{apiVersion}/room/{token}/participants',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'token' => '^[a-z0-9]{4,30}$',
],
],
[
'name' => 'Room#removeParticipantFromRoom',
'url' => '/api/{apiVersion}/room/{token}/participants',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -331,16 +322,7 @@
'url' => '/api/{apiVersion}/room/{token}/participants/self',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'token' => '^[a-z0-9]{4,30}$',
],
],
[
'name' => 'Room#removeGuestFromRoom',
'url' => '/api/{apiVersion}/room/{token}/participants/guests',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -349,7 +331,7 @@
'url' => '/api/{apiVersion}/room/{token}/attendees',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v3',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -358,7 +340,7 @@
'url' => '/api/{apiVersion}/room/{token}/participants/active',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -367,7 +349,7 @@
'url' => '/api/{apiVersion}/room/{token}/participants/resend-invitations',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v3',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -376,7 +358,7 @@
'url' => '/api/{apiVersion}/room/{token}/participants/active',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -385,7 +367,7 @@
'url' => '/api/{apiVersion}/room/{token}/moderators',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -394,7 +376,7 @@
'url' => '/api/{apiVersion}/room/{token}/moderators',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -403,7 +385,7 @@
'url' => '/api/{apiVersion}/room/{token}/favorite',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -412,7 +394,7 @@
'url' => '/api/{apiVersion}/room/{token}/favorite',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand All @@ -421,7 +403,7 @@
'url' => '/api/{apiVersion}/room/{token}/pin/{pin}',
'verb' => 'GET',
'requirements' => [
'apiVersion' => 'v3',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
'pin' => '^\d{7,32}$',
],
Expand All @@ -431,27 +413,25 @@
'url' => '/api/{apiVersion}/room/{token}/notify',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
[
'name' => 'Room#setLobby',
'url' => '/api/{apiVersion}/room/{token}/{webinar}/lobby',
'url' => '/api/{apiVersion}/room/{token}/webinar/lobby',
'verb' => 'PUT',
'requirements' => [
'apiVersion' => 'v(1|2|3)',
'webinar' => 'webinary?',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
[
'name' => 'Room#setSIPEnabled',
'url' => '/api/{apiVersion}/room/{token}/{webinar}/sip',
'url' => '/api/{apiVersion}/room/{token}/webinar/sip',
'verb' => 'PUT',
'requirements' => [
'apiVersion' => 'v3',
'webinar' => 'webinary?',
'apiVersion' => 'v(4)',
'token' => '^[a-z0-9]{4,30}$',
],
],
Expand Down
18 changes: 9 additions & 9 deletions docs/call.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Call API

* Base endpoint for API v1 is: `/ocs/v2.php/apps/spreed/api/v1`
* Base endpoint for API v2 is: `/ocs/v2.php/apps/spreed/api/v2`
* Base endpoint for API v3 is: `/ocs/v2.php/apps/spreed/api/v3`
* API v1: 🏁 Removed with API v4
* API v2: 🏁 Removed with API v4
* API v3: 🏁 Removed with API v4
* API v4: Base endpoint `/ocs/v2.php/apps/spreed/api/v4`
PVince81 marked this conversation as resolved.
Show resolved Hide resolved

## Get list of connected participants

Expand All @@ -21,12 +22,11 @@

field | type | API | Description
------|------|-----|------------
`userId` | string | v1 and v2 only | Is empty for guests
`actorType` | string | v3 | Actor type of the attendee (see [Constants - Attendee types](constants.md#attendee-types))
`actorId` | string | v3 | The user id, guest random id or email address of the attendee
`displayName` | string | v3 | The display name of the attendee
`lastPing` | int | * | Timestamp of the last ping of the user (should be used for sorting)
`sessionId` | string | * | 512 character long string
`actorType` | string | v4 | Actor type of the attendee (see [Constants - Attendee types](constants.md#attendee-types))
`actorId` | string | v4 | The user id, guest random id or email address of the attendee
`displayName` | string | v4 | The display name of the attendee
`lastPing` | int | v4 | Timestamp of the last ping of the user (should be used for sorting)
`sessionId` | string | v4 | 512 character long string

## Join a call

Expand Down
7 changes: 5 additions & 2 deletions docs/capabilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ title: Capabilities
* `config => attachments => folder` - User defined folder where items should be uploaded to
* `config => conversations => can-create` - Whether the user can create public and group conversations, if not only one-to-one conversations are allowed
* `force-mute` - "forceMute" signaling messages can be sent to mute other participants.
* `conversation-v2` - The conversations API v2 is less load heavy and should be used by clients when available. Check the difference in the [Conversation API documentation](conversation.md).
* `conversation-v2` - ~~The conversations API v2 is less load heavy and should be used by clients when available. Check the difference in the [Conversation API documentation](conversation.md).~~ Replaced by API v4 when `conversation-v4` is set.
* `chat-reference-id` - an optional referenceId can be sent with a chat message to be able to identify it in parallel get requests to earlier fade out a temporary message

## 10.1
* `conversation-v3` - Whether conversations API v3 is available
* `conversation-v3` - ~~Whether conversations API v3 is available~~ Replaced by API v4 when `conversation-v4` is set.
* `sip-support` - Whether SIP can be configured and enabled by moderators. The conversations API will come with some new values `sipEnabled` which signals whether this conversation has SIP configured as well as `canEnableSIP` to see if a user can enable it. When it is enabled `attendeePin` will contain the unique dial-in code for this user.

## 11.0
Expand All @@ -69,3 +69,6 @@ title: Capabilities
* `delete-messages` - Allows to delete chat messages up to 6 hours for your own messages or when being a moderator. On deleting the message text will be replaced and a follow up system message will make sure clients and users update it in their cache and storage.
* `rich-object-sharing` - Rich objects can be shared to chats. See [OCP\RichObjectStrings\Definitions](https://github.com/nextcloud/server/blob/master/lib/public/RichObjectStrings/Definitions.php) for more details on supported rich objects and required data.
* `conversation-call-flags` - Whether the room api provides the `callFlag` to tell apart video and audio calls

## 12.0
* `conversation-v4` - Whether conversations API v4 is available. This also means that v1, v2 and v3 are **not** available anymore. The changes on API v4 allow a user to have multiple sessions in the same conversation on different devices which is incompatible with the data structure that was used by the previous APIs.
2 changes: 1 addition & 1 deletion docs/constants.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ title: Constants
* `1` regular users only, excluding guest app users
* `2` everyone

### Webinary lobby states
### Webinar lobby states
* `0` no lobby
* `1` lobby for non moderators

Expand Down
Loading