diff --git a/lib/Chat/Parser/SystemMessage.php b/lib/Chat/Parser/SystemMessage.php index 074e3140dfa..c7f3059ce1f 100644 --- a/lib/Chat/Parser/SystemMessage.php +++ b/lib/Chat/Parser/SystemMessage.php @@ -924,6 +924,7 @@ protected function getUser(string $uid): array { 'type' => 'user', 'id' => $uid, 'name' => $this->displayNames[$uid], + 'mention-id' => $uid, ]; } @@ -941,6 +942,7 @@ protected function getRemoteUser(Room $room, string $federationId): array { 'id' => $cloudId->getUser(), 'name' => $displayName, 'server' => $cloudId->getRemote(), + 'mention-id' => 'federated_user/' . $cloudId->getUser() . '@' . $cloudId->getRemote(), ]; } @@ -962,6 +964,7 @@ protected function getGroup(string $gid): array { 'type' => 'group', 'id' => $gid, 'name' => $this->groupNames[$gid], + 'mention-id' => 'user-group/' . $gid, ]; } @@ -995,6 +998,7 @@ protected function getCircle(string $circleId): array { 'id' => $circleId, 'name' => $this->circleNames[$circleId], 'link' => $this->circleLinks[$circleId], + 'mention-id' => 'team/' . $circleId, ]; } @@ -1042,6 +1046,7 @@ protected function getGuest(Room $room, string $actorType, string $actorId): arr 'type' => 'guest', 'id' => ($actorType === Attendee::ACTOR_GUESTS ? 'guest/' : 'email/') . $actorId, 'name' => $this->guestNames[$key], + 'mention-id' => ($actorType === Attendee::ACTOR_GUESTS ? 'guest/' : 'email/') . $actorId, ]; } diff --git a/lib/Chat/Parser/UserMention.php b/lib/Chat/Parser/UserMention.php index 233915f70b1..5d87b0c92fb 100644 --- a/lib/Chat/Parser/UserMention.php +++ b/lib/Chat/Parser/UserMention.php @@ -161,6 +161,7 @@ protected function parseMessage(Message $chatMessage): void { 'name' => $chatMessage->getRoom()->getDisplayName($userId, true), 'call-type' => $this->getRoomType($chatMessage->getRoom()), 'icon-url' => $this->avatarService->getAvatarUrl($chatMessage->getRoom()), + 'mention-id' => $search, ]; } elseif ($mention['type'] === 'guest') { try { @@ -174,6 +175,7 @@ protected function parseMessage(Message $chatMessage): void { 'type' => $mention['type'], 'id' => $mention['id'], 'name' => $displayName, + 'mention-id' => $search, ]; } elseif ($mention['type'] === 'email') { try { @@ -187,6 +189,7 @@ protected function parseMessage(Message $chatMessage): void { 'type' => $mention['type'], 'id' => $mention['id'], 'name' => $displayName, + 'mention-id' => $search, ]; } elseif ($mention['type'] === 'federated_user') { try { @@ -206,7 +209,8 @@ protected function parseMessage(Message $chatMessage): void { 'type' => 'user', 'id' => $cloudId->getUser(), 'name' => $displayName, - 'server' => $cloudId->getRemote() + 'server' => $cloudId->getRemote(), + 'mention-id' => $search, ]; } elseif ($mention['type'] === 'group') { $group = $this->groupManager->get($mention['id']); @@ -220,6 +224,7 @@ protected function parseMessage(Message $chatMessage): void { 'type' => 'user-group', 'id' => $mention['id'], 'name' => $displayName, + 'mention-id' => $search, ]; } elseif ($mention['type'] === 'team') { $messageParameters[$mentionParameterId] = $this->getCircle($mention['id']); @@ -236,6 +241,7 @@ protected function parseMessage(Message $chatMessage): void { 'type' => $mention['type'], 'id' => $mention['id'], 'name' => $displayName, + 'mention-id' => $search, ]; } } @@ -293,6 +299,7 @@ protected function getCircle(string $circleId): array { 'id' => $circleId, 'name' => $this->circleNames[$circleId], 'link' => $this->circleLinks[$circleId], + 'mention-id' => 'team/' . $circleId, ]; } diff --git a/lib/Federation/Proxy/TalkV1/UserConverter.php b/lib/Federation/Proxy/TalkV1/UserConverter.php index 6e435d38591..ba6315c4575 100644 --- a/lib/Federation/Proxy/TalkV1/UserConverter.php +++ b/lib/Federation/Proxy/TalkV1/UserConverter.php @@ -85,9 +85,15 @@ protected function convertMessageParameter(Room $room, array $parameter): array if ($parameter['type'] === 'user') { // RichObjectDefinition, not Attendee::ACTOR_USERS if (!isset($parameter['server'])) { $parameter['server'] = $room->getRemoteServer(); + if (!isset($parameter['mention-id'])) { + $parameter['mention-id'] = $parameter['id']; + } } elseif ($parameter['server']) { $localParticipants = $this->getLocalParticipants($room); $cloudId = $this->createCloudIdFromUserIdAndFullServerUrl($parameter['id'], $parameter['server']); + if (!isset($parameter['mention-id'])) { + $parameter['mention-id'] = 'federated_user/' . $parameter['id'] . '@' . $parameter['server']; + } if (isset($localParticipants[$cloudId])) { unset($parameter['server']); $parameter['name'] = $localParticipants[$cloudId]['displayName']; @@ -96,6 +102,21 @@ protected function convertMessageParameter(Room $room, array $parameter): array } elseif ($parameter['type'] === 'call' && $parameter['id'] === $room->getRemoteToken()) { $parameter['id'] = $room->getToken(); $parameter['icon-url'] = $this->avatarService->getAvatarUrl($room); + if (!isset($parameter['mention-id'])) { + $parameter['mention-id'] = 'all'; + } + } elseif ($parameter['type'] === 'circle') { + if (!isset($parameter['mention-id'])) { + $parameter['mention-id'] = 'team/' . $parameter['id']; + } + } elseif ($parameter['type'] === 'user-group') { + if (!isset($parameter['mention-id'])) { + $parameter['mention-id'] = 'group/' . $parameter['id']; + } + } elseif ($parameter['type'] === 'email' || $parameter['type'] === 'guest') { + if (!isset($parameter['mention-id'])) { + $parameter['mention-id'] = $parameter['type'] . '/' . $parameter['id']; + } } return $parameter; } diff --git a/tests/integration/features/callapi/notifications.feature b/tests/integration/features/callapi/notifications.feature index 577e7a997fe..abbbd7f2e5c 100644 --- a/tests/integration/features/callapi/notifications.feature +++ b/tests/integration/features/callapi/notifications.feature @@ -34,9 +34,9 @@ Feature: callapi/notifications Then user "participant2" checks call notification for "room" with 200 (v4) Then user "participant2" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | silent | messageParameters | - | room | users | participant1 | call_started | {actor} started a call | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | - | room | users | participant1 | user_added | {actor} added you | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"user":{"type":"user","id":"participant2","name":"participant2-displayname"}} | - | room | users | participant1 | conversation_created | {actor} created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | call_started | {actor} started a call | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | + | room | users | participant1 | user_added | {actor} added you | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | + | room | users | participant1 | conversation_created | {actor} created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Then user "participant2" has the following notifications | app | object_type | object_id | subject | | spreed | call | room | A group call has started in room | @@ -57,9 +57,9 @@ Feature: callapi/notifications | silent | true | Then user "participant2" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | silent | messageParameters | - | room | users | participant1 | call_started | {actor} started a silent call | true | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | - | room | users | participant1 | user_added | {actor} added you | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"user":{"type":"user","id":"participant2","name":"participant2-displayname"}} | - | room | users | participant1 | conversation_created | {actor} created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | call_started | {actor} started a silent call | true | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | + | room | users | participant1 | user_added | {actor} added you | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | + | room | users | participant1 | conversation_created | {actor} created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Then user "participant2" has the following notifications | app | object_type | object_id | subject | Given user "participant1" leaves call "room" with 200 (v4) diff --git a/tests/integration/features/chat-1/delete.feature b/tests/integration/features/chat-1/delete.feature index a50baa9307a..219f4d2fc16 100644 --- a/tests/integration/features/chat-1/delete.feature +++ b/tests/integration/features/chat-1/delete.feature @@ -18,10 +18,10 @@ Feature: chat/delete 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"}} | | + | 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"}} | | + | 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" @@ -40,10 +40,10 @@ Feature: chat/delete 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"}} | | + | 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"}} | | + | 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" @@ -75,10 +75,10 @@ Feature: chat/delete 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"}} | | + | 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"}} | | + | 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" @@ -101,11 +101,11 @@ Feature: chat/delete 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"}} | | + | 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"}} | | + | 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" @@ -128,11 +128,11 @@ Feature: chat/delete 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"}} | | + | 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"}} | | + | 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" @@ -155,11 +155,11 @@ Feature: chat/delete 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"}} | | + | 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"}} | | + | 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" @@ -187,12 +187,12 @@ Feature: chat/delete 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"}} | - | room1 | users | participant1 | participant1-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | 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"}} | - | room1 | users | participant1 | participant1-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | 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: Clear chat history as a moderator Given user "participant1" creates room "room1" (v4) diff --git a/tests/integration/features/chat-1/edit-message.feature b/tests/integration/features/chat-1/edit-message.feature index c6a1a79556d..30da38a510b 100644 --- a/tests/integration/features/chat-1/edit-message.feature +++ b/tests/integration/features/chat-1/edit-message.feature @@ -100,7 +100,7 @@ Feature: chat-1/edit-message 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"}} | + | 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 | @@ -160,7 +160,7 @@ Feature: chat-1/edit-message 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"}} | + | 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 | @@ -180,7 +180,7 @@ Feature: chat-1/edit-message 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"}} | + | 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 | @@ -209,7 +209,7 @@ Feature: chat-1/edit-message 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"}} | + | 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 | diff --git a/tests/integration/features/chat-1/file-share.feature b/tests/integration/features/chat-1/file-share.feature index 0b8b01d001e..2a9abcfeec7 100644 --- a/tests/integration/features/chat-1/file-share.feature +++ b/tests/integration/features/chat-1/file-share.feature @@ -104,7 +104,7 @@ Feature: chat/file-share 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"}} | + | 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) diff --git a/tests/integration/features/chat-1/note-to-self.feature b/tests/integration/features/chat-1/note-to-self.feature index 5515af09beb..0c7f6fedc7f 100644 --- a/tests/integration/features/chat-1/note-to-self.feature +++ b/tests/integration/features/chat-1/note-to-self.feature @@ -11,7 +11,7 @@ Feature: chat/note-to-self | 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"}} | conversation_created | + | 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 @@ -21,7 +21,7 @@ Feature: chat/note-to-self | 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":"Guest"}} | conversation_created | + | Note to self | guests | system | | System created the conversation | {"actor":{"type":"guest","id":"guest\/system","name":"Guest","mention-id":"guest\/system"}} | conversation_created | Scenario: Edit messages forever in note-to-self room When user "participant1" creates note-to-self (v4) @@ -37,4 +37,3 @@ Feature: chat/note-to-self 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 | - \ No newline at end of file diff --git a/tests/integration/features/chat-3/poll.feature b/tests/integration/features/chat-3/poll.feature index 9070e0c281a..190c4933ddc 100644 --- a/tests/integration/features/chat-3/poll.feature +++ b/tests/integration/features/chat-3/poll.feature @@ -15,7 +15,7 @@ Feature: chat-2/poll | maxVotes | unlimited | Then user "participant1" sees the following messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | - | room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"object":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | + | room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"object":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | Then user "participant1" sees poll "What is the question?" in room "room" with 200 | id | POLL_ID(What is the question?) | | question | What is the question? | @@ -98,10 +98,10 @@ Feature: chat-2/poll | details | [{"actorType":"users","actorId":"participant1","actorDisplayName":"participant1-displayname","optionId":1}] | Then user "participant1" sees the following system messages in room "room" with 200 (v1) | room | actorType | actorId | systemMessage | message | silent | messageParameters | - | room | users | participant1 | poll_closed | You ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | + | room | users | participant1 | poll_closed | You ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | | room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | - | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"user":{"type":"user","id":"participant2","name":"participant2-displayname"}} | - | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | + | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Participants can update their votes but only while open Given user "participant1" creates room "room" (v4) @@ -155,10 +155,10 @@ Feature: chat-2/poll Then user "participant1" votes for options "[0]" on poll "What is the question?" in room "room" with 400 Then user "participant1" sees the following system messages in room "room" with 200 (v1) | room | actorType | actorId | systemMessage | message | silent | messageParameters | - | room | users | participant1 | poll_closed | You ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | + | room | users | participant1 | poll_closed | You ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | | room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | | room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | - | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Participants can only vote for valid options Given user "participant1" creates room "room" (v4) @@ -173,7 +173,7 @@ Feature: chat-2/poll Then user "participant1" votes for options "[2]" on poll "What is the question?" in room "room" with 400 Then user "participant1" sees the following system messages in room "room" with 200 (v1) | room | actorType | actorId | systemMessage | message | silent | messageParameters | - | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Participants can not exceed the maxVotes Given user "participant1" creates room "room" (v4) @@ -187,7 +187,7 @@ Feature: chat-2/poll Then user "participant1" votes for options "[0,1]" on poll "What is the question?" in room "room" with 400 Then user "participant1" sees the following system messages in room "room" with 200 (v1) | room | actorType | actorId | systemMessage | message | silent | messageParameters | - | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Participants can vote for multiple options Given user "participant1" creates room "room" (v4) @@ -214,7 +214,7 @@ Feature: chat-2/poll Then user "participant1" sees the following system messages in room "room" with 200 (v1) | room | actorType | actorId | systemMessage | message | silent | messageParameters | | room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | - | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Participants can not vote for the same option multiple times Given user "participant1" creates room "room" (v4) @@ -228,7 +228,7 @@ Feature: chat-2/poll Then user "participant1" votes for options "[1,1]" on poll "What is the question?" in room "room" with 400 Then user "participant1" sees the following system messages in room "room" with 200 (v1) | room | actorType | actorId | systemMessage | message | silent | messageParameters | - | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Non-moderators can also create polls and close it themselves Given user "participant1" creates room "room" (v4) @@ -242,7 +242,7 @@ Feature: chat-2/poll | maxVotes | unlimited | Then user "participant1" sees the following messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | - | room | users | participant2 | participant2-displayname | {object} | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname"},"object":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | + | room | users | participant2 | participant2-displayname | {object} | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"},"object":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | Then user "participant2" closes poll "What is the question?" in room "room" with 200 | id | POLL_ID(What is the question?) | | question | What is the question? | @@ -259,9 +259,9 @@ Feature: chat-2/poll | details | {} | Then user "participant1" sees the following system messages in room "room" with 200 (v1) | room | actorType | actorId | systemMessage | message | silent | messageParameters | - | room | users | participant2 | poll_closed | {actor} ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | - | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"user":{"type":"user","id":"participant2","name":"participant2-displayname"}} | - | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant2 | poll_closed | {actor} ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | + | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | + | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Non-moderators can not create polls without chat permission Given user "participant1" creates room "room" (v4) @@ -302,9 +302,9 @@ Feature: chat-2/poll | details | {} | Then user "participant1" sees the following system messages in room "room" with 200 (v1) | room | actorType | actorId | systemMessage | message | silent | messageParameters | - | room | users | participant1 | poll_closed | You ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | - | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"user":{"type":"user","id":"participant2","name":"participant2-displayname"}} | - | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | poll_closed | You ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | + | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | + | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: There are system messages for opening, voting and closing on public polls Given user "participant1" creates room "room" (v4) @@ -358,14 +358,14 @@ Feature: chat-2/poll | details | [{"actorType":"users","actorId":"participant1","actorDisplayName":"participant1-displayname","optionId":0},{"actorType":"users","actorId":"participant2","actorDisplayName":"participant2-displayname","optionId":1}] | Then user "participant1" sees the following system messages in room "room" with 200 (v1) | room | actorType | actorId | systemMessage | message | silent | messageParameters | - | room | users | participant1 | poll_closed | You ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | + | room | users | participant1 | poll_closed | You ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | | room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | | room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | - | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"user":{"type":"user","id":"participant2","name":"participant2-displayname"}} | - | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | + | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Then user "participant1" sees the following messages in room "room" with 200 (v1) | room | actorType | actorId | actorDisplayName | message | messageParameters | - | room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"object":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | + | room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"object":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | Scenario: There are only system messages for opening and closing on hidden polls Given user "participant1" creates room "room" (v4) @@ -424,7 +424,7 @@ Feature: chat-2/poll | room | users | participant1 | participant1-displayname | conversation_created | Then user "participant1" sees the following messages in room "room" with 200 (v1) | room | actorType | actorId | actorDisplayName | message | messageParameters | - | room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"object":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | + | room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"object":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | Scenario: Non-moderators can not close polls of others Given user "participant1" creates room "room" (v4) @@ -450,7 +450,7 @@ Feature: chat-2/poll | maxVotes | unlimited | Then user "participant1" sees the following messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | - | room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"object":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | + | room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"object":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | Then user "participant2" votes for options "[1]" on poll "What is the question?" in room "room" with 200 | id | POLL_ID(What is the question?) | | question | What is the question? | @@ -505,9 +505,9 @@ Feature: chat-2/poll | votedSelf | not voted | Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | silent | messageParameters | - | room | users | participant1 | poll_closed | You ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | - | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"user":{"type":"user","id":"participant2","name":"participant2-displayname"}} | - | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | poll_closed | You ended the poll {poll} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | + | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | + | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Number of voters and votes are restricted to the very same poll Given user "participant1" creates room "room" (v4) @@ -567,8 +567,8 @@ Feature: chat-2/poll | room | actorType | actorId | systemMessage | message | silent | messageParameters | | room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(Another one ...),"name":"Another one ..."}} | | room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | - | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"user":{"type":"user","id":"participant2","name":"participant2-displayname"}} | - | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | + | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Remove all votes Given user "participant1" creates room "room" (v4) @@ -623,8 +623,8 @@ Feature: chat-2/poll | room | actorType | actorId | systemMessage | message | silent | messageParameters | | room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | | room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | - | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"user":{"type":"user","id":"participant2","name":"participant2-displayname"}} | - | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | + | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Empty question and options Given user "participant1" creates room "room" (v4) @@ -708,8 +708,8 @@ Feature: chat-2/poll | room | users | admin | user_removed | {actor} removed {user} | !ISSET | "IGNORE" | | room | deleted_users | deleted_users | poll_closed | {actor} ended the poll {poll} | !ISSET | {"actor":{"type":"highlight","id":"deleted_users","name":"Deleted user"},"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | | room | guests | system | poll_voted | Someone voted on the poll {poll} | !ISSET | {"poll":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | - | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"user":{"type":"highlight","id":"deleted_users","name":"Deleted user"}} | - | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"highlight","id":"deleted_users","name":"Deleted user"}} | + | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Deleting the poll message removes all details Given user "participant1" creates room "room" (v4) @@ -736,9 +736,9 @@ Feature: chat-2/poll | room | users | participant2 | participant2-displayname | Message deleted by you | "IGNORE" | Then user "participant1" sees the following system messages in room "room" with 200 (v1) | room | actorType | actorId | systemMessage | message | silent | messageParameters | - | room | users | participant1 | message_deleted | You deleted a message | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | - | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"user":{"type":"user","id":"participant2","name":"participant2-displayname"}} | - | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | message_deleted | You deleted a message | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | + | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | + | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Deleting a closed poll message removes also the close message Given user "participant1" creates room "room" (v4) @@ -780,10 +780,10 @@ Feature: chat-2/poll | room | users | participant2 | participant2-displayname | Message deleted by you | "IGNORE" | Then user "participant1" sees the following system messages in room "room" with 200 (v1) | room | actorType | actorId | systemMessage | message | silent | messageParameters | - | room | users | participant1 | message_deleted | You deleted a message | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | - | room | users | participant1 | message_deleted | You deleted a message | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | - | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"user":{"type":"user","id":"participant2","name":"participant2-displayname"}} | - | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | message_deleted | You deleted a message | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | + | room | users | participant1 | message_deleted | You deleted a message | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | + | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | + | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Deleting the chat history also deletes polls Given user "participant1" creates room "room" (v4) @@ -804,7 +804,7 @@ Feature: chat-2/poll And user "participant1" sees the following messages in room "room" with 200 (v1) Then user "participant1" sees the following system messages in room "room" with 200 (v1) | room | actorType | actorId | systemMessage | message | silent | messageParameters | - | room | users | participant1 | history_cleared | You cleared the history of the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | history_cleared | You cleared the history of the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Drafts Given user "participant1" creates room "room" (v4) @@ -835,7 +835,7 @@ Feature: chat-2/poll | POLL_ID(Shall we draft 2 questions?) | Shall we draft 2 questions? | ["Yes","No"] | users | participant1 | participant1-displayname | draft | hidden | 1 | Then user "participant1" sees the following messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | - | room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"object":{"type":"talk-poll","id":POLL_ID(This is not a draft!),"name":"This is not a draft!"}} | + | room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"object":{"type":"talk-poll","id":POLL_ID(This is not a draft!),"name":"This is not a draft!"}} | Then user "participant1" sees poll "What is the question?" in room "room" with 200 | id | POLL_ID(What is the question?) | | question | What is the question? | @@ -857,12 +857,12 @@ Feature: chat-2/poll Then user "participant2" sees poll "What is the question?" in room "room" with 404 Then user "participant1" sees the following system messages in room "room" with 200 (v1) | room | actorType | actorId | systemMessage | message | silent | messageParameters | - | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"user":{"type":"user","id":"participant2","name":"participant2-displayname"}} | - | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | + | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Then user "participant2" sees the following system messages in room "room" with 200 (v1) | room | actorType | actorId | systemMessage | message | silent | messageParameters | - | room | users | participant1 | user_added | {actor} added you | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"user":{"type":"user","id":"participant2","name":"participant2-displayname"}} | - | room | users | participant1 | conversation_created | {actor} created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | user_added | {actor} added you | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | + | room | users | participant1 | conversation_created | {actor} created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Update a Draft Poll Given user "participant1" creates room "room" (v4) diff --git a/tests/integration/features/chat-3/reaction.feature b/tests/integration/features/chat-3/reaction.feature index 7b05e971c0d..cb0a7cda2cf 100644 --- a/tests/integration/features/chat-3/reaction.feature +++ b/tests/integration/features/chat-3/reaction.feature @@ -180,7 +180,7 @@ Feature: chat-2/reaction Then user "participant1" deletes message "Message 1" from room "room" with 200 (v1) And user "participant1" sees the following messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | reactions | - | room | users | participant1 | participant1-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | [] | + | room | users | participant1 | participant1-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | [] | Scenario: Deleting a user neutralizes their details Given user "participant1" creates room "room" (v4) diff --git a/tests/integration/features/chat-4/rich-messages.feature b/tests/integration/features/chat-4/rich-messages.feature index 8682eea2231..ecc28064d97 100644 --- a/tests/integration/features/chat-4/rich-messages.feature +++ b/tests/integration/features/chat-4/rich-messages.feature @@ -21,7 +21,7 @@ Feature: chat-2/rich-messages When user "participant1" sends message "Mention to @participant2" 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 | - | public room | users | participant1 | participant1-displayname | Mention to {mention-user1} | {"mention-user1":{"type":"user","id":"participant2","name":"participant2-displayname"}} | + | public room | users | participant1 | participant1-displayname | Mention to {mention-user1} | {"mention-user1":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | Scenario: message with mention to invalid user has mention parameter Given user "participant1" creates room "public room" (v4) @@ -39,7 +39,7 @@ Feature: chat-2/rich-messages When user "participant1" sends message "Mention to @participant2 and @participant2 again" 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 | - | public room | users | participant1 | participant1-displayname | Mention to {mention-user1} and {mention-user1} again | {"mention-user1":{"type":"user","id":"participant2","name":"participant2-displayname"}} | + | public room | users | participant1 | participant1-displayname | Mention to {mention-user1} and {mention-user1} again | {"mention-user1":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | Scenario: message with mentions to several users has mention parameters Given user "participant1" creates room "public room" (v4) @@ -48,7 +48,7 @@ Feature: chat-2/rich-messages When user "participant1" sends message "Mention to @participant2, @unknownUser, @participant2 again and @participant3" 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 | - | public room | users | participant1 | participant1-displayname | Mention to {mention-user1}, @unknownUser, {mention-user1} again and {mention-user2} | {"mention-user1":{"type":"user","id":"participant2","name":"participant2-displayname"},"mention-user2":{"type":"user","id":"participant3","name":"participant3-displayname"}} | + | public room | users | participant1 | participant1-displayname | Mention to {mention-user1}, @unknownUser, {mention-user1} again and {mention-user2} | {"mention-user1":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"},"mention-user2":{"type":"user","id":"participant3","name":"participant3-displayname","mention-id":"participant3"}} | Scenario: message with mentions of subname users (uid1 is fully part of uid2) Given user "participant1" creates room "public room" (v4) @@ -58,5 +58,5 @@ Feature: chat-2/rich-messages When user "participant1" sends message "Mention to @participant3a and @participant3" 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 | - | public room | users | participant1 | participant1-displayname | Mention to {mention-user1} and {mention-user2} | {"mention-user1":{"type":"user","id":"participant3a","name":"participant3a-displayname"},"mention-user2":{"type":"user","id":"participant3","name":"participant3-displayname"}} | - | public room | users | participant1 | participant1-displayname | Mention to {mention-user2} and {mention-user1} | {"mention-user1":{"type":"user","id":"participant3a","name":"participant3a-displayname"},"mention-user2":{"type":"user","id":"participant3","name":"participant3-displayname"}} | + | public room | users | participant1 | participant1-displayname | Mention to {mention-user1} and {mention-user2} | {"mention-user1":{"type":"user","id":"participant3a","name":"participant3a-displayname","mention-id":"participant3a"},"mention-user2":{"type":"user","id":"participant3","name":"participant3-displayname","mention-id":"participant3"}} | + | public room | users | participant1 | participant1-displayname | Mention to {mention-user2} and {mention-user1} | {"mention-user1":{"type":"user","id":"participant3a","name":"participant3a-displayname","mention-id":"participant3a"},"mention-user2":{"type":"user","id":"participant3","name":"participant3-displayname","mention-id":"participant3"}} | diff --git a/tests/integration/features/chat-4/rich-object-share.feature b/tests/integration/features/chat-4/rich-object-share.feature index 7158b019e43..8671aa5918f 100644 --- a/tests/integration/features/chat-4/rich-object-share.feature +++ b/tests/integration/features/chat-4/rich-object-share.feature @@ -10,7 +10,7 @@ Feature: chat-2/rich-object-share When user "participant1" shares rich-object "call" "R4nd0mT0k3n" '{"name":"Another room","call-type":"group"}' to room "public room" with 201 (v1) 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 | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"object":{"name":"Another room","call-type":"group","type":"call","id":"R4nd0mT0k3n","icon-url":"{VALIDATE_ICON_URL_PATTERN}"}} | + | public room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"object":{"name":"Another room","call-type":"group","type":"call","id":"R4nd0mT0k3n","icon-url":"{VALIDATE_ICON_URL_PATTERN}"}} | Scenario: Can not share without chat permission Given user "participant1" creates room "public room" (v4) @@ -31,7 +31,7 @@ Feature: chat-2/rich-object-share And user "participant1" deletes message "shared::call::R4nd0mT0k3n" 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 | parentMessage | - | public room | users | participant1 | participant1-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | | + | 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 without chat permission Given user "participant1" creates room "public room" (v4) @@ -44,7 +44,7 @@ Feature: chat-2/rich-object-share And user "participant2" deletes message "shared::call::R4nd0mT0k3n" 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 | {object} | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname"},"object":{"name":"Another room","call-type":"group","type":"call","id":"R4nd0mT0k3n","icon-url":"{VALIDATE_ICON_URL_PATTERN}"}} | + | public room | users | participant2 | participant2-displayname | {object} | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"},"object":{"name":"Another room","call-type":"group","type":"call","id":"R4nd0mT0k3n","icon-url":"{VALIDATE_ICON_URL_PATTERN}"}} | Scenario: Share an invalid rich object to a chat Given user "participant1" creates room "public room" (v4) @@ -68,7 +68,7 @@ Feature: chat-2/rich-object-share When user "participant1" shares rich-object "call" "R4nd0mT0k3n" '{"name":"Another room","call-type":"group"}' to room "public room" with 201 (v1) Then user "participant1" sees the following shared other in room "public room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | - | public room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"object":{"name":"Another room","call-type":"group","type":"call","id":"R4nd0mT0k3n","icon-url":"{VALIDATE_ICON_URL_PATTERN}"}} | + | public room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"object":{"name":"Another room","call-type":"group","type":"call","id":"R4nd0mT0k3n","icon-url":"{VALIDATE_ICON_URL_PATTERN}"}} | When user "participant1" shares "welcome.txt" with room "public room" with OCS 100 Then user "participant1" sees the following shared file in room "public room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | diff --git a/tests/integration/features/chat-4/unread-messages.feature b/tests/integration/features/chat-4/unread-messages.feature index 3fb2c182734..9f0e7eea04a 100644 --- a/tests/integration/features/chat-4/unread-messages.feature +++ b/tests/integration/features/chat-4/unread-messages.feature @@ -228,8 +228,8 @@ Feature: chat-2/unread-messages And user "participant1" sends message "Message 1" to room "room" with 201 And user "participant1" sees the following system messages in room "room" with 200 (v1) | room | actorType | actorId | systemMessage | message | silent | messageParameters | - | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"user":{"type":"user","id":"participant2","name":"participant2-displayname"}} | - | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | user_added | You added {user} | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | + | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Then user "participant2" is participant of the following rooms (v4) | id | unreadMessages | lastReadMessage | | room | 1 | conversation_created | @@ -245,7 +245,7 @@ Feature: chat-2/unread-messages | roomName | room | And user "participant1" sees the following system messages in room "room" with 200 (v1) | room | actorType | actorId | systemMessage | message | silent | messageParameters | - | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | conversation_created | You created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Then user "participant1" is participant of the following rooms (v4) | id | unreadMessages | lastReadMessage | | room | 0 | conversation_created | diff --git a/tests/integration/features/command/user-remove.feature b/tests/integration/features/command/user-remove.feature index 6e1ea86cc40..6edb13a409c 100644 --- a/tests/integration/features/command/user-remove.feature +++ b/tests/integration/features/command/user-remove.feature @@ -74,10 +74,10 @@ Feature: command/user-remove And user "participant1" leaves room "room" with 200 (v4) Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | messageParameters | - | room | users | participant1 | call_tried | You tried to call {user} | {"user":{"type":"user","id":"participant2","name":"participant2-displayname"}} | - | room | users | participant1 | call_left | You left the call | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | - | room | users | participant1 | call_started | You started a call | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | - | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | call_tried | You tried to call {user} | {"user":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | + | room | users | participant1 | call_left | You left the call | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | + | room | users | participant1 | call_started | You started a call | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | + | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | When reset signaling server requests And invoking occ with "talk:user:remove --user participant2" Then signaling server received the following requests @@ -98,8 +98,8 @@ Feature: command/user-remove | room | participant2-displayname | 5 | 1 | Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | messageParameters | - | room | guests | cli | read_only | An administrator locked the conversation | {"actor":{"type":"guest","id":"guest\/cli","name":"Guest"}} | + | room | guests | cli | read_only | An administrator locked the conversation | {"actor":{"type":"guest","id":"guest\/cli","name":"Guest","mention-id":"guest\/cli"}} | | room | users | participant1 | call_tried | You tried to call {user} | {"user":{"type":"highlight","id":"deleted_users","name":"participant2-displayname"}} | - | room | users | participant1 | call_left | You left the call | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | - | room | users | participant1 | call_started | You started a call | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | - | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | call_left | You left the call | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | + | room | users | participant1 | call_started | You started a call | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | + | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | diff --git a/tests/integration/features/conversation-1/avatar.feature b/tests/integration/features/conversation-1/avatar.feature index 4be4c165b86..eeff6d9e8c7 100644 --- a/tests/integration/features/conversation-1/avatar.feature +++ b/tests/integration/features/conversation-1/avatar.feature @@ -128,7 +128,7 @@ Feature: conversation/avatar When user "participant1" shares rich-object "call" "R4nd0mT0k3n" '{"name":"Another room","call-type":"group"}' to room "public room" with 201 (v1) Then user "participant1" sees the following shared other in room "public room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | - | public room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"object":{"name":"Another room","call-type":"group","type":"call","id":"R4nd0mT0k3n","icon-url":"{VALIDATE_ICON_URL_PATTERN}"}} | + | public room | users | participant1 | participant1-displayname | {object} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"object":{"name":"Another room","call-type":"group","type":"call","id":"R4nd0mT0k3n","icon-url":"{VALIDATE_ICON_URL_PATTERN}"}} | Scenario: User sets emoji as avatar Given user "participant1" creates room "room" (v4) diff --git a/tests/integration/features/federation/chat.feature b/tests/integration/features/federation/chat.feature index 5550308477d..72b33817fe7 100644 --- a/tests/integration/features/federation/chat.feature +++ b/tests/integration/features/federation/chat.feature @@ -130,14 +130,14 @@ Feature: federation/chat And user "participant2" deletes message "Message 1-1 - Edit 1" from room "LOCAL::room" with 200 Then user "participant1" sees the following messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | - | room | federated_users | participant2@{$LOCAL_REMOTE_URL} | participant2-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","server":"{$LOCAL_REMOTE_URL}"}} | Message deleted by you | - | room | users | participant1 | participant1-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | | + | room | federated_users | participant2@{$LOCAL_REMOTE_URL} | participant2-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","server":"{$LOCAL_REMOTE_URL}","mention-id":"federated_user\/participant2@{$LOCAL_REMOTE_URL}"}} | Message deleted by you | + | room | users | participant1 | participant1-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | | When next message request has the following parameters set | timeout | 0 | And user "participant2" sees the following messages in room "LOCAL::room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage | - | LOCAL::room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname"}} | Message deleted by author | - | LOCAL::room | federated_users | participant1@{$LOCAL_URL} | participant1-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","server":"{$LOCAL_URL}"}} | | + | LOCAL::room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"federated_user\/participant2@{$LOCAL_REMOTE_URL}"}} | Message deleted by author | + | LOCAL::room | federated_users | participant1@{$LOCAL_URL} | participant1-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1","server":"{$LOCAL_URL}"}} | | # Disabled due to https://github.com/nextcloud/spreed/issues/12957 # Then user "participant2" is participant of the following rooms (v4) # | id | type | lastMessage | diff --git a/tests/integration/features/federation/invite.feature b/tests/integration/features/federation/invite.feature index 1a5104c41f9..2eaaeb15706 100644 --- a/tests/integration/features/federation/invite.feature +++ b/tests/integration/features/federation/invite.feature @@ -43,8 +43,8 @@ Feature: federation/invite | federated_users | participant2 | 3 | Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | messageParameters | - | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180"}} | - | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4) Then user "participant2" is participant of the following rooms (v4) | id | name | type | @@ -55,8 +55,8 @@ Feature: federation/invite | federated_users | participant2 | 3 | Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | messageParameters | - | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180"}} | - | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | And force run "OCA\Talk\BackgroundJob\RemoveEmptyRooms" background jobs And user "participant2" has the following invitations (v1) | remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName | @@ -84,9 +84,9 @@ Feature: federation/invite | federated_users | participant2 | 3 | Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | messageParameters | - | room | federated_users | participant2@http://localhost:8180 | federated_user_added | {federated_user} accepted the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180"}} | - | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180"}} | - | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | federated_users | participant2@http://localhost:8180 | federated_user_added | {federated_user} accepted the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | # Remove a remote user after they joined When user "participant1" removes remote "participant2" from room "room" with 200 (v4) And user "participant2" has the following invitations (v1) @@ -96,10 +96,10 @@ Feature: federation/invite | users | participant1 | 1 | Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | messageParameters | - | room | users | participant1 | federated_user_removed | You removed {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180"}} | - | room | federated_users | participant2@http://localhost:8180 | federated_user_added | {federated_user} accepted the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180"}} | - | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180"}} | - | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | federated_user_removed | You removed {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | federated_users | participant2@http://localhost:8180 | federated_user_added | {federated_user} accepted the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Invite user with wrong casing Given the following "spreed" app config is set @@ -114,8 +114,8 @@ Feature: federation/invite | federated_users | participant2 | 3 | Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | messageParameters | - | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180"}} | - | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | And user "participant1" adds federated_user "participant2" to room "room" with 200 (v4) When user "participant1" sees the following attendees in room "room" with 200 (v4) | actorType | actorId | participantType | @@ -123,8 +123,8 @@ Feature: federation/invite | federated_users | participant2 | 3 | Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | messageParameters | - | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180"}} | - | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | And force run "OCA\Talk\BackgroundJob\RemoveEmptyRooms" background jobs And user "participant2" has the following invitations (v1) | remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName | localCloudId | @@ -148,9 +148,9 @@ Feature: federation/invite | federated_users | participant2 | 3 | Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | messageParameters | - | room | federated_users | participant2@http://localhost:8180 | federated_user_added | {federated_user} accepted the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180"}} | - | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180"}} | - | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | federated_users | participant2@http://localhost:8180 | federated_user_added | {federated_user} accepted the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | # Remove a remote user after they joined When user "participant1" removes remote "participant2" from room "room" with 200 (v4) And user "participant2" has the following invitations (v1) @@ -160,10 +160,10 @@ Feature: federation/invite | users | participant1 | 1 | Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | messageParameters | - | room | users | participant1 | federated_user_removed | You removed {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180"}} | - | room | federated_users | participant2@http://localhost:8180 | federated_user_added | {federated_user} accepted the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180"}} | - | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180"}} | - | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | federated_user_removed | You removed {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | federated_users | participant2@http://localhost:8180 | federated_user_added | {federated_user} accepted the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Declining an invite Given the following "spreed" app config is set @@ -178,8 +178,8 @@ Feature: federation/invite | federated_users | participant2 | 3 | Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | messageParameters | - | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180"}} | - | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | And user "participant2" has the following invitations (v1) | remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName | | LOCAL | room | 0 | participant1@http://localhost:8080 | participant1-displayname | @@ -195,9 +195,9 @@ Feature: federation/invite | users | participant1 | 1 | Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | messageParameters | - | room | federated_users | participant2@http://localhost:8180 | federated_user_removed | {federated_user} declined the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180"}} | - | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180"}} | - | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | federated_users | participant2@http://localhost:8180 | federated_user_removed | {federated_user} declined the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Remove remote user before they accept Given the following "spreed" app config is set @@ -212,8 +212,8 @@ Feature: federation/invite | federated_users | participant2 | 3 | Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | messageParameters | - | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180"}} | - | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | And force run "OCA\Talk\BackgroundJob\RemoveEmptyRooms" background jobs And user "participant2" has the following invitations (v1) | remoteServerUrl | remoteToken | state | inviterCloudId | inviterDisplayName | @@ -230,9 +230,9 @@ Feature: federation/invite | users | participant1 | 1 | Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | messageParameters | - | room | users | participant1 | federated_user_removed | You removed {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180"}} | - | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180"}} | - | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | federated_user_removed | You removed {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8180","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"}} | + | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: User leaves after accepting Given the following "spreed" app config is set @@ -247,8 +247,8 @@ Feature: federation/invite | federated_users | participant2@{$REMOTE_URL} | 3 | Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | messageParameters | - | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8280"}} | - | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8280","mention-id":"federated_user\/participant2@http:\/\/localhost:8280"}} | + | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | And user "participant1" adds federated_user "participant2@REMOTE" to room "room" with 200 (v4) When user "participant1" sees the following attendees in room "room" with 200 (v4) | actorType | actorId | participantType | @@ -256,8 +256,8 @@ Feature: federation/invite | federated_users | participant2@{$REMOTE_URL} | 3 | Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | messageParameters | - | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8280"}} | - | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8280","mention-id":"federated_user\/participant2@http:\/\/localhost:8280"}} | + | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | And force run "OCA\Talk\BackgroundJob\RemoveEmptyRooms" background jobs And using server "REMOTE" And user "participant2" has the following invitations (v1) @@ -282,10 +282,10 @@ Feature: federation/invite | users | participant1 | 1 | Then user "participant1" sees the following system messages in room "room" with 200 | room | actorType | actorId | systemMessage | message | messageParameters | - | room | federated_users | participant2@http://localhost:8280 | federated_user_removed | {federated_user} declined the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"http:\/\/localhost:8280"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"http:\/\/localhost:8280"}} | - | room | federated_users | participant2@http://localhost:8280 | federated_user_added | {federated_user} accepted the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"http:\/\/localhost:8280"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"http:\/\/localhost:8280"}} | - | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"http:\/\/localhost:8280"}} | - | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | room | federated_users | participant2@http://localhost:8280 | federated_user_removed | {federated_user} declined the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"http:\/\/localhost:8280","mention-id":"federated_user\/participant2@http:\/\/localhost:8280"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"http:\/\/localhost:8280","mention-id":"federated_user\/participant2@http:\/\/localhost:8280"}} | + | room | federated_users | participant2@http://localhost:8280 | federated_user_added | {federated_user} accepted the invitation | {"actor":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"http:\/\/localhost:8280","mention-id":"federated_user\/participant2@http:\/\/localhost:8280"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"http:\/\/localhost:8280","mention-id":"federated_user\/participant2@http:\/\/localhost:8280"}} | + | room | users | participant1 | federated_user_added | You invited {federated_user} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"},"federated_user":{"type":"user","id":"participant2","name":"participant2@localhost:8280","server":"http:\/\/localhost:8280","mention-id":"federated_user\/participant2@http:\/\/localhost:8280"}} | + | room | users | participant1 | conversation_created | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | Scenario: Federate conversation meta data Given the following "spreed" app config is set diff --git a/tests/integration/features/federation/poll.feature b/tests/integration/features/federation/poll.feature index af864c623a6..effc4567706 100644 --- a/tests/integration/features/federation/poll.feature +++ b/tests/integration/features/federation/poll.feature @@ -26,7 +26,7 @@ Feature: federation/poll | maxVotes | unlimited | Then user "participant1" sees the following messages in room "room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | - | room | federated_users | participant2@{$LOCAL_REMOTE_URL} | participant2-displayname | {object} | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180"},"object":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | + | room | federated_users | participant2@{$LOCAL_REMOTE_URL} | participant2-displayname | {object} | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","server":"http:\/\/localhost:8180","mention-id":"federated_user\/participant2@http:\/\/localhost:8180"},"object":{"type":"talk-poll","id":POLL_ID(What is the question?),"name":"What is the question?"}} | Then user "participant2" sees poll "What is the question?" in room "LOCAL::room" with 200 | id | POLL_ID(What is the question?) | | question | What is the question? | diff --git a/tests/integration/features/sharing-1/delete.feature b/tests/integration/features/sharing-1/delete.feature index 21ae2a58935..2015a4d5121 100644 --- a/tests/integration/features/sharing-1/delete.feature +++ b/tests/integration/features/sharing-1/delete.feature @@ -386,4 +386,4 @@ Feature: delete | recording | 0 | And user "participant1" sees the following messages in room "public room" with 200 | room | actorType | actorId | actorDisplayName | message | messageParameters | - | public room | users | participant1 | participant1-displayname | *You shared a file which is no longer available* | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | + | public room | users | participant1 | participant1-displayname | *You shared a file which is no longer available* | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | diff --git a/tests/php/Chat/Parser/SystemMessageTest.php b/tests/php/Chat/Parser/SystemMessageTest.php index 7ab0b71fac2..9c3c823e051 100644 --- a/tests/php/Chat/Parser/SystemMessageTest.php +++ b/tests/php/Chat/Parser/SystemMessageTest.php @@ -1244,6 +1244,7 @@ public function testGetGuest(string $attendeeType, string $actorId, string $expe 'type' => 'guest', 'id' => $expected, 'name' => 'name', + 'mention-id' => $expected, ], self::invokePrivate($parser, 'getGuest', [$room, $attendeeType, $actorId])); // Cached call: no call to getGuestName() again @@ -1251,6 +1252,7 @@ public function testGetGuest(string $attendeeType, string $actorId, string $expe 'type' => 'guest', 'id' => $expected, 'name' => 'name', + 'mention-id' => $expected, ], self::invokePrivate($parser, 'getGuest', [$room, $attendeeType, $actorId])); } diff --git a/tests/php/Chat/Parser/UserMentionTest.php b/tests/php/Chat/Parser/UserMentionTest.php index ddf41310efe..cf1995ddbb7 100644 --- a/tests/php/Chat/Parser/UserMentionTest.php +++ b/tests/php/Chat/Parser/UserMentionTest.php @@ -133,7 +133,8 @@ public function testGetRichMessageWithSingleMention(): void { 'mention-user1' => [ 'type' => 'user', 'id' => 'testUser', - 'name' => 'testUser display name' + 'name' => 'testUser display name', + 'mention-id' => 'testUser', ] ]; @@ -172,7 +173,8 @@ public function testGetRichMessageWithDuplicatedMention(): void { 'mention-user1' => [ 'type' => 'user', 'id' => 'testUser', - 'name' => 'testUser display name' + 'name' => 'testUser display name', + 'mention-id' => 'testUser', ] ]; @@ -240,12 +242,14 @@ public function testGetRichMessageWithMentionsFullyIncludedInOtherMentions(strin 'mention-user1' => [ 'type' => 'user', 'id' => $longerId, - 'name' => $longerId . ' display name' + 'name' => $longerId . ' display name', + 'mention-id' => $longerId, ], 'mention-user2' => [ 'type' => 'user', 'id' => $baseId, - 'name' => $baseId . ' display name' + 'name' => $baseId . ' display name', + 'mention-id' => $baseId, ], ]; @@ -292,17 +296,20 @@ public function testGetRichMessageWithSeveralMentions(): void { 'mention-user1' => [ 'type' => 'user', 'id' => 'testUser1', - 'name' => 'testUser1 display name' + 'name' => 'testUser1 display name', + 'mention-id' => 'testUser1', ], 'mention-user2' => [ 'type' => 'user', 'id' => 'testUser2', - 'name' => 'testUser2 display name' + 'name' => 'testUser2 display name', + 'mention-id' => 'testUser2', ], 'mention-user3' => [ 'type' => 'user', 'id' => 'testUser3', - 'name' => 'testUser3 display name' + 'name' => 'testUser3 display name', + 'mention-id' => 'testUser3', ] ]; @@ -344,7 +351,8 @@ public function testGetRichMessageWithNonExistingUserMention(): void { 'mention-user1' => [ 'type' => 'user', 'id' => 'testUser', - 'name' => 'testUser display name' + 'name' => 'testUser display name', + 'mention-id' => 'testUser', ] ]; @@ -382,7 +390,8 @@ public function testGetRichMessageWhenDisplayNameCanNotBeResolved(): void { 'mention-user1' => [ 'type' => 'user', 'id' => 'testUser', - 'name' => '' + 'name' => '', + 'mention-id' => 'testUser', ] ]; @@ -430,6 +439,7 @@ public function testGetRichMessageWithAtAll(): void { 'name' => 'name', 'call-type' => 'group', 'icon-url' => 'getAvatarUrl', + 'mention-id' => 'all', ] ]; @@ -471,6 +481,7 @@ public function testGetRichMessageWithFederatedUserMention(): void { 'id' => 'testUser', 'name' => 'Display Id', 'server' => 'example.tld', + 'mention-id' => 'federated_user/testUser@example.tld', ] ]; @@ -510,6 +521,7 @@ public function testGetRichMessageWhenAGuestWithoutNameIsMentioned(): void { 'type' => 'guest', 'id' => 'guest/123456', 'name' => 'Guest', + 'mention-id' => 'guest/123456', ] ]; @@ -549,6 +561,7 @@ public function testGetRichMessageWhenAGuestWithoutNameIsMentionedMultipleTimes( 'type' => 'guest', 'id' => 'guest/123456', 'name' => 'Guest', + 'mention-id' => 'guest/123456', ] ]; @@ -596,6 +609,7 @@ public function testGetRichMessageWhenAGuestWithANameIsMentionedMultipleTimes(): 'type' => 'guest', 'id' => 'guest/abcdef', 'name' => 'Name', + 'mention-id' => 'guest/abcdef', ] ];