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,277 @@
Feature: chat/delete
Background:
Given user "participant1" exists
Given user "participant2" exists
Scenario: moderator deletes their own message
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "group room" with 200 (v4)
And user "participant1" sends message "Message 1" to room "group room" with 201
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant1 | participant1-displayname | Message 1 | [] | |
Then user "participant2" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant1 | participant1-displayname | Message 1 | [] | |
And user "participant1" deletes message "Message 1" from room "group room" with 200
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant1 | participant1-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | |
Then user "participant2" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant1 | participant1-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | |
Then user "participant1" received a system messages in room "group room" to delete "Message 1"
Then user "participant2" received a system messages in room "group room" to delete "Message 1"
Scenario: user deletes their own message
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "group room" with 200 (v4)
And user "participant2" sends message "Message 1" to room "group room" with 201
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant2 | participant2-displayname | Message 1 | [] | |
Then user "participant2" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant2 | participant2-displayname | Message 1 | [] | |
And user "participant2" deletes message "Message 1" from room "group room" with 200
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant2 | participant2-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | |
Then user "participant2" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | |
Then user "participant1" received a system messages in room "group room" to delete "Message 1"
Then user "participant2" received a system messages in room "group room" to delete "Message 1"
Scenario: user cannot delete without chat permission
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "group room" with 200 (v4)
And user "participant2" sends message "Message 1" to room "group room" with 201
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant2 | participant2-displayname | Message 1 | [] | |
# Removing chat permission only
Then user "participant1" sets permissions for "participant2" in room "group room" to "CSJLAVP" with 200 (v4)
And user "participant2" deletes message "Message 1" from room "group room" with 403
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant2 | participant2-displayname | Message 1 | [] | |
Scenario: moderator deletes other user message
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "group room" with 200 (v4)
And user "participant2" sends message "Message 1" to room "group room" with 201
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant2 | participant2-displayname | Message 1 | [] | |
And user "participant1" deletes message "Message 1" from room "group room" with 200
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | |
Then user "participant2" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant2 | participant2-displayname | Message deleted by {actor} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | |
Then user "participant1" received a system messages in room "group room" to delete "Message 1"
Then user "participant2" received a system messages in room "group room" to delete "Message 1"
Scenario: moderator deletes their own message which got replies
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "group room" with 200 (v4)
And user "participant2" sends message "Message 1" to room "group room" with 201
When user "participant1" sends reply "Message 1-1" on message "Message 1" to room "group room" with 201
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant1 | participant1-displayname | Message 1-1 | [] | Message 1 |
| group room | users | participant2 | participant2-displayname | Message 1 | [] | |
Then user "participant2" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant1 | participant1-displayname | Message 1-1 | [] | Message 1 |
| group room | users | participant2 | participant2-displayname | Message 1 | [] | |
And user "participant1" deletes message "Message 1" from room "group room" with 200
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant1 | participant1-displayname | Message 1-1 | [] | Message deleted by you |
| group room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | |
Then user "participant2" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant1 | participant1-displayname | Message 1-1 | [] | Message deleted by {actor} |
| group room | users | participant2 | participant2-displayname | Message deleted by {actor} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | |
Then user "participant1" received a system messages in room "group room" to delete "Message 1"
Then user "participant2" received a system messages in room "group room" to delete "Message 1"
Scenario: user deletes their own message which got replies
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "group room" with 200 (v4)
And user "participant2" sends message "Message 1" to room "group room" with 201
When user "participant1" sends reply "Message 1-1" on message "Message 1" to room "group room" with 201
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant1 | participant1-displayname | Message 1-1 | [] | Message 1 |
| group room | users | participant2 | participant2-displayname | Message 1 | [] | |
Then user "participant2" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant1 | participant1-displayname | Message 1-1 | [] | Message 1 |
| group room | users | participant2 | participant2-displayname | Message 1 | [] | |
And user "participant2" deletes message "Message 1" from room "group room" with 200
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant1 | participant1-displayname | Message 1-1 | [] | Message deleted by author |
| group room | users | participant2 | participant2-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | |
Then user "participant2" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant1 | participant1-displayname | Message 1-1 | [] | Message deleted by you |
| group room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | |
Then user "participant1" received a system messages in room "group room" to delete "Message 1"
Then user "participant2" received a system messages in room "group room" to delete "Message 1"
Scenario: moderator deletes other user message
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "group room" with 200 (v4)
And user "participant2" sends message "Message 1" to room "group room" with 201
When user "participant1" sends reply "Message 1-1" on message "Message 1" to room "group room" with 201
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant1 | participant1-displayname | Message 1-1 | [] | Message 1 |
| group room | users | participant2 | participant2-displayname | Message 1 | [] | |
Then user "participant2" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant1 | participant1-displayname | Message 1-1 | [] | Message 1 |
| group room | users | participant2 | participant2-displayname | Message 1 | [] | |
And user "participant1" deletes message "Message 1" from room "group room" with 200
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant1 | participant1-displayname | Message 1-1 | [] | Message deleted by you |
| group room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | |
Then user "participant2" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| group room | users | participant1 | participant1-displayname | Message 1-1 | [] | Message deleted by {actor} |
| group room | users | participant2 | participant2-displayname | Message deleted by {actor} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | |
Then user "participant1" received a system messages in room "group room" to delete "Message 1"
Then user "participant2" received a system messages in room "group room" to delete "Message 1"
Scenario: Can only delete own messages in one-to-one
Given user "participant1" creates room "room1" (v4)
| roomType | 1 |
| invite | participant2 |
And user "participant1" sends message "Message 1" to room "room1" with 201
And user "participant2" sends message "Message 2" to room "room1" with 201
Then user "participant1" sees the following messages in room "room1" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room1 | users | participant2 | participant2-displayname | Message 2 | [] |
| room1 | users | participant1 | participant1-displayname | Message 1 | [] |
Then user "participant2" sees the following messages in room "room1" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room1 | users | participant2 | participant2-displayname | Message 2 | [] |
| room1 | users | participant1 | participant1-displayname | Message 1 | [] |
And user "participant1" deletes message "Message 2" from room "room1" with 403
And user "participant2" deletes message "Message 1" from room "room1" with 403
Then user "participant1" sees the following messages in room "room1" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room1 | users | participant2 | participant2-displayname | Message 2 | [] |
| room1 | users | participant1 | participant1-displayname | Message 1 | [] |
And user "participant1" deletes message "Message 1" from room "room1" with 200
And user "participant2" deletes message "Message 2" from room "room1" with 200
Then user "participant1" sees the following messages in room "room1" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room1 | users | participant2 | participant2-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} |
| room1 | users | participant1 | participant1-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
Then user "participant2" sees the following messages in room "room1" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room1 | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} |
| room1 | users | participant1 | participant1-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
Scenario: A deleted ping does not mark the conversation as mentioned (if it was the only thing)
Given user "participant3" exists
Given user "participant1" creates room "room1" (v4)
| roomType | 2 |
| roomName | room1 |
And user "participant1" adds user "participant2" to room "room1" with 200 (v4)
And user "participant1" adds user "participant3" to room "room1" with 200 (v4)
And user "participant1" sends message "Message 1 @participant2 @participant3" to room "room1" with 201
And user "participant2" is participant of the following rooms (v4)
| id | type | lastReadMessage | unreadMessages | unreadMention |
| room1 | 2 | UNKNOWN_MESSAGE | 1 | 1 |
And user "participant3" is participant of the following rooms (v4)
| id | type | lastReadMessage | unreadMessages | unreadMention |
| room1 | 2 | UNKNOWN_MESSAGE | 1 | 1 |
When user "participant2" reads message "Message 1 @participant2 @participant3" in room "room1" with 200
Given user "participant1" sends message "Message 2 @participant2 @participant3" to room "room1" with 201
Then user "participant2" is participant of the following rooms (v4)
| id | type | lastReadMessage | unreadMessages | unreadMention |
| room1 | 2 | Message 1 @participant2 @participant3 | 1 | 1 |
Then user "participant3" is participant of the following rooms (v4)
| id | type | lastReadMessage | unreadMessages | unreadMention |
| room1 | 2 | UNKNOWN_MESSAGE | 2 | 1 |
When user "participant1" deletes message "Message 2 @participant2 @participant3" from room "room1" with 200
Then user "participant2" is participant of the following rooms (v4)
| id | type | lastReadMessage | unreadMessages | unreadMention |
| room1 | 2 | Message 1 @participant2 @participant3 | 0 | 0 |
Then user "participant3" is participant of the following rooms (v4)
| id | type | lastReadMessage | unreadMessages | unreadMention |
| room1 | 2 | UNKNOWN_MESSAGE | 1 | 1 |
Scenario: Clear chat history as a moderator
Given user "participant1" creates room "room1" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room1" with 200 (v4)
And user "participant1" sends message "Message 1" to room "room1" with 201
And user "participant2" sends message "Message 2" to room "room1" with 201
Then user "participant1" sees the following messages in room "room1" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room1 | users | participant2 | participant2-displayname | Message 2 | [] |
| room1 | users | participant1 | participant1-displayname | Message 1 | [] |
Then user "participant2" sees the following messages in room "room1" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room1 | users | participant2 | participant2-displayname | Message 2 | [] |
| room1 | users | participant1 | participant1-displayname | Message 1 | [] |
And user "participant2" deletes chat history for room "room1" with 403
Then user "participant1" sees the following messages in room "room1" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room1 | users | participant2 | participant2-displayname | Message 2 | [] |
| room1 | users | participant1 | participant1-displayname | Message 1 | [] |
Then user "participant1" is participant of room "room1" (v4)
| unreadMessages | lastReadMessage |
| 1 | Message 1 |
Then user "participant2" is participant of room "room1" (v4)
| unreadMessages | lastReadMessage |
| 0 | Message 2 |
And user "participant1" deletes chat history for room "room1" with 200
Then user "participant1" is participant of room "room1" (v4)
| unreadMessages | lastReadMessage |
| 1 | FIRST_MESSAGE_UNREAD |
Then user "participant2" is participant of room "room1" (v4)
| unreadMessages | lastReadMessage |
| 1 | FIRST_MESSAGE_UNREAD |
Then user "participant1" sees the following messages in room "room1" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
Then user "participant1" sees the following system messages in room "room1" with 200 (v1)
| room | actorType | actorId | actorDisplayName | systemMessage |
| room1 | users | participant1 | participant1-displayname | history_cleared |
Then user "participant2" sees the following system messages in room "room1" with 200 (v1)
| room | actorType | actorId | actorDisplayName | systemMessage |
| room1 | users | participant1 | participant1-displayname | history_cleared |
Scenario: Can delete chat history in one-to-one conversations when config is set
Given user "participant1" creates room "room" with 201 (v4)
| roomType | 1 |
| invite | participant2 |
And user "participant1" sends message "Message" to room "room" with 201
Then user "participant1" deletes chat history for room "room" with 403
When the following "spreed" app config is set
| delete_one_to_one_conversations | 1 |
Then user "participant1" deletes chat history for room "room" with 200
@@ -0,0 +1,228 @@
Feature: chat-1/edit-message
Background:
Given user "participant1" exists
Given user "participant2" exists
Scenario: Moderator edits their own message
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
And user "participant1" sends message "Message 1" to room "room" with 201
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| room | users | participant1 | participant1-displayname | Message 1 | [] | |
And user "participant1" edits message "Message 1" in room "room" to "Message 1 - Edit 1" with 200
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| room | users | participant1 | participant1-displayname | Message 1 - Edit 1 | [] | |
Then user "participant2" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| room | users | participant1 | participant1-displayname | Message 1 - Edit 1 | [] | |
And user "participant2" edits message "Message 1 - Edit 1" in room "room" to "Message 1 - Edit 2" with 403
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| room | users | participant1 | participant1-displayname | Message 1 - Edit 1 | [] | |
Then user "participant2" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| room | users | participant1 | participant1-displayname | Message 1 - Edit 1 | [] | |
Scenario: User and moderator edit user message
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
And user "participant2" sends message "Message 1" to room "room" with 201
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| room | users | participant2 | participant2-displayname | Message 1 | [] | |
And user "participant1" edits message "Message 1" in room "room" to "Message 1 - Edit 1" with 200
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | lastEditActorType | lastEditActorId | lastEditActorDisplayName |
| room | users | participant2 | participant2-displayname | Message 1 - Edit 1 | [] | | users | participant1 | participant1-displayname |
Then user "participant2" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | lastEditActorType | lastEditActorId | lastEditActorDisplayName |
| room | users | participant2 | participant2-displayname | Message 1 - Edit 1 | [] | | users | participant1 | participant1-displayname |
And user "participant2" edits message "Message 1 - Edit 1" in room "room" to "Message 1 - Edit 2" with 200
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | lastEditActorType | lastEditActorId | lastEditActorDisplayName |
| room | users | participant2 | participant2-displayname | Message 1 - Edit 2 | [] | | users | participant2 | participant2-displayname |
Then user "participant2" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | lastEditActorType | lastEditActorId | lastEditActorDisplayName |
| room | users | participant2 | participant2-displayname | Message 1 - Edit 2 | [] | | users | participant2 | participant2-displayname |
And user "participant2" edits message "Message 1 - Edit 1" in room "room" to "" with 400
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | lastEditActorType | lastEditActorId | lastEditActorDisplayName |
| room | users | participant2 | participant2-displayname | Message 1 - Edit 2 | [] | | users | participant2 | participant2-displayname |
When user "participant2" is deleted
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | lastEditActorType | lastEditActorId | lastEditActorDisplayName |
| room | deleted_users | deleted_users | | Message 1 - Edit 2 | [] | | deleted_users | deleted_users | |
When aging messages 6 hours in room "room"
And user "participant1" edits message "Message 1 - Edit 1" in room "room" to "Message 1 - Edit 2" with 200
When aging messages 24 hours in room "room"
And user "participant1" edits message "Message 1 - Edit 2" in room "room" to "Message 1 - Edit Too old" with 400
| error | age |
Scenario: Editing a caption
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" shares "welcome.txt" with room "room"
| talkMetaData | {"caption":"Caption 1"} |
And user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room | users | participant1 | participant1-displayname | Caption 1 | "IGNORE" |
When user "participant1" edits message "Caption 1" in room "room" to "Caption 1 - Edit 1" with 200
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room | users | participant1 | participant1-displayname | Caption 1 - Edit 1 | "IGNORE" |
When user "participant1" edits message "Caption 1" in room "room" to "" with 400
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room | users | participant1 | participant1-displayname | Caption 1 - Edit 1 | "IGNORE" |
Scenario: Notification handling - None vs Direct mention
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
And user "participant2" sends message "Message 1" to room "room" with 201
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room | users | participant2 | participant2-displayname | Message 1 | [] |
Then user "participant1" is participant of the following rooms (v4)
| id | unreadMessages | unreadMention | unreadMentionDirect |
| room | 1 | 0 | 0 |
Then user "participant1" has the following notifications
And user "participant2" edits message "Message 1" in room "room" to "Message 1 - Edit @participant1" with 200
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room | users | participant2 | participant2-displayname | Message 1 - Edit {mention-user1} | {"mention-user1":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
Then user "participant1" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Message 1 - Edit {mention-user1} | participant2-displayname mentioned you in conversation room |
Then user "participant1" is participant of the following rooms (v4)
| id | unreadMessages | unreadMention | unreadMentionDirect |
| room | 1 | 1 | 1 |
And user "participant2" edits message "Message 1" in room "room" to "Message 1 - Edit 2" with 200
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room | users | participant2 | participant2-displayname | Message 1 - Edit 2 | [] |
Then user "participant1" has the following notifications
Then user "participant1" is participant of the following rooms (v4)
| id | unreadMessages | unreadMention | unreadMentionDirect |
| room | 1 | 1 | 1 |
Scenario: Notification handling - None vs All
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
And user "participant2" sends message "Message 1" to room "room" with 201
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room | users | participant2 | participant2-displayname | Message 1 | [] |
Then user "participant1" has the following notifications
Then user "participant1" is participant of the following rooms (v4)
| id | unreadMessages | unreadMention | unreadMentionDirect |
| room | 1 | 0 | 0 |
And user "participant2" edits message "Message 1" in room "room" to "Message 1 - Edit @all" with 200
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room | users | participant2 | participant2-displayname | Message 1 - Edit {mention-call1} | "IGNORE" |
Then user "participant1" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Message 1 - Edit {mention-call1} | participant2-displayname mentioned everyone in conversation room |
Then user "participant1" is participant of the following rooms (v4)
| id | unreadMessages | unreadMention | unreadMentionDirect |
| room | 1 | 1 | 0 |
And user "participant2" edits message "Message 1" in room "room" to "Message 1 - Edit 2" with 200
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room | users | participant2 | participant2-displayname | Message 1 - Edit 2 | [] |
Then user "participant1" has the following notifications
Then user "participant1" is participant of the following rooms (v4)
| id | unreadMessages | unreadMention | unreadMentionDirect |
| room | 1 | 1 | 0 |
Scenario: Notification handling - Direct mention vs All
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
And user "participant2" sends message "Message 1 - @participant1" to room "room" with 201
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room | users | participant2 | participant2-displayname | Message 1 - {mention-user1} | {"mention-user1":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
Then user "participant1" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Message 1 - {mention-user1} | participant2-displayname mentioned you in conversation room |
Then user "participant1" is participant of the following rooms (v4)
| id | unreadMessages | unreadMention | unreadMentionDirect |
| room | 1 | 1 | 1 |
And user "participant2" edits message "Message 1 - @participant1" in room "room" to "Message 1 - Edit @all" with 200
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room | users | participant2 | participant2-displayname | Message 1 - Edit {mention-call1} | "IGNORE" |
Then user "participant1" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Message 1 - Edit {mention-call1} | participant2-displayname mentioned you in conversation room |
Then user "participant1" is participant of the following rooms (v4)
| id | unreadMessages | unreadMention | unreadMentionDirect |
| room | 1 | 1 | 1 |
And user "participant2" edits message "Message 1 - @participant1" in room "room" to "Message 1 - Edit @participant1" with 200
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room | users | participant2 | participant2-displayname | Message 1 - Edit {mention-user1} | {"mention-user1":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
Then user "participant1" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Message 1 - Edit {mention-user1} | participant2-displayname mentioned you in conversation room |
Then user "participant1" is participant of the following rooms (v4)
| id | unreadMessages | unreadMention | unreadMentionDirect |
| room | 1 | 1 | 1 |
Scenario: Notification handling - All vs Direct mention
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
And user "participant2" sends message "Message 1 - @all" to room "room" with 201
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room | users | participant2 | participant2-displayname | Message 1 - {mention-call1} | "IGNORE" |
Then user "participant1" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Message 1 - {mention-call1} | participant2-displayname mentioned everyone in conversation room |
Then user "participant1" is participant of the following rooms (v4)
| id | unreadMessages | unreadMention | unreadMentionDirect |
| room | 1 | 1 | 0 |
And user "participant2" edits message "Message 1 - @all" in room "room" to "Message 1 - Edit @participant1" with 200
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room | users | participant2 | participant2-displayname | Message 1 - Edit {mention-user1} | {"mention-user1":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
Then user "participant1" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Message 1 - Edit {mention-user1} | participant2-displayname mentioned everyone in conversation room |
Then user "participant1" is participant of the following rooms (v4)
| id | unreadMessages | unreadMention | unreadMentionDirect |
| room | 1 | 1 | 1 |
And user "participant2" edits message "Message 1 - Edit @participant1" in room "room" to "Message 1 - Edit @all" with 200
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room | users | participant2 | participant2-displayname | Message 1 - Edit {mention-call1} | "IGNORE" |
Then user "participant1" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Message 1 - Edit {mention-call1} | participant2-displayname mentioned everyone in conversation room |
Then user "participant1" is participant of the following rooms (v4)
| id | unreadMessages | unreadMention | unreadMentionDirect |
| room | 1 | 1 | 1 |
@@ -0,0 +1,123 @@
Feature: chat/file-share
Background:
Given user "participant1" exists
Given user "participant2" exists
Scenario: Share a file to a chat
Given user "participant1" creates room "public room" (v4)
| roomType | 3 |
| roomName | room |
When user "participant1" shares "welcome.txt" with room "public room"
Then user "participant1" sees the following messages in room "public room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| public room | users | participant1 | participant1-displayname | {file} | "IGNORE" |
Scenario: Share a file with meta data to a chat (like the mobile clients do)
Given user "participant1" creates room "public room" (v4)
| roomType | 3 |
| roomName | room |
When user "participant1" shares "welcome.txt" with room "public room"
| talkMetaData | {"mimetype":"text/plain","messageType":""} |
Then user "participant1" sees the following messages in room "public room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| public room | users | participant1 | participant1-displayname | {file} | "IGNORE" |
Scenario: Share a file with caption
Given user "participant1" creates room "public room" (v4)
| roomType | 3 |
| roomName | room |
When user "participant1" shares "welcome.txt" with room "public room"
| talkMetaData | {"caption":"Hello @participant2 this is a caption for the attached document"} |
Then user "participant1" sees the following messages in room "public room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| public room | users | participant1 | participant1-displayname | Hello {mention-user1} this is a caption for the attached document | "IGNORE" |
Scenario: Share a file with caption that only is a mention
Given user "participant1" creates room "public room" (v4)
| roomType | 3 |
| roomName | room |
When user "participant1" shares "welcome.txt" with room "public room"
| talkMetaData | {"caption":"@participant2"} |
Then user "participant1" sees the following messages in room "public room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| public room | users | participant1 | participant1-displayname | {mention-user1} | "IGNORE" |
Scenario: Captioned message as a reply
Given user "participant1" creates room "public room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds user "participant2" to room "public room" with 200 (v4)
And user "participant2" sends message "Message 1" to room "public room" with 201
Then user "participant1" sees the following messages in room "public room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| public room | users | participant2 | participant2-displayname | Message 1 | [] | |
When user "participant1" shares "welcome.txt" with room "public room"
| talkMetaData.caption | @participant2 |
| talkMetaData.replyTo | Message 1 |
Then user "participant1" sees the following messages in room "public room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| public room | users | participant1 | participant1-displayname | {mention-user1} | "IGNORE" | Message 1 |
| public room | users | participant2 | participant2-displayname | Message 1 | [] | |
Scenario: Captioned message can not reply cross chats
Given user "participant1" creates room "room1" (v4)
| roomType | 3 |
| roomName | room |
Given user "participant1" creates room "room2" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room1" with 200 (v4)
And user "participant2" sends message "Message 1" to room "room1" with 201
Then user "participant1" sees the following messages in room "room1" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| room1 | users | participant2 | participant2-displayname | Message 1 | [] | |
When user "participant1" shares "welcome.txt" with room "room2"
| talkMetaData.caption | @participant2 |
| talkMetaData.replyTo | Message 1 |
Then user "participant1" sees the following messages in room "room1" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| room1 | users | participant2 | participant2-displayname | Message 1 | [] | |
Then user "participant1" sees the following messages in room "room2" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| room2 | users | participant1 | participant1-displayname | {mention-user1} | "IGNORE" | |
Scenario: Can not share a file without chat permission
Given user "participant1" creates room "public room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds user "participant2" to room "public room" with 200 (v4)
# Removing chat permission only
Then user "participant1" sets permissions for "participant2" in room "public room" to "CSJLAVP" with 200 (v4)
When user "participant2" shares "welcome.txt" with room "public room"
And the OCS status code should be 404
Then user "participant1" sees the following messages in room "public room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
Scenario: Delete share a file message from a chat
Given user "participant1" creates room "public room" (v4)
| roomType | 3 |
| roomName | room |
When user "participant1" shares "welcome.txt" with room "public room"
Then user "participant1" sees the following messages in room "public room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| public room | users | participant1 | participant1-displayname | {file} | "IGNORE" |
And user "participant1" deletes message "shared::file::welcome.txt" from room "public room" with 200
Then user "participant1" sees the following messages in room "public room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| public room | users | participant1 | participant1-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
Scenario: Can not delete a share file message without chat permission
Given user "participant1" creates room "public room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds user "participant2" to room "public room" with 200 (v4)
When user "participant2" shares "welcome.txt" with room "public room"
Then user "participant1" sees the following messages in room "public room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| public room | users | participant2 | participant2-displayname | {file} | "IGNORE" |
# Removing chat permission only
Then user "participant1" sets permissions for "participant2" in room "public room" to "CSJLAVP" with 200 (v4)
And user "participant2" deletes message "shared::file::welcome.txt" from room "public room" with 403
Then user "participant1" sees the following messages in room "public room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| public room | users | participant2 | participant2-displayname | {file} | "IGNORE" |
@@ -0,0 +1,58 @@
Feature: chat/group-read-only
Background:
Given user "participant1" exists
Given user "participant2" exists
Given user "participant3" exists
And group "attendees1" exists
And user "participant2" is member of group "attendees1"
Scenario: owner can send and receive chat messages to and from group room
Given signaling server is started
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| invite | attendees1 |
When user "participant1" sends message "Message 1" to room "group room" with 201
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| group room | users | participant1 | participant1-displayname | Message 1 | [] |
And reset signaling server requests
When user "participant1" locks room "group room" with 200 (v4)
Then signaling server received the following requests
| token | data |
| group room | {"type":"message","message":{"data":{"type":"chat","chat":{"refresh":true}}}} |
| group room | {"type":"update","update":{"userids":["participant1","participant2"],"properties":{"name":"Private conversation","type":2,"lobby-state":0,"lobby-timer":null,"read-only":1,"listable":0,"active-since":null,"sip-enabled":0,"description":""}}} |
When user "participant1" sends message "Message 2" to room "group room" with 403
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| group room | users | participant1 | participant1-displayname | Message 1 | [] |
And reset signaling server requests
When user "participant1" unlocks room "group room" with 200 (v4)
Then signaling server received the following requests
| token | data |
| group room | {"type":"message","message":{"data":{"type":"chat","chat":{"refresh":true}}}} |
| group room | {"type":"update","update":{"userids":["participant1","participant2"],"properties":{"name":"Private conversation","type":2,"lobby-state":0,"lobby-timer":null,"read-only":0,"listable":0,"active-since":null,"sip-enabled":0,"description":""}}} |
When user "participant1" sends message "Message 3" to room "group room" with 201
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| group room | users | participant1 | participant1-displayname | Message 3 | [] |
| group room | users | participant1 | participant1-displayname | Message 1 | [] |
Scenario: invited user can send and receive chat messages to and from group room
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| invite | attendees1 |
When user "participant2" sends message "Message 1" to room "group room" with 201
Then user "participant2" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| group room | users | participant2 | participant2-displayname | Message 1 | [] |
When user "participant1" locks room "group room" with 200 (v4)
When user "participant2" sends message "Message 2" to room "group room" with 403
Then user "participant2" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| group room | users | participant2 | participant2-displayname | Message 1 | [] |
When user "participant1" unlocks room "group room" with 200 (v4)
When user "participant2" sends message "Message 3" to room "group room" with 201
Then user "participant2" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| group room | users | participant2 | participant2-displayname | Message 3 | [] |
| group room | users | participant2 | participant2-displayname | Message 1 | [] |
@@ -0,0 +1,70 @@
Feature: chat/group
Background:
Given user "participant1" exists
Given user "participant2" exists
Given user "participant3" exists
And group "attendees1" exists
And user "participant2" is member of group "attendees1"
Scenario: owner can send and receive chat messages to and from group room
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| invite | attendees1 |
When user "participant1" sends message "Message 1" to room "group room" with 201
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| group room | users | participant1 | participant1-displayname | Message 1 | [] |
Scenario: invited user can send and receive chat messages to and from group room
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| invite | attendees1 |
When user "participant2" sends message "Message 1" to room "group room" with 201
Then user "participant2" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| group room | users | participant2 | participant2-displayname | Message 1 | [] |
Scenario: invited user can not send without chat permissions
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| invite | attendees1 |
# Removing chat permission only
Then user "participant1" sets permissions for "participant2" in room "group room" to "CSJLAVP" with 200 (v4)
When user "participant2" sends message "Message 1" to room "group room" with 403
When user "participant1" sends message "Message 2" to room "group room" with 201
Then user "participant2" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| group room | users | participant1 | participant1-displayname | Message 2 | [] |
Scenario: not invited user can not send nor receive chat messages to nor from group room
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| invite | attendees1 |
When user "participant3" sends message "Message 1" to room "group room" with 404
And user "participant1" sends message "Message 2" to room "group room" with 201
Then user "participant3" sees the following messages in room "group room" with 404
Scenario: guest can not send nor receive chat messages to nor from group room
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| invite | attendees1 |
And user "guest" joins call "group room" with 404 (v4)
When user "guest" sends message "Message 1" to room "group room" with 404
And user "participant1" sends message "Message 2" to room "group room" with 201
Then user "guest" sees the following messages in room "group room" with 404
Scenario: everyone in a group room can receive messages from everyone in that room
Given user "participant1" creates room "group room" (v4)
| roomType | 2 |
| invite | attendees1 |
When user "participant1" sends message "Message 1" to room "group room" with 201
And user "participant2" sends message "Message 2" to room "group room" with 201
And user "participant2" sends message "" to room "group room" with 400
Then user "participant1" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| group room | users | participant2 | participant2-displayname | Message 2 | [] |
| group room | users | participant1 | participant1-displayname | Message 1 | [] |
And user "participant2" sees the following messages in room "group room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| group room | users | participant2 | participant2-displayname | Message 2 | [] |
| group room | users | participant1 | participant1-displayname | Message 1 | [] |
@@ -0,0 +1,96 @@
Feature: chat/message-expiration
Background:
Given user "participant1" exists
Given user "participant2" exists
Given user "participant3" exists
Scenario: Enable message expiration and check after expire
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
And user "participant1" sends message "Message 1" to room "room" with 201
And user "participant1" set the message expiration to -1 of room "room" with 400 (v4)
And user "participant2" set the message expiration to 3 of room "room" with 403 (v4)
And user "participant3" set the message expiration to 3 of room "room" with 404 (v4)
And user "participant1" set the message expiration to 3 of room "room" with 200 (v4)
And user "participant1" sends message "Message 2" to room "room" with 201
And user "participant1" is participant of the following rooms (v4)
| id | type | messageExpiration |
| room | 3 | 3 |
And user "participant1" set the message expiration to 0 of room "room" with 200 (v4)
And user "participant1" sends message "Message 3" to room "room" with 201
And wait for 3 seconds
And force run "OCA\Talk\BackgroundJob\ExpireChatMessages" background jobs
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| room | users | participant1 | participant1-displayname | Message 3 | [] | |
| room | users | participant1 | participant1-displayname | Message 1 | [] | |
# Request messages using the expired message as an offset for the future
When next message request has the following parameters set
| lastCommonReadId | Message 2 |
| lastKnownMessageId | Message 2 |
| timeout | 0 |
| lookIntoFuture | 1 |
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| room | users | participant1 | participant1-displayname | Message 3 | [] | |
# Request messages using the expired message as an offset for the past
When next message request has the following parameters set
| lastCommonReadId | Message 2 |
| lastKnownMessageId | Message 2 |
| timeout | 0 |
| lookIntoFuture | 0 |
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| room | users | participant1 | participant1-displayname | Message 1 | [] | |
Scenario: Expire shared file
Given user "participant1" creates room "room2" (v4)
| roomType | 3 |
| roomName | room2 |
And user "participant1" set the message expiration to 3 of room "room2" with 200 (v4)
When user "participant1" shares "welcome.txt" with room "room2" with OCS 100
And user "participant1" sees the following messages in room "room2" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| room2 | users | participant1 | participant1-displayname | {file} | "IGNORE" |
And wait for 3 seconds
Then user "participant1" sees the following messages in room "room2" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
And user "participant1" gets last share
And the OCS status code should be 404
Scenario: Expire call related system messages
Given user "participant1" creates room "room" (v4)
| roomType | 3 |
| roomName | room2 |
And user "participant1" set the message expiration to 3 of room "room" with 200 (v4)
Then user "participant1" joins room "room" with 200 (v4)
Then user "participant1" joins call "room" with 200 (v4)
| flags | 1 |
Then user "participant1" leaves room "room" with 200 (v4)
And user "participant1" sees the following system messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | systemMessage |
| room | guests | system | | call_ended |
| room | users | participant1 | participant1-displayname | call_left |
| room | users | participant1 | participant1-displayname | call_started |
| room | users | participant1 | participant1-displayname | message_expiration_enabled |
| room | users | participant1 | participant1-displayname | conversation_created |
And wait for 3 seconds
And user "participant1" sees the following system messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | systemMessage |
| room | users | participant1 | participant1-displayname | conversation_created |
Scenario: Cannot set message expiration in a former one to one room
Given user "participant1" creates room "room" (v4)
| roomType | 1 |
| invite | participant2 |
And user "participant1" is participant of room "room" (v4)
Then user "participant1" is participant of the following rooms (v4)
| id | type | participantType |
| room | 1 | 1 |
When user "participant2" is deleted
Then user "participant1" is participant of the following rooms (v4)
| id | type | participantType |
| room | 5 | 1 |
And user "participant1" set the message expiration to 3 of room "room" with 400 (v4)
@@ -0,0 +1,39 @@
Feature: chat/note-to-self
Background:
Given user "participant1" exists
Scenario: Created manually via the endpoint
When user "participant1" reset note-to-self preference
When user "participant1" creates note-to-self (v4)
And user "participant1" is participant of the following note-to-self rooms (v4)
| id | type | name |
| participant1-note-to-self | 6 | Note to self |
Then user "participant1" sees the following system messages in room "participant1-note-to-self" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | systemMessage |
| participant1-note-to-self | users | participant1 | participant1-displayname | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | conversation_created |
Scenario: Created automatically when fetching the room list
When user "participant1" reset note-to-self preference
And user "participant1" is participant of the following note-to-self rooms (v4)
| id | type | name |
| Note to self | 6 | Note to self |
Then user "participant1" sees the following system messages in room "Note to self" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | systemMessage |
| Note to self | guests | system | | System created the conversation | {"actor":{"type":"guest","id":"guest\/system","name":"System","mention-id":"guest\/system"}} | conversation_created |
Scenario: Edit messages forever in note-to-self room
When user "participant1" creates note-to-self (v4)
And user "participant1" is participant of the following note-to-self rooms (v4)
| id | type | name |
| participant1-note-to-self | 6 | Note to self |
Then user "participant1" sends message "Initial message" to room "participant1-note-to-self" with 201
And user "participant1" sees the following messages in room "participant1-note-to-self" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| participant1-note-to-self | users | participant1 | participant1-displayname | Initial message | [] |
When aging messages 24 hours in room "participant1-note-to-self"
And user "participant1" edits message "Initial message" in room "participant1-note-to-self" to "Edited after 24 hours" with 200
Then user "participant1" sees the following messages in room "participant1-note-to-self" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | lastEditActorType | lastEditActorId | lastEditActorDisplayName |
| participant1-note-to-self | users | participant1 | participant1-displayname | Edited after 24 hours | [] | users | participant1 | participant1-displayname |
@@ -0,0 +1,634 @@
Feature: chat/notifications
Background:
Given user "participant1" exists
Given user "participant2" exists
And group "attendees1" exists
And user "participant2" is member of group "attendees1"
Scenario: Normal message when recipient is online in the one-to-one
When user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
When user "participant2" creates room "one-to-one room" with 200 (v4)
| roomType | 1 |
| invite | participant1 |
Given user "participant1" sets session state to 2 in room "one-to-one room" with 404 (v4)
Given user "participant2" joins room "one-to-one room" with 200 (v4)
When user "participant1" sends message "Message 1" to room "one-to-one room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: Normal message when recipient is online but inactive
When user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
When user "participant2" creates room "one-to-one room" with 200 (v4)
| roomType | 1 |
| invite | participant1 |
Given user "participant2" joins room "one-to-one room" with 200 (v4)
Given user "participant2" sets session state to 2 in room "one-to-one room" with 400 (v4)
When user "participant1" sends message "Message 1" to room "one-to-one room" with 201
Given user "participant2" sets session state to 0 in room "one-to-one room" with 200 (v4)
When user "participant1" sends message "Message 2" to room "one-to-one room" with 201
Given user "participant2" sets session state to 1 in room "one-to-one room" with 200 (v4)
When user "participant1" sends message "Message 3" to room "one-to-one room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | one-to-one room/Message 2 | participant1-displayname sent you a private message |
Scenario: Normal message when recipient is offline in the one-to-one
When user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
When user "participant1" sends message "Message 1" to room "one-to-one room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | one-to-one room/Message 1 | participant1-displayname sent you a private message |
Then user "participant2" sees the following messages in room "one-to-one room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | silent |
| one-to-one room | users | participant1 | participant1-displayname | Message 1 | [] | !ISSET |
Scenario: Silent sent message when recipient is offline in the one-to-one
When user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
When user "participant1" silent sends message "Message 1" to room "one-to-one room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Then user "participant2" sees the following messages in room "one-to-one room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | silent |
| one-to-one room | users | participant1 | participant1-displayname | Message 1 | [] | true |
Scenario: Normal message when recipient disabled notifications in the one-to-one
When user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
When user "participant2" creates room "one-to-one room" with 200 (v4)
| roomType | 1 |
| invite | participant1 |
And user "participant2" sets notifications to disabled for room "one-to-one room" (v4)
When user "participant1" sends message "Message 1" to room "one-to-one room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: Mention when recipient is online in the one-to-one
When user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
When user "participant2" creates room "one-to-one room" with 200 (v4)
| roomType | 1 |
| invite | participant1 |
Given user "participant2" joins room "one-to-one room" with 200 (v4)
When user "participant1" sends message "Hi @participant2 bye" to room "one-to-one room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | one-to-one room/Hi @participant2 bye | participant1-displayname mentioned you in a private conversation |
Scenario: Mention when recipient is offline in the one-to-one
When user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
When user "participant1" sends message "Hi @participant2 bye" to room "one-to-one room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | one-to-one room/Hi @participant2 bye | participant1-displayname mentioned you in a private conversation |
Scenario: Mention when recipient disabled notifications in the one-to-one
When user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
When user "participant2" creates room "one-to-one room" with 200 (v4)
| roomType | 1 |
| invite | participant1 |
And user "participant2" sets notifications to disabled for room "one-to-one room" (v4)
When user "participant1" sends message "Hi @participant2 bye" to room "one-to-one room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: Reaction in the one-to-one
When user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
When user "participant2" creates room "one-to-one room" with 200 (v4)
| roomType | 1 |
| invite | participant1 |
When user "participant2" sends message "Message 1" to room "one-to-one room" with 201
And user "participant1" react with "🚀" on message "Message 1" to room "one-to-one room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | one-to-one room/Message 1 | participant1-displayname reacted with 🚀 to your private message |
Scenario: Reaction when recipient disabled notifications in the one-to-one
When user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
When user "participant2" creates room "one-to-one room" with 200 (v4)
| roomType | 1 |
| invite | participant1 |
When user "participant2" sends message "Message 1" to room "one-to-one room" with 201
And user "participant2" sets notifications to disabled for room "one-to-one room" (v4)
And user "participant1" react with "🚀" on message "Message 1" to room "one-to-one room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: At-all when recipient is online in the one-to-one
When user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
When user "participant2" creates room "one-to-one room" with 200 (v4)
| roomType | 1 |
| invite | participant1 |
Given user "participant2" joins room "one-to-one room" with 200 (v4)
When user "participant1" sends message "Hi @all bye" to room "one-to-one room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | one-to-one room/Hi @all bye | participant1-displayname mentioned you in a private conversation |
Scenario: At-all when recipient is offline in the one-to-one
When user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
When user "participant1" sends message "Hi @all bye" to room "one-to-one room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | one-to-one room/Hi @all bye | participant1-displayname mentioned you in a private conversation |
Scenario: At-all when recipient disabled notifications in the one-to-one
When user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
When user "participant2" creates room "one-to-one room" with 200 (v4)
| roomType | 1 |
| invite | participant1 |
And user "participant2" sets notifications to disabled for room "one-to-one room" (v4)
When user "participant1" sends message "Hi @all bye" to room "one-to-one room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: Normal message when recipient is online in the group room
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
Given user "participant2" joins room "room" with 200 (v4)
When user "participant1" sends message "Message 1" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: Normal message when recipient is offline in the group room
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
When user "participant1" sends message "Message 1" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: Normal message when recipient with all notifications in the group room
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
And user "participant2" sets notifications to all for room "room" (v4)
When user "participant1" sends message "Message 1" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Message 1 | participant1-displayname sent a message in conversation room |
Scenario: Mention when recipient is online in the group room
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
Given user "participant2" joins room "room" with 200 (v4)
When user "participant1" sends message "Hi @participant2 bye" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Hi @participant2 bye | participant1-displayname mentioned you in conversation room |
Scenario: Silent mention when recipient is online in the group room
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
When user "participant1" silent sends message "Hi @participant2 bye" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: Mention when recipient is offline in the group room
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
When user "participant1" sends message "Hi @participant2 bye" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Hi @participant2 bye | participant1-displayname mentioned you in conversation room |
Scenario: Mention when recipient with disabled notifications in the group room
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
And user "participant2" sets notifications to disabled for room "room" (v4)
When user "participant1" sends message "Hi @participant2 bye" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: At-all when recipient is online in the group room
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
Given user "participant2" joins room "room" with 200 (v4)
When user "participant1" sends message "Hi @all bye" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Hi @all bye | participant1-displayname mentioned everyone in conversation room |
Scenario: At-all when recipient is offline in the group room
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
When user "participant1" sends message "Hi @all bye" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Hi @all bye | participant1-displayname mentioned everyone in conversation room |
Scenario: Silent at-all when recipient is offline in the group room
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
When user "participant1" silent sends message "Hi @all bye" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: At-all when recipient with disabled notifications in the group room
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
And user "participant2" sets notifications to disabled for room "room" (v4)
When user "participant1" sends message "Hi @all bye" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: Group-mention when recipient is online in the group room
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
And user "participant1" adds group "attendees1" to room "room" with 200 (v4)
Given user "participant2" joins room "room" with 200 (v4)
When user "participant1" sends message 'Hi @"group/attendees1" bye' to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Hi @"group/attendees1" bye | participant1-displayname mentioned group attendees1 in conversation room |
Scenario: Group-mention when group is not a member of the room
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
Given user "participant2" joins room "room" with 200 (v4)
When user "participant1" sends message 'Hi @"group/attendees1" bye' to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: Group-mention when recipient is offline in the group room
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
And user "participant1" adds group "attendees1" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
When user "participant1" sends message 'Hi @"group/attendees1" bye' to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Hi @"group/attendees1" bye | participant1-displayname mentioned group attendees1 in conversation room |
Scenario: Silent group-mention when recipient is offline in the group room
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
And user "participant1" adds group "attendees1" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
When user "participant1" silent sends message 'Hi @"group/attendees1" bye' to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: Group-mention when recipient with disabled notifications in the group room
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
And user "participant1" adds group "attendees1" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
And user "participant2" sets notifications to disabled for room "room" (v4)
When user "participant1" sends message 'Hi @"group/attendees1" bye' to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: Team-mention when recipient is online in the group room
Given team "1234" exists
Given add user "participant1" to team "1234"
Given add user "participant2" to team "1234"
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds team "1234" to room "room" with 200 (v4)
Given user "participant2" joins room "room" with 200 (v4)
When user "participant1" sends message 'Hi @"TEAM_ID(1234)" bye' to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Hi @"TEAM_ID(1234)" bye | participant1-displayname mentioned team 1234 in conversation room |
Scenario: Team-mention when team is not a member of the room
Given team "1234" exists
Given add user "participant1" to team "1234"
Given add user "participant2" to team "1234"
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
Given user "participant2" joins room "room" with 200 (v4)
When user "participant1" sends message 'Hi @"TEAM_ID(1234)" bye' to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: Team-mention when recipient is offline in the group room
Given team "1234" exists
Given add user "participant1" to team "1234"
Given add user "participant2" to team "1234"
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds team "1234" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
When user "participant1" sends message 'Hi @"TEAM_ID(1234)" bye' to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Hi @"TEAM_ID(1234)" bye | participant1-displayname mentioned team 1234 in conversation room |
Scenario: Silent team-mention when recipient is offline in the group room
Given team "1234" exists
Given add user "participant1" to team "1234"
Given add user "participant2" to team "1234"
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds team "1234" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
When user "participant1" silent sends message 'Hi @"TEAM_ID(1234)" bye' to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: Team-mention when recipient with disabled notifications in the group room
Given team "1234" exists
Given add user "participant1" to team "1234"
Given add user "participant2" to team "1234"
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds team "1234" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
And user "participant2" sets notifications to disabled for room "room" (v4)
When user "participant1" sends message 'Hi @"TEAM_ID(1234)" bye' to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: Replying with all mention types only gives a reply notification
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
And user "participant1" adds group "attendees1" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
When user "participant2" sends message "Hi part 1" to room "room" with 201
When user "participant1" sends reply 'Hi @all @participant2 @"group/attendees1" bye' on message "Hi part 1" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Hi @all @participant2 @"group/attendees1" bye | participant1-displayname replied to your message in conversation room |
Scenario: Replying with a captioned file gives a reply notification
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
And user "participant1" adds group "attendees1" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
When user "participant2" sends message "Message 1" to room "room" with 201
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| room | users | participant2 | participant2-displayname | Message 1 | [] | |
When user "participant1" shares "welcome.txt" with room "room"
| talkMetaData.caption | Caption 1-1 |
| talkMetaData.replyTo | Message 1 |
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| room | users | participant1 | participant1-displayname | Caption 1-1 | "IGNORE" | Message 1 |
| room | users | participant2 | participant2-displayname | Message 1 | [] | |
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Caption 1-1 | participant1-displayname replied to your message in conversation room |
Scenario: Mentions in captions trigger normal mention notifications
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
And user "participant1" adds group "attendees1" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
When user "participant1" shares "welcome.txt" with room "room"
| talkMetaData.caption | @participant2 |
Then user "participant1" sees the following messages in room "room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
| room | users | participant1 | participant1-displayname | {mention-user1} | "IGNORE" | |
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/{mention-user1} | participant1-displayname mentioned you in conversation room |
Scenario: Delete notification when the message is deleted
When user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
# Join and leave to clear the invite notification
And user "participant1" sends message "Message 1" to room "one-to-one room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | one-to-one room/Message 1 | participant1-displayname sent you a private message |
When user "participant1" deletes message "Message 1" from room "one-to-one room" with 200 (v1)
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: Reaction when recipient full enables notifications in the group room
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
When user "participant2" sends message "Message 1" to room "room" with 201
And user "participant2" sets notifications to all for room "room" (v4)
And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Message 1 | participant1-displayname reacted with 🚀 to your message in conversation room |
Scenario: Reaction when recipient has default notifications (disabled) in the group room
When user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
Given user "participant2" joins room "room" with 200 (v4)
Given user "participant2" leaves room "room" with 200 (v4)
When user "participant2" sends message "Message 1" to room "room" with 201
And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: Lobby: No notifications while being blocked by the lobby
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
And user "participant2" joins room "room" with 200 (v4)
And user "participant2" leaves room "room" with 200 (v4)
And user "participant2" sends message "Message 1" to room "room" with 201
And user "participant2" sets notifications to all for room "room" (v4)
And user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4)
When user "participant1" sends message "Hi @all bye" to room "room" with 201
And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
When user "participant1" sends message "Hi @participant2" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: Lobby: Notifications for users that ignore the lobby
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
And user "participant2" joins room "room" with 200 (v4)
And user "participant2" leaves room "room" with 200 (v4)
And user "participant2" sends message "Message 1" to room "room" with 201
And user "participant2" sets notifications to all for room "room" (v4)
And user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4)
And user "participant1" sets permissions for "participant2" in room "room" to "L" with 200 (v4)
And user "participant1" sends message "Hi @all bye" to room "room" with 201
And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
When user "participant1" sends message "Hi @participant2" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Hi @participant2 | participant1-displayname mentioned you in conversation room |
| spreed | chat | room/Message 1 | participant1-displayname reacted with 🚀 to your message in conversation room |
| spreed | chat | room/Hi @all bye | participant1-displayname mentioned everyone in conversation room |
Scenario: Lobby: Notifications for moderators
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
And user "participant2" joins room "room" with 200 (v4)
And user "participant2" leaves room "room" with 200 (v4)
And user "participant2" sends message "Message 1" to room "room" with 201
And user "participant2" sets notifications to all for room "room" (v4)
And user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4)
And user "participant1" promotes "participant2" in room "room" with 200 (v4)
And user "participant1" sends message "Hi @all bye" to room "room" with 201
And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
When user "participant1" sends message "Hi @participant2" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Hi @participant2 | participant1-displayname mentioned you in conversation room |
| spreed | chat | room/Message 1 | participant1-displayname reacted with 🚀 to your message in conversation room |
| spreed | chat | room/Hi @all bye | participant1-displayname mentioned everyone in conversation room |
Scenario: Lobby: Wipe notifications when being blocked by the lobby
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
# Join and leave to clear the invite notification
And user "participant2" joins room "room" with 200 (v4)
And user "participant2" leaves room "room" with 200 (v4)
And user "participant2" sends message "Message 1" to room "room" with 201
And user "participant2" sets notifications to all for room "room" (v4)
And user "participant1" sends message "Hi @all bye" to room "room" with 201
And user "participant1" react with "🚀" on message "Message 1" to room "room" with 201
And user "participant1" sends message "Hi @participant2" to room "room" with 201
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Hi @participant2 | participant1-displayname mentioned you in conversation room |
| spreed | chat | room/Message 1 | participant1-displayname reacted with 🚀 to your message in conversation room |
| spreed | chat | room/Hi @all bye | participant1-displayname mentioned everyone in conversation room |
When user "participant1" sets lobby state for room "room" to "non moderators" with 200 (v4)
Then user "participant2" has the following notifications
| app | object_type | object_id | subject |
Scenario: At-all with different mention permissions
Given user "participant1" creates room "room" (v4)
| roomType | 2 |
| roomName | room |
And user "participant1" adds user "participant2" to room "room" with 200 (v4)
When user "participant2" sends message "Hi @all" to room "room" with 201
Then user "participant1" has the following notifications
| app | object_type | object_id | subject |
| spreed | chat | room/Hi @all | participant2-displayname mentioned everyone in conversation room |
When user "participant1" reads message "Hi @all" in room "room" with 200
And user "participant1" sets mention permissions for room "room" to moderators with 200 (v4)
And user "participant2" sends message "Hi @all" to room "room" with 201
Then user "participant1" has the following notifications
| app | object_type | object_id | subject |
@@ -0,0 +1,92 @@
Feature: chat/one-to-one
Background:
Given user "participant1" exists
Given user "participant2" exists
Given user "participant3" exists
Scenario: owner can send and receive chat messages to and from one-to-one room
Given user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
When user "participant1" sends message "Message 1" to room "one-to-one room" with 201
Then user "participant1" sees the following messages in room "one-to-one room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| one-to-one room | users | participant1 | participant1-displayname | Message 1 | [] |
Scenario: invited user can send and receive chat messages to and from one-to-one room
Given user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
Given user "participant2" creates room "one-to-one room" with 200 (v4)
| roomType | 1 |
| invite | participant1 |
When user "participant2" sends message "Message 1" to room "one-to-one room" with 201
Then user "participant2" sees the following messages in room "one-to-one room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| one-to-one room | users | participant2 | participant2-displayname | Message 1 | [] |
Scenario: not invited user can not send nor receive chat messages to nor from one-to-one room
Given user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
When user "participant3" sends message "Message 1" to room "one-to-one room" with 404
And user "participant1" sends message "Message 2" to room "one-to-one room" with 201
Then user "participant3" sees the following messages in room "one-to-one room" with 404
Scenario: guest can not send nor receive chat messages to nor from one-to-one room
Given user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
And user "guest" joins call "one-to-one room" with 404 (v4)
When user "guest" sends message "Message 1" to room "one-to-one room" with 404
And user "participant1" sends message "Message 2" to room "one-to-one room" with 201
Then user "guest" sees the following messages in room "one-to-one room" with 404
Scenario: everyone in a one-to-one room can receive messages from everyone in that room
Given user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
When user "participant1" sends message "Message 1" to room "one-to-one room" with 201
And user "participant2" sends message "Message 2" to room "one-to-one room" with 201
Then user "participant1" sees the following messages in room "one-to-one room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| one-to-one room | users | participant2 | participant2-displayname | Message 2 | [] |
| one-to-one room | users | participant1 | participant1-displayname | Message 1 | [] |
And user "participant2" sees the following messages in room "one-to-one room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| one-to-one room | users | participant2 | participant2-displayname | Message 2 | [] |
| one-to-one room | users | participant1 | participant1-displayname | Message 1 | [] |
Scenario: Sending a message into a one-to-one chat re-adds the participants
Given user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
Given user "participant2" creates room "one-to-one room" with 200 (v4)
| roomType | 1 |
| invite | participant1 |
And user "participant1" is participant of room "one-to-one room" (v4)
And user "participant2" is participant of room "one-to-one room" (v4)
When user "participant1" removes themselves from room "one-to-one room" with 200 (v4)
Then user "participant1" is not participant of room "one-to-one room" (v4)
When user "participant2" sends message "Message" to room "one-to-one room" with 201
Then user "participant1" is participant of room "one-to-one room" (v4)
Then user "participant1" sees the following messages in room "one-to-one room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| one-to-one room | users | participant2 | participant2-displayname | Message | [] |
Scenario: Return user status when get single conversation
Given user "participant1" creates room "one-to-one room" (v4)
| roomType | 1 |
| invite | participant2 |
When user "participant2" set status to "online" with 200 (v1)
Then user "participant1" gets room "one-to-one room" with 200 (v4)
| status | online |
When user "participant2" set status to "offline" with 200 (v1)
Then user "participant1" gets room "one-to-one room" with 200 (v4)
| status | offline |
Then user "participant2" set status to "away" with 200 (v1)
Then user "participant1" gets room "one-to-one room" with 200 (v4)
| status | away |
Then user "participant2" set status to "busy" with 200 (v1)
Then user "participant1" gets room "one-to-one room" with 200 (v4)
| status | busy |
@@ -0,0 +1,119 @@
Feature: chat/password
Background:
Given user "participant1" exists
Given user "participant2" exists
Given user "participant3" exists
Scenario: owner can send and receive chat messages to and from public password protected room
Given user "participant1" creates room "public password protected room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" sets password "foobar" for room "public password protected room" with 200 (v4)
When user "participant1" sends message "Message 1" to room "public password protected room" with 201
Then user "participant1" sees the following messages in room "public password protected room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| public password protected room | users | participant1 | participant1-displayname | Message 1 | [] |
Scenario: invited user can send and receive chat messages to and from public password protected room
Given user "participant1" creates room "public password protected room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" sets password "foobar" for room "public password protected room" with 200 (v4)
And user "participant1" adds user "participant2" to room "public password protected room" with 200 (v4)
When user "participant2" sends message "Message 1" to room "public password protected room" with 201
Then user "participant2" sees the following messages in room "public password protected room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| public password protected room | users | participant2 | participant2-displayname | Message 1 | [] |
Scenario: invited user can send and receive chat messages to and from public password protected room with initial password
Given user "participant1" creates room "public password protected room" (v4)
| roomType | 3 |
| roomName | room |
| password | ARoomPassword123. |
And user "participant1" sets password "foobar" for room "public password protected room" with 200 (v4)
And user "participant1" adds user "participant2" to room "public password protected room" with 200 (v4)
When user "participant2" sends message "Message 1" to room "public password protected room" with 201
Then user "participant2" sees the following messages in room "public password protected room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| public password protected room | users | participant2 | participant2-displayname | Message 1 | [] |
Scenario: not invited but joined with password user can send and receive chat messages to and from public password protected room
Given user "participant1" creates room "public password protected room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" sets password "foobar" for room "public password protected room" with 200 (v4)
And user "participant3" joins room "public password protected room" with 200 (v4)
| password | foobar |
When user "participant3" sends message "Message 1" to room "public password protected room" with 201
Then user "participant3" sees the following messages in room "public password protected room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| public password protected room | users | participant3 | participant3-displayname | Message 1 | [] |
Scenario: not invited user can not send nor receive chat messages to and from public password protected room
Given user "participant1" creates room "public password protected room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" sets password "foobar" for room "public password protected room" with 200 (v4)
When user "participant3" sends message "Message 1" to room "public password protected room" with 404
And user "participant1" sends message "Message 2" to room "public password protected room" with 201
Then user "participant3" sees the following messages in room "public password protected room" with 404
Scenario: joined with password guest can send and receive chat messages to and from public password protected room
Given user "participant1" creates room "public password protected room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" sets password "foobar" for room "public password protected room" with 200 (v4)
And user "guest" joins room "public password protected room" with 200 (v4)
| password | foobar |
When user "guest" sends message "Message 1" to room "public password protected room" with 201
Then user "guest" sees the following messages in room "public password protected room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| public password protected room | guests | guest | | Message 1 | [] |
Scenario: not joined guest can not send nor receive chat messages to and from public password protected room
Given user "participant1" creates room "public password protected room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" sets password "foobar" for room "public password protected room" with 200 (v4)
When user "guest" sends message "Message 1" to room "public password protected room" with 404
And user "participant1" sends message "Message 2" to room "public password protected room" with 201
Then user "guest" sees the following messages in room "public password protected room" with 404
Scenario: everyone in a public password protected room can receive messages from everyone in that room
Given user "participant1" creates room "public password protected room" (v4)
| roomType | 3 |
| roomName | room |
And user "participant1" sets password "foobar" for room "public password protected room" with 200 (v4)
And user "participant1" adds user "participant2" to room "public password protected room" with 200 (v4)
And user "participant3" joins room "public password protected room" with 200 (v4)
| password | foobar |
And user "guest" joins room "public password protected room" with 200 (v4)
| password | foobar |
When user "participant1" sends message "Message 1" to room "public password protected room" with 201
And user "participant2" sends message "Message 2" to room "public password protected room" with 201
And user "participant3" sends message "Message 3" to room "public password protected room" with 201
And user "guest" sends message "Message 4" to room "public password protected room" with 201
Then user "participant1" sees the following messages in room "public password protected room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| public password protected room | guests | guest | | Message 4 | [] |
| public password protected room | users | participant3 | participant3-displayname | Message 3 | [] |
| public password protected room | users | participant2 | participant2-displayname | Message 2 | [] |
| public password protected room | users | participant1 | participant1-displayname | Message 1 | [] |
And user "participant2" sees the following messages in room "public password protected room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| public password protected room | guests | guest | | Message 4 | [] |
| public password protected room | users | participant3 | participant3-displayname | Message 3 | [] |
| public password protected room | users | participant2 | participant2-displayname | Message 2 | [] |
| public password protected room | users | participant1 | participant1-displayname | Message 1 | [] |
And user "participant3" sees the following messages in room "public password protected room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| public password protected room | guests | guest | | Message 4 | [] |
| public password protected room | users | participant3 | participant3-displayname | Message 3 | [] |
| public password protected room | users | participant2 | participant2-displayname | Message 2 | [] |
| public password protected room | users | participant1 | participant1-displayname | Message 1 | [] |
And user "guest" sees the following messages in room "public password protected room" with 200
| room | actorType | actorId | actorDisplayName | message | messageParameters |
| public password protected room | guests | guest | | Message 4 | [] |
| public password protected room | users | participant3 | participant3-displayname | Message 3 | [] |
| public password protected room | users | participant2 | participant2-displayname | Message 2 | [] |
| public password protected room | users | participant1 | participant1-displayname | Message 1 | [] |