Skip to content

Commit

Permalink
Merge pull request #5194 from nextcloud/techdebt/noid/multi-session
Browse files Browse the repository at this point in the history
👥 Multiple sessions 👥
  • Loading branch information
PVince81 authored Mar 9, 2021
2 parents ab141f7 + 1e9c21e commit 2a2a43a
Show file tree
Hide file tree
Showing 109 changed files with 3,731 additions and 3,763 deletions.
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`

## 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

0 comments on commit 2a2a43a

Please sign in to comment.