UPSTREAM BASELINE: nextcloud/spreed v22.0.12 (без изменений)
Type checking / changes (push) Has been cancelled
Type checking / test (push) Has been cancelled
Type checking / typescript-summary (push) Has been cancelled
Node tests / changes (push) Has been cancelled
Node tests / test (push) Has been cancelled
Node tests / test-summary (push) Has been cancelled

Источник: https://github.com/nextcloud/spreed/archive/refs/tags/v22.0.12.tar.gz
С этого коммита ветка официального Nextcloud Talk отрезана (решение владельца 2026-07-06).
Все дальнейшие изменения — только наши; версии релизов: 22.0.12-f7.N.
This commit is contained in:
2026-07-06 14:07:50 +00:00
commit 01acfa3b40
1716 changed files with 613013 additions and 0 deletions
@@ -0,0 +1,525 @@
Feature: federation/call
Background:
Given using server "REMOTE"
And user "participant2" exists
And the following "spreed" app config is set
| federation_enabled | yes |
And using server "LOCAL"
And user "participant1" exists
And the following "spreed" app config is set
| federation_enabled | yes |
Scenario: join call
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
And using server "REMOTE"
Then user "participant2" checks call notification for "LOCAL::room" with 201 (v4)
And using server "LOCAL"
And user "participant1" joins call "room" with 200 (v4)
| flags | 3 |
And using server "REMOTE"
Then user "participant2" checks call notification for "LOCAL::room" with 200 (v4)
And user "participant2" joins room "LOCAL::room" with 200 (v4)
And user "participant2" is participant of room "LOCAL::room" (v4)
| callFlag |
| 3 |
And user "participant2" sees the following attendees in room "LOCAL::room" with 200 (v4)
| actorType | actorId | inCall |
| federated_users | participant1@{$LOCAL_URL} | 3 |
| users | participant2 | 0 |
Then user "participant2" checks call notification for "LOCAL::room" with 200 (v4)
When user "participant2" joins call "LOCAL::room" with 200 (v4)
| flags | 7 |
Then user "participant2" checks call notification for "LOCAL::room" with 404 (v4)
Then using server "LOCAL"
And user "participant1" is participant of room "room" (v4)
| callFlag |
| 7 |
And user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | inCall |
| users | participant1 | 3 |
| federated_users | participant2@{$REMOTE_URL} | 7 |
And user "participant1" sees 2 peers in call "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" is participant of room "LOCAL::room" (v4)
| callFlag |
| 7 |
And user "participant2" sees the following attendees in room "LOCAL::room" with 200 (v4)
| actorType | actorId | inCall |
| federated_users | participant1@{$LOCAL_URL} | 3 |
| users | participant2 | 7 |
And user "participant2" sees 2 peers in call "LOCAL::room" with 200 (v4)
Scenario: update call flags
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" joins room "LOCAL::room" with 200 (v4)
And user "participant2" joins call "LOCAL::room" with 200 (v4)
| flags | 7 |
And user "participant2" is participant of room "LOCAL::room" (v4)
| callFlag |
| 7 |
And user "participant2" sees the following attendees in room "LOCAL::room" with 200 (v4)
| actorType | actorId | inCall |
| federated_users | participant1@{$LOCAL_URL} | 0 |
| users | participant2 | 7 |
When user "participant2" updates call flags in room "LOCAL::room" to "1" with 200 (v4)
And using server "LOCAL"
And user "participant1" is participant of room "room" (v4)
| callFlag |
| 7 |
And user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | inCall |
| users | participant1 | 0 |
| federated_users | participant2@{$REMOTE_URL} | 1 |
And user "participant1" sees 1 peers in call "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" is participant of room "LOCAL::room" (v4)
| callFlag |
| 7 |
And user "participant2" sees the following attendees in room "LOCAL::room" with 200 (v4)
| actorType | actorId | inCall |
| federated_users | participant1@{$LOCAL_URL} | 0 |
| users | participant2 | 1 |
And user "participant2" sees 1 peers in call "LOCAL::room" with 200 (v4)
Scenario: leave call
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
And user "participant1" joins call "room" with 200 (v4)
| flags | 3 |
And using server "REMOTE"
And user "participant2" joins room "LOCAL::room" with 200 (v4)
And user "participant2" joins call "LOCAL::room" with 200 (v4)
| flags | 7 |
And user "participant2" sees the following attendees in room "LOCAL::room" with 200 (v4)
| actorType | actorId | inCall |
| federated_users | participant1@{$LOCAL_URL} | 3 |
| users | participant2 | 7 |
When user "participant2" leaves call "LOCAL::room" with 200 (v4)
And using server "LOCAL"
And user "participant1" leaves call "room" with 200 (v4)
Then user "participant1" is participant of room "room" (v4)
| callFlag |
| 0 |
And user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | inCall |
| users | participant1 | 0 |
| federated_users | participant2@{$REMOTE_URL} | 0 |
And user "participant1" sees 0 peers in call "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" is participant of room "LOCAL::room" (v4)
| callFlag |
| 0 |
And user "participant2" sees the following attendees in room "LOCAL::room" with 200 (v4)
| actorType | actorId | inCall |
| federated_users | participant1@{$LOCAL_URL} | 0 |
| users | participant2 | 0 |
And user "participant2" sees 0 peers in call "LOCAL::room" with 200 (v4)
Scenario: Host ends call for everyone
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
And user "participant1" joins call "room" with 200 (v4)
| flags | 3 |
And using server "REMOTE"
And user "participant2" joins room "LOCAL::room" with 200 (v4)
And user "participant2" joins call "LOCAL::room" with 200 (v4)
| flags | 7 |
And user "participant2" sees the following attendees in room "LOCAL::room" with 200 (v4)
| actorType | actorId | inCall |
| federated_users | participant1@{$LOCAL_URL} | 3 |
| users | participant2 | 7 |
And using server "LOCAL"
And user "participant1" ends call "room" with 200 (v4)
Then user "participant1" is participant of room "room" (v4)
| callFlag |
| 0 |
And user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | inCall |
| users | participant1 | 0 |
| federated_users | participant2@{$REMOTE_URL} | 0 |
And user "participant1" sees 0 peers in call "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" is participant of room "LOCAL::room" (v4)
| callFlag |
| 0 |
And user "participant2" sees the following attendees in room "LOCAL::room" with 200 (v4)
| actorType | actorId | inCall |
| federated_users | participant1@{$LOCAL_URL} | 0 |
| users | participant2 | 0 |
And user "participant2" sees 0 peers in call "LOCAL::room" with 200 (v4)
Scenario: normal call notification for federated user
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And user "participant2" joins room "LOCAL::room" with 200 (v4)
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
When user "participant1" joins call "room" with 200 (v4)
Then using server "REMOTE"
And user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | call | LOCAL::room | A group call has started in room |
And user "participant2" joins room "LOCAL::room" with 200 (v4)
When user "participant2" joins call "LOCAL::room" with 200 (v4)
And using server "LOCAL"
When user "participant1" ends call "room" with 200 (v4)
Then using server "REMOTE"
And user "participant2" has the following notifications
Scenario: normal call notification for federated user is cleared when joining
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And user "participant2" joins room "LOCAL::room" with 200 (v4)
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
When user "participant1" joins call "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | call | LOCAL::room | A group call has started in room |
When user "participant2" joins call "LOCAL::room" with 200 (v4)
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: missed call notification for federated user
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And user "participant2" joins room "LOCAL::room" with 200 (v4)
Then user "participant2" checks call notification for "LOCAL::room" with 201 (v4)
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
And user "participant1" joins call "room" with 200 (v4)
And using server "REMOTE"
Then user "participant2" checks call notification for "LOCAL::room" with 200 (v4)
And using server "LOCAL"
When user "participant1" leaves call "room" with 200 (v4)
Then using server "REMOTE"
Then user "participant2" checks call notification for "LOCAL::room" with 201 (v4)
And user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | call | LOCAL::room | You missed a group call in room |
Scenario: silent call does not trigger call notification for federated users
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And user "participant2" joins room "LOCAL::room" with 200 (v4)
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
When user "participant1" joins call "room" with 200 (v4)
| silent | true |
Then using server "REMOTE"
And user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: silent call by federated user does not trigger call notification
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" joins room "LOCAL::room" with 200 (v4)
When user "participant2" joins call "LOCAL::room" with 200 (v4)
| silent | true |
Then using server "LOCAL"
And user "participant1" has the following notifications
| app | object_type | object_id | subject |
Scenario: Turning off call notifications also works
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And user "participant2" sets call notifications to disabled for room "LOCAL::room" (v4)
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
When user "participant1" joins call "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: missed silent call by federated user does not trigger call notification
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" joins room "LOCAL::room" with 200 (v4)
And user "participant2" joins call "LOCAL::room" with 200 (v4)
| silent | true |
When user "participant2" leaves call "LOCAL::room" with 200 (v4)
Then using server "LOCAL"
And user "participant1" has the following notifications
| app | object_type | object_id | subject |
Scenario: Recording consent required by admin for federated conversation/users
Given recording server is started
And the following "spreed" app config is set
| recording_consent | 1 |
And user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
And user "participant1" joins call "room" with 400 (v4)
| recordingConsent | 0 |
And user "participant1" joins call "room" with 200 (v4)
| recordingConsent | 1 |
And using server "REMOTE"
And user "participant2" joins room "LOCAL::room" with 200 (v4)
And user "participant2" joins call "LOCAL::room" with 400 (v4)
| recordingConsent | 0 |
And user "participant2" joins call "LOCAL::room" with 200 (v4)
| recordingConsent | 1 |
Scenario: Cannot enable recording consent during a call for federated conversation/users
Given recording server is started
And the following "spreed" app config is set
| recording_consent | 2 |
And user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
And user "participant1" joins call "room" with 200 (v4)
When user "participant1" sets the recording consent to 1 for room "room" with 400 (v4)
Then user "participant1" is participant of the following unordered rooms (v4)
| type | name | recordingConsent |
| 2 | room | 0 |
Scenario: Enable recording consent after leaving call for federated conversation/users
Given recording server is started
And the following "spreed" app config is set
| recording_consent | 2 |
And user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
And user "participant1" joins call "room" with 200 (v4)
And user "participant1" leaves call "room" with 200 (v4)
When user "participant1" sets the recording consent to 1 for room "room" with 200 (v4)
Then user "participant1" is participant of the following unordered rooms (v4)
| type | name | recordingConsent |
| 2 | room | 1 |
And user "participant1" joins call "room" with 400 (v4)
And user "participant1" joins call "room" with 200 (v4)
| recordingConsent | 1 |
Scenario: Disable recording consent during a call for federated conversation/users
Given recording server is started
And the following "spreed" app config is set
| recording_consent | 2 |
And user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
And user "participant1" joins call "room" with 200 (v4)
When user "participant1" sets the recording consent to 0 for room "room" with 200 (v4)
Then user "participant1" is participant of the following unordered rooms (v4)
| type | name | recordingConsent |
| 2 | room | 0 |
When user "participant1" leaves call "room" with 200 (v4)
Scenario: Resend call notification for federated user
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And user "participant2" joins room "LOCAL::room" with 200 (v4)
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
When user "participant1" joins call "room" with 200 (v4)
Then using server "REMOTE"
And user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | call | LOCAL::room | A group call has started in room |
And user "participant2" joins room "LOCAL::room" with 200 (v4)
When user "participant2" joins call "LOCAL::room" with 200 (v4)
When user "participant2" leaves call "LOCAL::room" with 200 (v4)
And user "participant2" has the following notifications
And using server "LOCAL"
Then user "participant1" loads attendees attendee ids in room "room" (v4)
Then user "participant1" pings federated_user "participant2@REMOTE" to join call "room" with 200 (v4)
Then using server "REMOTE"
And user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | call | LOCAL::room | A group call has started in room |
Scenario: Resend call notification as a federated user
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And user "participant2" joins room "LOCAL::room" with 200 (v4)
When user "participant2" joins call "LOCAL::room" with 200 (v4)
And using server "LOCAL"
And user "participant1" has the following notifications
| app | object_type | object_id | subject |
| spreed | call | room | A group call has started in room |
And user "participant1" joins room "room" with 200 (v4)
When user "participant1" joins call "room" with 200 (v4)
When user "participant1" leaves call "room" with 200 (v4)
And user "participant1" has the following notifications
Then using server "REMOTE"
Then user "participant2" loads attendees attendee ids in room "LOCAL::room" (v4)
Then user "participant2" pings federated_user "participant1@LOCAL" to join call "LOCAL::room" with 200 (v4)
And using server "LOCAL"
And user "participant1" has the following notifications
| app | object_type | object_id | subject |
| spreed | call | room | A group call has started in room |
@@ -0,0 +1,535 @@
Feature: federation/chat
Background:
Given using server "REMOTE"
And user "participant2" exists
And user "participant3" exists
And the following "spreed" app config is set
| federation_enabled | yes |
And using server "LOCAL"
Given user "participant1" exists
Given user "participant2" exists
Given user "participant3" exists
And the following "spreed" app config is set
| federation_enabled | yes |
Scenario: Get mention suggestions (translating local users to federated users)
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And user "participant1" adds user "participant3" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
Then user "participant2" is participant of the following rooms (v4)
| id | type |
| LOCAL::room | 2 |
And using server "LOCAL"
And user "participant1" gets the following candidate mentions in room "room" for "" with 200
| source | id | label | mentionId |
| calls | all | room | all |
| federated_users | participant2@{$REMOTE_URL} | participant2-displayname | federated_user/participant2@{$REMOTE_URL} |
| users | participant1 | participant1-displayname | participant1 |
| users | participant3 | participant3-displayname | participant3 |
Given using server "REMOTE"
And user "participant2" gets the following candidate mentions in room "LOCAL::room" for "" with 200
| source | id | label | mentionId |
| calls | all | room | all |
| federated_users | participant1@{$LOCAL_URL} | participant1-displayname | participant1 |
| federated_users | participant3@{$LOCAL_URL} | participant3-displayname | participant3 |
| users | participant2 | participant2-displayname | federated_user/participant2@{$REMOTE_URL} |
Scenario: Get mention suggestions (translating federated users of the same server to local users)
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And user "participant1" adds federated_user "participant3" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And user "participant3" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant3" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
Then user "participant2" is participant of the following rooms (v4)
| id | type |
| LOCAL::room | 2 |
Given using server "LOCAL"
And user "participant1" gets the following candidate mentions in room "room" for "" with 200
| source | id | label | mentionId |
| calls | all | room | all |
| users | participant1 | participant1-displayname | participant1 |
| federated_users | participant2@{$REMOTE_URL} | participant2-displayname | federated_user/participant2@{$REMOTE_URL} |
| federated_users | participant3@{$REMOTE_URL} | participant3-displayname | federated_user/participant3@{$REMOTE_URL} |
Given using server "REMOTE"
And user "participant2" gets the following candidate mentions in room "LOCAL::room" for "" with 200
| source | id | label | mentionId |
| calls | all | room | all |
| federated_users | participant1@{$LOCAL_URL} | participant1-displayname | participant1 |
| users | participant3 | participant3-displayname | federated_user/participant3@{$REMOTE_URL} |
| users | participant2 | participant2-displayname | federated_user/participant2@{$REMOTE_URL} |
Scenario: Basic chatting including posting, getting, editing and deleting
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And user "participant1" adds federated_user "participant3" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And user "participant3" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant3" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
Then user "participant2" is participant of the following rooms (v4)
| id | type | lastMessage |
| LOCAL::room | 2 | {federated_user} accepted the invitation |
Given using server "LOCAL"
And user "participant1" sends message "Message 1" to room "room" with 201
Given using server "REMOTE"
Then user "participant2" is participant of the following rooms (v4)
| id | type | lastMessage |
| LOCAL::room | 2 | Message 1 |
When user "participant2" sends reply "Message 1-1" on message "Message 1" to room "LOCAL::room" with 201
Then user "participant2" is participant of the following rooms (v4)
| id | type | lastMessage |
| LOCAL::room | 2 | Message 1-1 |
Given using server "LOCAL"
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| room | federated_users | participant2@{$REMOTE_URL} | participant2-displayname | Message 1-1 | [] | Message 1 |
| room | users | participant1 | participant1-displayname | Message 1 | [] | |
Given using server "REMOTE"
When next message request has the following parameters set
| timeout | 0 |
And user "participant2" sees the following messages in room "LOCAL::room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| LOCAL::room | users | participant2 | participant2-displayname | Message 1-1 | [] | Message 1 |
| LOCAL::room | federated_users | participant1@{$LOCAL_URL} | participant1-displayname | Message 1 | [] | |
Given using server "LOCAL"
And user "participant1" edits message "Message 1" in room "room" to "Message 1 - Edit 1" with 200
Given using server "REMOTE"
And user "participant2" edits message "Message 1-1" in room "LOCAL::room" to "Message 1-1 - Edit 1" with 200
Then user "participant2" is participant of the following rooms (v4)
| id | type | lastMessage |
| LOCAL::room | 2 | Message 1-1 - Edit 1 |
Given using server "LOCAL"
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | lastEditActorType | lastEditActorId | lastEditActorDisplayName |
| room | federated_users | participant2@{$REMOTE_URL} | participant2-displayname | Message 1-1 - Edit 1 | [] | Message 1 - Edit 1 | federated_users | participant2@{$REMOTE_URL} | participant2-displayname |
| room | users | participant1 | participant1-displayname | Message 1 - Edit 1 | [] | | users | participant1 | participant1-displayname |
Given using server "REMOTE"
When next message request has the following parameters set
| timeout | 0 |
And user "participant2" sees the following messages in room "LOCAL::room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | lastEditActorType | lastEditActorId | lastEditActorDisplayName |
| LOCAL::room | users | participant2 | participant2-displayname | Message 1-1 - Edit 1 | [] | Message 1 - Edit 1 | users | participant2 | participant2-displayname |
| LOCAL::room | federated_users | participant1@{$LOCAL_URL} | participant1-displayname | Message 1 - Edit 1 | [] | | federated_users | participant1@{$LOCAL_URL} | participant1-displayname |
Given using server "LOCAL"
And user "participant1" deletes message "Message 1 - Edit 1" from room "room" with 200
Given using server "REMOTE"
And user "participant2" deletes message "Message 1-1 - Edit 1" from room "LOCAL::room" with 200
Given using server "LOCAL"
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| room | federated_users | participant2@{$REMOTE_URL} | participant2-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} | Message deleted by you |
| room | users | participant1 | participant1-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | |
When next message request has the following parameters set
| timeout | 0 |
Given using server "REMOTE"
And user "participant2" sees the following messages in room "LOCAL::room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| LOCAL::room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} | Message deleted by author |
| LOCAL::room | federated_users | participant1@{$LOCAL_URL} | participant1-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1","server":"{$LOCAL_URL}"}} | |
# Disabled due to https://github.com/nextcloud/spreed/issues/12957
# Then user "participant2" is participant of the following rooms (v4)
# | id | type | lastMessage |
# | LOCAL::room | 2 | Message deleted by author |
Scenario: Last message actor when the same user ID is present
Given user "participant3" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant3" adds federated_user "participant3" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant3" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant3@LOCAL | participant3-displayname |
And user "participant3" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
Then user "participant3" is participant of the following unordered rooms (v4)
| id | name | type | remoteServer | remoteToken | lastMessage |
| LOCAL::room | room | 2 | LOCAL | room | {federated_user} accepted the invitation |
Given using server "LOCAL"
Then user "participant3" is participant of the following unordered rooms (v4)
| id | name | type | remoteServer | remoteToken | lastMessage |
| room | room | 2 | | | {federated_user} accepted the invitation |
And user "participant3" sends message "Message 1" to room "room" with 201
Then user "participant3" is participant of the following unordered rooms (v4)
| id | name | type | remoteServer | remoteToken | lastMessage | lastMessageActorType | lastMessageActorId |
| room | room | 2 | | | Message 1 | users | participant3 |
Given using server "REMOTE"
Then user "participant3" is participant of the following unordered rooms (v4)
| id | name | type | remoteServer | remoteToken | lastMessage | lastMessageActorType | lastMessageActorId |
| LOCAL::room | room | 2 | LOCAL | room | Message 1 | federated_users | participant3@{$LOCAL_URL} |
When user "participant3" sends reply "Message 1-1" on message "Message 1" to room "LOCAL::room" with 201
Then user "participant3" is participant of the following unordered rooms (v4)
| id | name | type | remoteServer | remoteToken | lastMessage | lastMessageActorType | lastMessageActorId |
| LOCAL::room | room | 2 | LOCAL | room | Message 1-1 | users | participant3 |
Given using server "LOCAL"
Then user "participant3" is participant of the following unordered rooms (v4)
| id | name | type | remoteServer | remoteToken | lastMessage | lastMessageActorType | lastMessageActorId |
| room | room | 2 | | | Message 1-1 | federated_users | participant3@{$REMOTE_URL} |
Scenario: Read marker checking
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And user "participant1" adds federated_user "participant3" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And user "participant3" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant3" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
Then user "participant2" is participant of the following rooms (v4)
| id | type | lastReadMessage | unreadMessages | unreadMention | unreadMentionDirect |
| LOCAL::room | 2 | UNKNOWN_MESSAGE | 0 | 0 | 0 |
Given using server "LOCAL"
And user "participant1" sends message "Message 1" to room "room" with 201
And user "participant1" sends message "Message 2" to room "room" with 201
Given using server "REMOTE"
When user "participant2" marks room "LOCAL::room" as unread with 200 (v1)
Then user "participant2" is participant of the following rooms (v4)
| id | type | lastReadMessage | unreadMessages | unreadMention | unreadMentionDirect |
| LOCAL::room | 2 | Message 1 | 1 | 0 | 0 |
When user "participant2" reads message "NULL" in room "LOCAL::room" with 200 (v1)
Then user "participant2" is participant of the following rooms (v4)
| id | type | lastReadMessage | unreadMessages | unreadMention | unreadMentionDirect |
| LOCAL::room | 2 | Message 2 | 0 | 0 | 0 |
When user "participant2" reads message "Message 1" in room "LOCAL::room" with 200 (v1)
Then user "participant2" is participant of the following rooms (v4)
| id | type | lastReadMessage | unreadMessages | unreadMention | unreadMentionDirect |
| LOCAL::room | 2 | Message 1 | 1 | 0 | 0 |
When user "participant2" reads message "Message 2" in room "LOCAL::room" with 200 (v1)
Then user "participant2" is participant of the following rooms (v4)
| id | type | lastReadMessage | unreadMessages | unreadMention | unreadMentionDirect |
| LOCAL::room | 2 | Message 2 | 0 | 0 | 0 |
Scenario: Error handling of chatting (posting a too long message)
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
Then user "participant2" is participant of the following rooms (v4)
| id | type |
| LOCAL::room | 2 |
And user "participant2" sends message "413 Payload Too Large" to room "LOCAL::room" with 413
Scenario: Mentioning a federated user triggers a notification for them
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2@REMOTE" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
Then user "participant2" is participant of the following rooms (v4)
| id | type |
| LOCAL::room | 2 |
# Join and leave to clear the invite notification
Given user "participant2" joins room "LOCAL::room" with 200 (v4)
Given user "participant2" leaves room "LOCAL::room" with 200 (v4)
And user "participant2" sends message "Message 1" to room "LOCAL::room" with 201
Then user "participant2" sees the following entries for dashboard widgets "spreed" (v1)
| title | subtitle | link | iconUrl | sinceId | overlayIconUrl |
Then user "participant2" sees the following entries for dashboard widgets "spreed" (v2)
| title | subtitle | link | iconUrl | sinceId | overlayIconUrl |
| room | Message 1 | LOCAL::room | {$BASE_URL}ocs/v2.php/apps/spreed/api/v1/room/{token}/avatar{version} | | |
When using server "LOCAL"
When user "participant1" sends reply "Message 1-1" on message "Message 1" to room "room" with 201
Then using server "REMOTE"
Then user "participant2" sees the following entries for dashboard widgets "spreed" (v1)
| title | subtitle | link | iconUrl | sinceId | overlayIconUrl |
| room | You were mentioned | LOCAL::room | {$BASE_URL}ocs/v2.php/apps/spreed/api/v1/room/{token}/avatar{version} | | |
Then user "participant2" sees the following entries for dashboard widgets "spreed" (v2)
| title | subtitle | link | iconUrl | sinceId | overlayIconUrl |
| room | You were mentioned | LOCAL::room | {$BASE_URL}ocs/v2.php/apps/spreed/api/v1/room/{token}/avatar{version} | | |
And using server "LOCAL"
And user "participant1" sends message 'Hi @"federated_user/participant2@{$REMOTE_URL}" bye' to room "room" with 201
And user "participant1" sends message 'Hi @all bye' to room "room" with 201
Then using server "REMOTE"
Then user "participant2" has the following notifications
| app | object_type | object_id | subject | message |
| spreed | chat | LOCAL::room/Hi @all bye | participant1-displayname mentioned everyone in conversation room | Hi room bye |
| spreed | chat | LOCAL::room/Hi @"federated_user/participant2@{$REMOTE_URL}" bye | participant1-displayname mentioned you in conversation room | Hi @participant2-displayname bye |
| spreed | chat | LOCAL::room/Message 1-1 | participant1-displayname replied to your message in conversation room | Message 1-1 |
When next message request has the following parameters set
| timeout | 0 |
| lookIntoFuture | 1 |
| lastKnownMessageId | Hi @all bye |
And user "participant2" sees the following messages in room "LOCAL::room" with 304
Then user "participant2" has the following notifications
| app | object_type | object_id | subject | message |
Scenario: Mentioning a federated user as a guest also triggers a notification for them
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 3 | LOCAL | room |
Then user "participant2" is participant of the following rooms (v4)
| id | type |
| LOCAL::room | 3 |
# Join and leave to clear the invite notification
Given user "participant2" joins room "LOCAL::room" with 200 (v4)
Given user "participant2" leaves room "LOCAL::room" with 200 (v4)
And using server "LOCAL"
And user "guest" joins room "room" with 200 (v4)
When user "guest" sends message 'Hi @"federated_user/participant2@{$REMOTE_URL}" bye' to room "room" with 201
When user "guest" sends message "Message 2" to room "room" with 201
Then using server "REMOTE"
Then user "participant2" has the following notifications
| app | object_type | object_id | subject | message |
| spreed | chat | LOCAL::room/Hi @"federated_user/participant2@{$REMOTE_URL}" bye | A guest mentioned you in conversation room | Hi @participant2-displayname bye |
Then user "participant2" reads message "Message 2" in room "LOCAL::room" with 200 (v1)
Then user "participant2" has the following notifications
| app | object_type | object_id | subject | message |
Scenario: Mentioning a federated user with an active session does not trigger a notification but inactive does
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 3 | LOCAL | room |
Then user "participant2" is participant of the following rooms (v4)
| id | type |
| LOCAL::room | 3 |
# Join and leave to clear the invite notification
Given user "participant2" joins room "LOCAL::room" with 200 (v4)
Given user "participant2" sets session state to 1 in room "LOCAL::room" with 200 (v4)
And using server "LOCAL"
And user "guest" joins room "room" with 200 (v4)
When user "guest" sends message 'Sent to @"federated_user/participant2@{$REMOTE_URL}" while active' to room "room" with 201
Given using server "REMOTE"
Given user "participant2" sets session state to 0 in room "LOCAL::room" with 200 (v4)
When using server "LOCAL"
When user "guest" sends message 'User @"federated_user/participant2@{$REMOTE_URL}" is inactive' to room "room" with 201
When user "guest" sends message "Message 3" to room "room" with 201
Then using server "REMOTE"
Then user "participant2" has the following notifications
| app | object_type | object_id | subject | message |
| spreed | chat | LOCAL::room/User @"federated_user/participant2@{$REMOTE_URL}" is inactive | A guest mentioned you in conversation room | User @participant2-displayname is inactive |
Then user "participant2" reads message "Message 3" in room "LOCAL::room" with 200 (v1)
Then user "participant2" has the following notifications
| app | object_type | object_id | subject | message |
Scenario: Mentioning a federated user as a federated user that is a local user to the mentioned one also triggers a notification for them
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 3 | LOCAL | room |
Then user "participant2" is participant of the following rooms (v4)
| id | type |
| LOCAL::room | 3 |
And using server "LOCAL"
And user "participant1" adds federated_user "participant3" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant3" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant3" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 3 | LOCAL | room |
Then user "participant3" is participant of the following rooms (v4)
| id | type |
| LOCAL::room | 3 |
# Join and leave to clear the invite notification
Given user "participant2" joins room "LOCAL::room" with 200 (v4)
Given user "participant2" leaves room "LOCAL::room" with 200 (v4)
When user "participant3" sends message 'Hi @"federated_user/participant2@{$REMOTE_URL}" bye' to room "LOCAL::room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject | message |
| spreed | chat | LOCAL::room/Hi @"federated_user/participant2@{$REMOTE_URL}" bye | participant3-displayname mentioned you in conversation room | Hi @participant2-displayname bye |
Scenario: Mentioning and replying to self does not do notifications
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 3 | LOCAL | room |
Then user "participant2" is participant of the following rooms (v4)
| id | type |
| LOCAL::room | 3 |
And using server "LOCAL"
And user "participant1" adds federated_user "participant3" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant3" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant3" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 3 | LOCAL | room |
Then user "participant3" is participant of the following rooms (v4)
| id | type |
| LOCAL::room | 3 |
# Join and leave to clear the invite notification
Given using server "REMOTE"
Given user "participant2" joins room "LOCAL::room" with 200 (v4)
Given user "participant2" leaves room "LOCAL::room" with 200 (v4)
When user "participant2" sends message 'Hi @"federated_user/participant2@{$REMOTE_URL}" bye' to room "LOCAL::room" with 201
And user "participant2" sends message "Message 1" to room "LOCAL::room" with 201
When user "participant2" sends reply "Message 1-1" on message "Message 1" to room "LOCAL::room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject | message |
Scenario: System messages don't trigger notifications
And user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 3 | LOCAL | room |
And user "participant2" is participant of the following rooms (v4)
| id | type |
| LOCAL::room | 3 |
Given using server "LOCAL"
And user "participant1" sends message "Message 1" to room "room" with 201
Given using server "REMOTE"
When user "participant2" sets notifications to all for room "LOCAL::room" (v4)
Given using server "LOCAL"
And user "participant1" sets description for room "room" to "the description" with 200 (v4)
And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
Given using server "REMOTE"
Then user "participant2" has the following notifications
| app | object_type | object_id | subject | message |
Scenario: Reaction on federated chat messages
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
Then user "participant2" is participant of the following rooms (v4)
| id | type |
| LOCAL::room | 2 |
# Join and leave to clear the invite notification
Given user "participant2" joins room "LOCAL::room" with 200 (v4)
Given user "participant2" leaves room "LOCAL::room" with 200 (v4)
And user "participant2" sends message "Message 1" to room "LOCAL::room" with 201
And using server "LOCAL"
And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
| actorType | actorId | actorDisplayName | reaction |
| users | participant1 | participant1-displayname | 🚀 |
And using server "REMOTE"
And user "participant2" react with "🚀" on message "Message 1" to room "LOCAL::room" with 201
| actorType | actorId | actorDisplayName | reaction |
| federated_users | participant1@{$LOCAL_URL} | participant1-displayname | 🚀 |
| users | participant2 | participant2-displayname | 🚀 |
And using server "LOCAL"
And user "participant1" retrieve reactions "all" of message "Message 1" in room "room" with 200
| actorType | actorId | actorDisplayName | reaction |
| users | participant1 | participant1-displayname | 🚀 |
| federated_users | participant2@{$REMOTE_URL} | participant2-displayname | 🚀 |
Scenario: Typing indicator
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
Then user "participant2" is participant of the following rooms (v4)
| id | type |
| LOCAL::room | 2 |
# Join and leave to clear the invite notification
Given user "participant2" joins room "LOCAL::room" with 200 (v4)
Given user "participant2" leaves room "LOCAL::room" with 200 (v4)
And using server "LOCAL"
When user "participant1" sets setting "typing_privacy" to 1 with 200 (v1)
Then user "participant1" has capability "spreed=>config=>chat=>typing-privacy" set to 1
Then user "participant1" has room capability "config=>chat=>typing-privacy" set to 1 on room "room"
# Public
When user "participant1" sets setting "typing_privacy" to 0 with 200 (v1)
Then user "participant1" has capability "spreed=>config=>chat=>typing-privacy" set to 0
Then user "participant1" has room capability "config=>chat=>typing-privacy" set to 0 on room "room"
@@ -0,0 +1,337 @@
Feature: federation/invite
Background:
Given using server "REMOTE"
Given user "participant2" exists
And the following "spreed" app config is set
| federation_enabled | yes |
Given using server "LOCAL"
Given user "participant1" exists
And the following "spreed" app config is set
| federation_enabled | yes |
Scenario: Federation is disabled
Given the following "spreed" app config is set
| federation_enabled | no |
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 501 (v4)
When user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
Scenario: Invite an invalid user
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds federated_user "invalid-user" to room "room" with 404 (v4)
When user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
Scenario: Accepting an invite
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
When user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
| federated_users | participant2 | 3 |
Then user "participant1" sees the following system messages in room "room" with 200
| room | actorType | actorId | systemMessage | message | messageParameters |
| room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
Given using server "REMOTE"
Then user "participant2" is participant of the following rooms (v4)
| id | name | type |
Then last response has federation invites header set to "1"
Given using server "LOCAL"
When user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
| federated_users | participant2 | 3 |
Then user "participant1" sees the following system messages in room "room" with 200
| room | actorType | actorId | systemMessage | message | messageParameters |
| room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
And force run "OCA\Talk\BackgroundJob\RemoveEmptyRooms" background jobs
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
Then user "participant2" has the following notifications
| app | object_type | object_id | subject | message |
| spreed | remote_talk_share | INVITE_ID(LOCAL::room) | @participant1-displayname invited you to a federated conversation | @participant1-displayname invited you to join room on http://localhost:8080 |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 3 | LOCAL | room |
Then user "participant2" is participant of the following rooms (v4)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 3 | LOCAL | room |
Then last response has federation invites header set to "NULL"
And user "participant2" accepts invite to room "room" of server "LOCAL" with 400 (v1)
| error | state |
And user "participant2" declines invite to room "room" of server "LOCAL" with 400 (v1)
| error | state |
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 1 | participant1@LOCAL | participant1-displayname |
Given using server "LOCAL"
When user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
| federated_users | participant2 | 3 |
Then user "participant1" sees the following system messages in room "room" with 200
| room | actorType | actorId | systemMessage | message | messageParameters |
| room | federated_users | participant2@REMOTE | federated_user_added | {federated_user} accepted the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
# Remove a remote user after they joined
When user "participant1" removes remote "participant2" from room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
Then user "participant2" is participant of the following rooms (v4)
Given using server "LOCAL"
When user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
Then user "participant1" sees the following system messages in room "room" with 200
| room | actorType | actorId | systemMessage | message | messageParameters |
| room | users | participant1 | federated_user_removed | You removed {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | federated_users | participant2@REMOTE | federated_user_added | {federated_user} accepted the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
Scenario: Invite user with wrong casing
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds federated_user "PARTICIPANT2" to room "room" with 200 (v4)
When user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
| federated_users | participant2 | 3 |
Then user "participant1" sees the following system messages in room "room" with 200
| room | actorType | actorId | systemMessage | message | messageParameters |
| room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
When user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
| federated_users | participant2 | 3 |
Then user "participant1" sees the following system messages in room "room" with 200
| room | actorType | actorId | systemMessage | message | messageParameters |
| room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
Given using server "REMOTE"
And force run "OCA\Talk\BackgroundJob\RemoveEmptyRooms" background jobs
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName | localCloudId |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname | participant2@REMOTE |
Then user "participant2" has the following notifications
| app | object_type | object_id | subject | message |
| spreed | remote_talk_share | INVITE_ID(LOCAL::room) | @participant1-displayname invited you to a federated conversation | @participant1-displayname invited you to join room on http://localhost:8080 |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 3 | LOCAL | room |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 400 (v1)
| error | state |
And user "participant2" declines invite to room "room" of server "LOCAL" with 400 (v1)
| error | state |
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 1 | participant1@LOCAL | participant1-displayname |
Given using server "LOCAL"
When user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
| federated_users | participant2 | 3 |
Then user "participant1" sees the following system messages in room "room" with 200
| room | actorType | actorId | systemMessage | message | messageParameters |
| room | federated_users | participant2@REMOTE | federated_user_added | {federated_user} accepted the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
# Remove a remote user after they joined
When user "participant1" removes remote "participant2" from room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
Then user "participant2" is participant of the following rooms (v4)
Given using server "LOCAL"
When user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
Then user "participant1" sees the following system messages in room "room" with 200
| room | actorType | actorId | systemMessage | message | messageParameters |
| room | users | participant1 | federated_user_removed | You removed {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | federated_users | participant2@REMOTE | federated_user_added | {federated_user} accepted the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
Scenario: Declining an invite
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
When user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
| federated_users | participant2 | 3 |
Then user "participant1" sees the following system messages in room "room" with 200
| room | actorType | actorId | systemMessage | message | messageParameters |
| room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
Then user "participant2" has the following notifications
| app | object_type | object_id | subject | message |
| spreed | remote_talk_share | INVITE_ID(LOCAL::room) | @participant1-displayname invited you to a federated conversation | @participant1-displayname invited you to join room on http://localhost:8080 |
And user "participant2" declines invite to room "room" of server "LOCAL" with 200 (v1)
And user "participant2" declines invite to room "room" of server "LOCAL" with 404 (v1)
| error | invitation |
And user "participant2" has the following invitations (v1)
Given using server "LOCAL"
When user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
Then user "participant1" sees the following system messages in room "room" with 200
| room | actorType | actorId | systemMessage | message | messageParameters |
| room | federated_users | participant2@REMOTE | federated_user_removed | {federated_user} declined the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
Scenario: Remove remote user before they accept
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
When user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
| federated_users | participant2 | 3 |
Then user "participant1" sees the following system messages in room "room" with 200
| room | actorType | actorId | systemMessage | message | messageParameters |
| room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
Given using server "REMOTE"
And force run "OCA\Talk\BackgroundJob\RemoveEmptyRooms" background jobs
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
Then user "participant2" has the following notifications
| app | object_type | object_id | subject | message |
| spreed | remote_talk_share | INVITE_ID(LOCAL::room) | @participant1-displayname invited you to a federated conversation | @participant1-displayname invited you to join room on http://localhost:8080 |
Given using server "LOCAL"
When user "participant1" removes remote "participant2" from room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
Then user "participant2" is participant of the following rooms (v4)
Then user "participant2" has the following notifications
Given using server "LOCAL"
When user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
Then user "participant1" sees the following system messages in room "room" with 200
| room | actorType | actorId | systemMessage | message | messageParameters |
| room | users | participant1 | federated_user_removed | You removed {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"}} |
| room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
Scenario: User leaves after accepting
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
When user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
| federated_users | participant2@{$REMOTE_URL} | 3 |
Then user "participant1" sees the following system messages in room "room" with 200
| room | actorType | actorId | systemMessage | message | messageParameters |
| room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8280","mention-id":"federated_user\/participant2@http:\/\/localhost:8280"}} |
| room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
When user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
| federated_users | participant2@{$REMOTE_URL} | 3 |
Then user "participant1" sees the following system messages in room "room" with 200
| room | actorType | actorId | systemMessage | message | messageParameters |
| room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8280","mention-id":"federated_user\/participant2@http:\/\/localhost:8280"}} |
| room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
And force run "OCA\Talk\BackgroundJob\RemoveEmptyRooms" background jobs
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
Then user "participant2" has the following notifications
| app | object_type | object_id | subject | message |
| spreed | remote_talk_share | INVITE_ID(LOCAL::room) | @participant1-displayname invited you to a federated conversation | @participant1-displayname invited you to join room on http://localhost:8080 |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 3 | LOCAL | room |
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 1 | participant1@LOCAL | participant1-displayname |
# Remote user removes themselves after they joined
And user "participant2" removes themselves from room "LOCAL::room" with 200 (v4)
And user "participant2" has the following invitations (v1)
Then user "participant2" is participant of the following rooms (v4)
And using server "LOCAL"
When user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType |
| users | participant1 | 1 |
Then user "participant1" sees the following system messages in room "room" with 200
| room | actorType | actorId | systemMessage | message | messageParameters |
| room | federated_users | participant2@REMOTE | federated_user_removed | {federated_user} declined the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"http:\/\/localhost:8280","mention-id":"federated_user\/participant2@http:\/\/localhost:8280"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"http:\/\/localhost:8280","mention-id":"federated_user\/participant2@http:\/\/localhost:8280"}} |
| room | federated_users | participant2@REMOTE | federated_user_added | {federated_user} accepted the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"http:\/\/localhost:8280","mention-id":"federated_user\/participant2@http:\/\/localhost:8280"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"http:\/\/localhost:8280","mention-id":"federated_user\/participant2@http:\/\/localhost:8280"}} |
| room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"http:\/\/localhost:8280","mention-id":"federated_user\/participant2@http:\/\/localhost:8280"}} |
| room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
Scenario: Federate conversation meta data
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
Then user "participant2" is participant of the following rooms (v4)
| id | name | type |
| LOCAL::room | room | 2 |
Given using server "LOCAL"
And user "participant1" renames room "room" to "Federated room" with 200 (v4)
Given using server "REMOTE"
Then user "participant2" is participant of the following rooms (v4)
| id | name | type |
| LOCAL::room | Federated room | 2 |
Scenario: Allow accessing conversation and room avatars for invited users
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
When as user "participant2"
Then the room "LOCAL::room" has an avatar with 200
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
When as user "participant2"
Then the room "LOCAL::room" has an avatar with 200
And user "participant2" removes themselves from room "LOCAL::room" with 200 (v4)
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
When as user "participant2"
Then the room "LOCAL::room" has an avatar with 404
@@ -0,0 +1,159 @@
Feature: federation/join-leave
Background:
Given using server "REMOTE"
And user "participant2" exists
And the following "spreed" app config is set
| federation_enabled | yes |
And using server "LOCAL"
And user "participant1" exists
And the following "spreed" app config is set
| federation_enabled | yes |
Scenario: join a group room
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
When using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" joins room "LOCAL::room" with 200 (v4)
Then using server "LOCAL"
And user "participant1" is participant of room "room" (v4)
And user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType | sessionIds |
| users | participant1 | 1 | [SESSION,] |
| federated_users | participant2@{$REMOTE_URL} | 3 | [SESSION#participant2@{$REMOTE_URL},] |
And using server "REMOTE"
And user "participant2" is participant of room "LOCAL::room" (v4)
And user "participant2" sees the following attendees in room "LOCAL::room" with 200 (v4)
| actorType | actorId | participantType | sessionIds |
| federated_users | participant1@{$LOCAL_URL} | 1 | [SESSION,] |
| users | participant2 | 3 | [SESSION#participant2@{$REMOTE_URL},] |
Scenario: join a group room again without leaving it first
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" joins room "LOCAL::room" with 200 (v4)
When user "participant2" joins room "LOCAL::room" with 200 (v4)
Then using server "LOCAL"
And user "participant1" is participant of room "room" (v4)
And user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType | sessionIds |
| users | participant1 | 1 | [SESSION,] |
| federated_users | participant2@{$REMOTE_URL} | 3 | [SESSION#participant2@{$REMOTE_URL},SESSION#participant2@{$REMOTE_URL},] |
And using server "REMOTE"
And user "participant2" is participant of room "LOCAL::room" (v4)
And user "participant2" sees the following attendees in room "LOCAL::room" with 200 (v4)
| actorType | actorId | participantType | sessionIds |
| federated_users | participant1@{$LOCAL_URL} | 1 | [SESSION,] |
| users | participant2 | 3 | [SESSION#participant2@{$REMOTE_URL},SESSION#participant2@{$REMOTE_URL},] |
Scenario: leave a group room
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And using server "LOCAL"
And user "participant1" joins room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" joins room "LOCAL::room" with 200 (v4)
And using server "LOCAL"
And user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType | sessionIds |
| users | participant1 | 1 | [SESSION,] |
| federated_users | participant2@{$REMOTE_URL} | 3 | [SESSION#participant2@{$REMOTE_URL},] |
And using server "REMOTE"
And user "participant2" sees the following attendees in room "LOCAL::room" with 200 (v4)
| actorType | actorId | participantType | sessionIds |
| federated_users | participant1@{$LOCAL_URL} | 1 | [SESSION,] |
| users | participant2 | 3 | [SESSION#participant2@{$REMOTE_URL},] |
When user "participant2" leaves room "LOCAL::room" with 200 (v4)
Then using server "LOCAL"
And user "participant1" is participant of room "room" (v4)
And user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType | sessionIds |
| users | participant1 | 1 | [SESSION,] |
| federated_users | participant2@{$REMOTE_URL} | 3 | [] |
And using server "REMOTE"
And user "participant2" is participant of room "LOCAL::room" (v4)
And user "participant2" sees the following attendees in room "LOCAL::room" with 200 (v4)
| actorType | actorId | participantType | sessionIds |
| federated_users | participant1@{$LOCAL_URL} | 1 | [SESSION,] |
| users | participant2 | 3 | [] |
Scenario: leave a room with the session of another user
Given using server "REMOTE"
And user "participant3" exists
And using server "LOCAL"
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And user "participant1" adds federated_user "participant3" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And user "participant3" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant3" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And user "participant2" joins room "LOCAL::room" with 200 (v4)
And user "participant3" joins room "LOCAL::room" with 200 (v4)
And using server "LOCAL"
And user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType | sessionIds |
| users | participant1 | 1 | [] |
| federated_users | participant2@{$REMOTE_URL} | 3 | [SESSION#participant2@{$REMOTE_URL},] |
| federated_users | participant3@{$REMOTE_URL} | 3 | [SESSION#participant3@{$REMOTE_URL},] |
And using server "REMOTE"
And user "participant2" sees the following attendees in room "LOCAL::room" with 200 (v4)
| actorType | actorId | participantType | sessionIds |
| federated_users | participant1@{$LOCAL_URL} | 1 | [] |
| users | participant2 | 3 | [SESSION#participant2@{$REMOTE_URL},] |
| users | participant3 | 3 | [SESSION#participant3@{$REMOTE_URL},] |
When user "participant2" forges a request for user "participant3" to room "LOCAL::room" with 404 (v4)
And user "participant2" sees the following attendees in room "LOCAL::room" with 200 (v4)
| actorType | actorId | participantType | sessionIds |
| federated_users | participant1@{$LOCAL_URL} | 1 | [] |
| users | participant2 | 3 | [SESSION#participant2@{$REMOTE_URL},] |
| users | participant3 | 3 | [SESSION#participant3@{$REMOTE_URL},] |
Then using server "LOCAL"
And user "participant1" sees the following attendees in room "room" with 200 (v4)
| actorType | actorId | participantType | sessionIds |
| users | participant1 | 1 | [] |
| federated_users | participant2@{$REMOTE_URL} | 3 | [SESSION#participant2@{$REMOTE_URL},] |
| federated_users | participant3@{$REMOTE_URL} | 3 | [SESSION#participant3@{$REMOTE_URL},] |
@@ -0,0 +1,56 @@
Feature: federation/lobby
Background:
Given using server "REMOTE"
And user "participant2" exists
And the following "spreed" app config is set
| federation_enabled | yes |
And using server "LOCAL"
And user "participant1" exists
And the following "spreed" app config is set
| federation_enabled | yes |
Scenario: set lobby state
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room name |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room name | 2 | LOCAL | room |
And using server "LOCAL"
When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4)
Given using server "REMOTE"
Then user "participant2" is participant of room "LOCAL::room" (v4)
| lobbyState |
| 1 |
Scenario: reset lobby state
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
And user "participant2" is participant of room "LOCAL::room" (v4)
| lobbyState |
| 0 |
And using server "LOCAL"
When user "participant1" sets lobby state for room "room" to "non moderators" for 5 seconds with 200 (v4)
Given using server "REMOTE"
And user "participant2" is participant of room "LOCAL::room" (v4)
| lobbyState |
| 1 |
And wait for 10 second
Then user "participant2" is participant of room "LOCAL::room" (v4)
| lobbyState |
| 0 |
@@ -0,0 +1,17 @@
Feature: federation/ocm
Background:
Given user "participant1" exists
Scenario: Check that the OCM resource is not registered when federation is disabled
Given the following "spreed" app config is set
| federation_enabled | no |
Then OCM provider does not have the following resource types
| name | shareTypes | protocols |
| talk-room | ["user"] | {"talk-v1":"/ocs/v2.php/apps/spreed/api/"} |
Scenario: Check that the OCM resource is registered when federation is enabled
Given the following "spreed" app config is set
| federation_enabled | yes |
Given OCM provider has the following resource types
| name | shareTypes | protocols |
| talk-room | ["user"] | {"talk-v1":"/ocs/v2.php/apps/spreed/api/"} |
@@ -0,0 +1,152 @@
Feature: federation/permissions
Background:
Given using server "REMOTE"
And user "participant2" exists
And user "participant3" exists
And the following "spreed" app config is set
| federation_enabled | yes |
And using server "LOCAL"
And user "participant1" exists
And the following "spreed" app config is set
| federation_enabled | yes |
Scenario: set participant permissions
And user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room name |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room name | 2 | LOCAL | room |
Given using server "LOCAL"
And user "participant1" adds federated_user "participant3" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant3" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant3" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room name | 2 | LOCAL | room |
Given using server "LOCAL"
When user "participant1" sets permissions for "participant2@{$REMOTE_URL}" in room "room" to "S" with 200 (v4)
Given using server "REMOTE"
Then user "participant2" is participant of room "LOCAL::room" (v4)
| permissions | attendeePermissions |
| CS | CS |
Then user "participant3" is participant of room "LOCAL::room" (v4)
| permissions | attendeePermissions |
| SJAVPM | D |
Scenario: set default permissions
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room name |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room name | 2 | LOCAL | room |
Given using server "LOCAL"
When user "participant1" sets default permissions for room "room" to "LM" with 200 (v4)
Given using server "REMOTE"
Then user "participant2" is participant of room "LOCAL::room" (v4)
| defaultPermissions | attendeePermissions | permissions |
| CLM | D | CLM |
Scenario: set default permissions before federated user accepts invitation
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room name |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
Given using server "LOCAL"
When user "participant1" sets default permissions for room "room" to "LM" with 200 (v4)
Given using server "REMOTE"
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room name | 2 | LOCAL | room |
Then user "participant2" is participant of room "LOCAL::room" (v4)
| defaultPermissions | attendeePermissions | permissions |
| CLM | D | CLM |
Scenario: set default permissions before inviting federated user
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room name |
When user "participant1" sets default permissions for room "room" to "M" with 200 (v4)
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room name | 2 | LOCAL | room |
Then user "participant2" is participant of room "LOCAL::room" (v4)
| defaultPermissions | attendeePermissions | permissions |
| CM | D | CM |
Scenario: set default permissions before inviting federated user again
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room name |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" declines invite to room "room" of server "LOCAL" with 200 (v1)
Given using server "LOCAL"
When user "participant1" sets default permissions for room "room" to "M" with 200 (v4)
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room name | 2 | LOCAL | room |
Then user "participant2" is participant of room "LOCAL::room" (v4)
| defaultPermissions | attendeePermissions | permissions |
| CM | D | CM |
Scenario: set participant permissions after setting conversation permissions and then invite another federated user
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room name |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room name | 2 | LOCAL | room |
Given using server "LOCAL"
And user "participant1" sets default permissions for room "room" to "AVP" with 200 (v4)
And user "participant1" sets permissions for "participant2@{$REMOTE_URL}" in room "room" to "S" with 200 (v4)
When user "participant1" adds federated_user "participant3" to room "room" with 200 (v4)
Given using server "REMOTE"
And user "participant3" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant3" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room name | 2 | LOCAL | room |
Then user "participant2" is participant of room "LOCAL::room" (v4)
| permissions |
| CS |
And user "participant3" is participant of room "LOCAL::room" (v4)
| permissions |
| CAVP |
@@ -0,0 +1,121 @@
Feature: federation/poll
Background:
Given using server "REMOTE"
And user "participant2" exists
And the following "spreed" app config is set
| federation_enabled | yes |
And using server "LOCAL"
Given user "participant1" exists
And the following "spreed" app config is set
| federation_enabled | yes |
Scenario: Create a public poll without max votes limit
Given the following "spreed" app config is set
| federation_enabled | yes |
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
Then user "participant2" is participant of the following rooms (v4)
| id | type |
| LOCAL::room | 2 |
When user "participant2" creates a poll in room "LOCAL::room" with 201
| question | What is the question? |
| options | ["Where are you?","How much is the fish?"] |
| resultMode | public |
| maxVotes | unlimited |
And using server "LOCAL"
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room | federated_users | participant2@{$REMOTE_URL} | participant2-displayname | {object} | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","server":"{$REMOTE_URL}","mention-id":"federated_user\/participant2@{$REMOTE_URL}"},"object":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} |
And using server "REMOTE"
Then user "participant2" sees poll "What is the question?" in room "LOCAL::room" with 200
| id | POLL_ID(What is the question?) |
| question | What is the question? |
| options | ["Where are you?","How much is the fish?"] |
| votes | [] |
| numVoters | 0 |
| resultMode | public |
| maxVotes | unlimited |
| actorType | users |
| actorId | participant2 |
| actorDisplayName | participant2-displayname |
| status | open |
| votedSelf | not voted |
And using server "LOCAL"
Then user "participant1" votes for options "[1]" on poll "What is the question?" in room "room" with 200
| id | POLL_ID(What is the question?) |
| question | What is the question? |
| options | ["Where are you?","How much is the fish?"] |
| votes | {"option-1":1} |
| numVoters | 1 |
| resultMode | public |
| maxVotes | unlimited |
| actorType | federated_users |
| actorId | participant2@{$REMOTE_URL} |
| actorDisplayName | participant2-displayname |
| status | open |
| votedSelf | [1] |
Then user "participant1" sees poll "What is the question?" in room "room" with 200
| id | POLL_ID(What is the question?) |
| question | What is the question? |
| options | ["Where are you?","How much is the fish?"] |
| votes | {"option-1":1} |
| numVoters | 1 |
| resultMode | public |
| maxVotes | unlimited |
| actorType | federated_users |
| actorId | participant2@{$REMOTE_URL} |
| actorDisplayName | participant2-displayname |
| status | open |
| votedSelf | [1] |
And using server "REMOTE"
Then user "participant2" sees poll "What is the question?" in room "LOCAL::room" with 200
| id | POLL_ID(What is the question?) |
| question | What is the question? |
| options | ["Where are you?","How much is the fish?"] |
| votes | [] |
| numVoters | 1 |
| resultMode | public |
| maxVotes | unlimited |
| actorType | users |
| actorId | participant2 |
| actorDisplayName | participant2-displayname |
| status | open |
| votedSelf | not voted |
Then user "participant2" closes poll "What is the question?" in room "LOCAL::room" with 200
| id | POLL_ID(What is the question?) |
| question | What is the question? |
| options | ["Where are you?","How much is the fish?"] |
| votes | {"option-1":1} |
| numVoters | 1 |
| resultMode | public |
| maxVotes | unlimited |
| actorType | users |
| actorId | participant2 |
| actorDisplayName | participant2-displayname |
| status | closed |
| votedSelf | not voted |
| details | [{"actorType":"federated_users","actorId":"participant1@{$LOCAL_URL}","actorDisplayName":"participant1-displayname","optionId":1}] |
And using server "LOCAL"
Then user "participant1" sees poll "What is the question?" in room "room" with 200
| id | POLL_ID(What is the question?) |
| question | What is the question? |
| options | ["Where are you?","How much is the fish?"] |
| votes | {"option-1":1} |
| numVoters | 1 |
| resultMode | public |
| maxVotes | unlimited |
| actorType | federated_users |
| actorId | participant2@{$REMOTE_URL} |
| actorDisplayName | participant2-displayname |
| status | closed |
| votedSelf | [1] |
| details | [{"actorType":"users","actorId":"participant1","actorDisplayName":"participant1-displayname","optionId":1}] |
@@ -0,0 +1,87 @@
Feature: federation/reminder
Background:
Given using server "REMOTE"
And user "participant2" exists
And the following "spreed" app config is set
| federation_enabled | yes |
And using server "LOCAL"
Given user "participant1" exists
And the following "spreed" app config is set
| federation_enabled | yes |
Scenario: Get mention suggestions (translating local users to federated users)
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" sends message "Message 1" to room "room" with 201
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
Then user "participant2" is participant of the following rooms (v4)
| id | type |
| LOCAL::room | 2 |
And user "participant2" joins room "LOCAL::room" with 200 (v4)
And user "participant2" leaves room "LOCAL::room" with 200 (v4)
And user "participant2" sends message "Message 2" to room "LOCAL::room" with 201
When using server "LOCAL"
And user "participant1" sets reminder for message "Message 2" in room "room" for time 2133349024 with 201 (v1)
And using server "REMOTE"
And user "participant2" sets reminder for message "Message 1" in room "LOCAL::room" for time 1234567 with 201 (v1)
And using server "LOCAL"
And user "participant1" has the following notifications
| app | object_type | object_id | subject |
And using server "REMOTE"
And user "participant2" has the following notifications
| app | object_type | object_id | subject |
And force run "OCA\Talk\BackgroundJob\Reminder" background jobs
And using server "LOCAL"
And force run "OCA\Talk\BackgroundJob\Reminder" background jobs
Then user "participant1" has the following notifications
| app | object_type | object_id | subject |
And using server "REMOTE"
And user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | reminder | LOCAL::room/Message 1 | Reminder: participant1-displayname in conversation room |
# Participant1 sets timestamp to past so it should trigger now
When using server "LOCAL"
And user "participant1" sets reminder for message "Message 2" in room "room" for time 1234567 with 201 (v1)
And force run "OCA\Talk\BackgroundJob\Reminder" background jobs
Then user "participant1" has the following notifications
| app | object_type | object_id | subject |
| spreed | reminder | room/Message 2 | Reminder: participant2-displayname in conversation room |
When using server "REMOTE"
And force run "OCA\Talk\BackgroundJob\Reminder" background jobs
And user "participant2" deletes reminder for message "Message 1" in room "LOCAL::room" with 200 (v1)
And user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: Deleting reminder before the job is executed never triggers a notification
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" sends message "Message 1" to room "room" with 201
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
Then user "participant2" is participant of the following rooms (v4)
| id | type |
| LOCAL::room | 2 |
And user "participant2" joins room "LOCAL::room" with 200 (v4)
And user "participant2" leaves room "LOCAL::room" with 200 (v4)
When user "participant2" sets reminder for message "Message 1" in room "LOCAL::room" for time 1234567 with 201 (v1)
And user "participant2" deletes reminder for message "Message 1" in room "LOCAL::room" with 200 (v1)
And user "participant2" has the following notifications
| app | object_type | object_id | subject |
And force run "OCA\Talk\BackgroundJob\Reminder" background jobs
And user "participant2" has the following notifications
| app | object_type | object_id | subject |
@@ -0,0 +1,40 @@
Feature: federation/user-statuses
Background:
Given using server "REMOTE"
And user "participant2" exists
And user "participant3" exists
And the following "spreed" app config is set
| federation_enabled | yes |
And using server "LOCAL"
And user "participant1" exists
And the following "spreed" app config is set
| federation_enabled | yes |
Scenario: User statuses are added to the participant request in federated conversations
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4)
And user "participant1" adds federated_user "participant3" to room "room" with 200 (v4)
And using server "REMOTE"
And user "participant2" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
Then user "participant2" set status to "away" with 200 (v1)
And user "participant3" has the following invitations (v1)
| remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
| LOCAL | room | 0 | participant1@LOCAL | participant1-displayname |
And user "participant3" accepts invite to room "room" of server "LOCAL" with 200 (v1)
| id | name | type | remoteServer | remoteToken |
| LOCAL::room | room | 2 | LOCAL | room |
Then user "participant3" set status to "dnd" with 200 (v1)
And user "participant2" is participant of room "LOCAL::room" (v4)
And user "participant2" sees the following attendees with status in room "LOCAL::room" with 200 (v4)
| actorType | actorId | participantType | status |
| federated_users | participant1@{$LOCAL_URL} | 1 | ABSENT |
| users | participant2 | 3 | away |
| users | participant3 | 3 | dnd |