summaryrefslogtreecommitdiffstats
path: root/tests/integration
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2024-03-15 15:45:10 +0100
committerJoas Schilling <coding@schilljs.com>2024-03-15 15:45:31 +0100
commitfc53de1c21587f2d388adca6dd015c6dc9c283a5 (patch)
treee69f2e627c956e17951e6590ad76f6af1e9ee4f8 /tests/integration
parent7736524344560a378922c573f04485bc84eef4ce (diff)
fix(federation): Don't trigger notifications for own messages
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/integration')
-rw-r--r--tests/integration/features/federation/chat.feature35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/integration/features/federation/chat.feature b/tests/integration/features/federation/chat.feature
index b56078ce2..30b1a25ba 100644
--- a/tests/integration/features/federation/chat.feature
+++ b/tests/integration/features/federation/chat.feature
@@ -281,6 +281,41 @@ Feature: federation/chat
| app | object_type | object_id | subject | message |
| spreed | chat | 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 the following "spreed" app config is set
+ | federation_enabled | yes |
+ 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 user "participant2" has the following invitations (v1)
+ | remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
+ | LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname |
+ And user "participant2" accepts invite to room "room" of server "LOCAL" with 200 (v1)
+ | id | name | type | remoteServer | remoteToken |
+ | room | room | 3 | LOCAL | room |
+ Then user "participant2" is participant of the following rooms (v4)
+ | id | type |
+ | room | 3 |
+ And user "participant1" adds federated_user "participant3" to room "room" with 200 (v4)
+ And user "participant3" has the following invitations (v1)
+ | remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName |
+ | LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname |
+ And user "participant3" accepts invite to room "room" of server "LOCAL" with 200 (v1)
+ | id | name | type | remoteServer | remoteToken |
+ | room | room | 3 | LOCAL | room |
+ Then user "participant3" is participant of the following rooms (v4)
+ | id | type |
+ | 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 "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: Reaction on federated chat messages
Given the following "spreed" app config is set
| federation_enabled | yes |