Skip to content

Commit 7a93818

Browse files
committed
fixup! feat(mention): Extend mention-id when proxying federated messages from old servers
1 parent f85debf commit 7a93818

File tree

12 files changed

+119
-120
lines changed

12 files changed

+119
-120
lines changed

Diff for: tests/integration/features/callapi/notifications.feature

+6-6
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ Feature: callapi/notifications
3434
Then user "participant2" checks call notification for "room" with 200 (v4)
3535
Then user "participant2" sees the following system messages in room "room" with 200
3636
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
37-
| room | users | participant1 | call_started | {actor} started a call | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} |
38-
| 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"}} |
39-
| room | users | participant1 | conversation_created | {actor} created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} |
37+
| room | users | participant1 | call_started | {actor} started a call | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
38+
| 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"}} |
39+
| room | users | participant1 | conversation_created | {actor} created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
4040
Then user "participant2" has the following notifications
4141
| app | object_type | object_id | subject |
4242
| spreed | call | room | A group call has started in room |
@@ -57,9 +57,9 @@ Feature: callapi/notifications
5757
| silent | true |
5858
Then user "participant2" sees the following system messages in room "room" with 200
5959
| room | actorType | actorId | systemMessage | message | silent | messageParameters |
60-
| room | users | participant1 | call_started | {actor} started a silent call | true | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} |
61-
| 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"}} |
62-
| room | users | participant1 | conversation_created | {actor} created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} |
60+
| room | users | participant1 | call_started | {actor} started a silent call | true | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
61+
| 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"}} |
62+
| room | users | participant1 | conversation_created | {actor} created the conversation | !ISSET | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
6363
Then user "participant2" has the following notifications
6464
| app | object_type | object_id | subject |
6565
Given user "participant1" leaves call "room" with 200 (v4)

Diff for: tests/integration/features/chat-1/delete.feature

+16-16
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ Feature: chat/delete
1818
And user "participant1" deletes message "Message 1" from room "group room" with 200
1919
Then user "participant1" sees the following messages in room "group room" with 200
2020
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
21-
| group room | users | participant1 | participant1-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | |
21+
| group room | users | participant1 | participant1-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | |
2222
Then user "participant2" sees the following messages in room "group room" with 200
2323
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
24-
| group room | users | participant1 | participant1-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | |
24+
| group room | users | participant1 | participant1-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | |
2525
Then user "participant1" received a system messages in room "group room" to delete "Message 1"
2626
Then user "participant2" received a system messages in room "group room" to delete "Message 1"
2727

@@ -40,10 +40,10 @@ Feature: chat/delete
4040
And user "participant2" deletes message "Message 1" from room "group room" with 200
4141
Then user "participant1" sees the following messages in room "group room" with 200
4242
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
43-
| group room | users | participant2 | participant2-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname"}} | |
43+
| group room | users | participant2 | participant2-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | |
4444
Then user "participant2" sees the following messages in room "group room" with 200
4545
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
46-
| group room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname"}} | |
46+
| group room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | |
4747
Then user "participant1" received a system messages in room "group room" to delete "Message 1"
4848
Then user "participant2" received a system messages in room "group room" to delete "Message 1"
4949

@@ -75,10 +75,10 @@ Feature: chat/delete
7575
And user "participant1" deletes message "Message 1" from room "group room" with 200
7676
Then user "participant1" sees the following messages in room "group room" with 200
7777
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
78-
| group room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | |
78+
| group room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | |
7979
Then user "participant2" sees the following messages in room "group room" with 200
8080
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
81-
| group room | users | participant2 | participant2-displayname | Message deleted by {actor} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | |
81+
| group room | users | participant2 | participant2-displayname | Message deleted by {actor} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | |
8282
Then user "participant1" received a system messages in room "group room" to delete "Message 1"
8383
Then user "participant2" received a system messages in room "group room" to delete "Message 1"
8484

@@ -101,11 +101,11 @@ Feature: chat/delete
101101
Then user "participant1" sees the following messages in room "group room" with 200
102102
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
103103
| group room | users | participant1 | participant1-displayname | Message 1-1 | [] | Message deleted by you |
104-
| group room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | |
104+
| group room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | |
105105
Then user "participant2" sees the following messages in room "group room" with 200
106106
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
107107
| group room | users | participant1 | participant1-displayname | Message 1-1 | [] | Message deleted by {actor} |
108-
| group room | users | participant2 | participant2-displayname | Message deleted by {actor} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | |
108+
| group room | users | participant2 | participant2-displayname | Message deleted by {actor} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | |
109109
Then user "participant1" received a system messages in room "group room" to delete "Message 1"
110110
Then user "participant2" received a system messages in room "group room" to delete "Message 1"
111111

@@ -128,11 +128,11 @@ Feature: chat/delete
128128
Then user "participant1" sees the following messages in room "group room" with 200
129129
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
130130
| group room | users | participant1 | participant1-displayname | Message 1-1 | [] | Message deleted by author |
131-
| group room | users | participant2 | participant2-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname"}} | |
131+
| group room | users | participant2 | participant2-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | |
132132
Then user "participant2" sees the following messages in room "group room" with 200
133133
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
134134
| group room | users | participant1 | participant1-displayname | Message 1-1 | [] | Message deleted by you |
135-
| group room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname"}} | |
135+
| group room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} | |
136136
Then user "participant1" received a system messages in room "group room" to delete "Message 1"
137137
Then user "participant2" received a system messages in room "group room" to delete "Message 1"
138138

@@ -155,11 +155,11 @@ Feature: chat/delete
155155
Then user "participant1" sees the following messages in room "group room" with 200
156156
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
157157
| group room | users | participant1 | participant1-displayname | Message 1-1 | [] | Message deleted by you |
158-
| group room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | |
158+
| group room | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | |
159159
Then user "participant2" sees the following messages in room "group room" with 200
160160
| room | actorType | actorId | actorDisplayName | message | messageParameters | parentMessage |
161161
| group room | users | participant1 | participant1-displayname | Message 1-1 | [] | Message deleted by {actor} |
162-
| group room | users | participant2 | participant2-displayname | Message deleted by {actor} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | |
162+
| group room | users | participant2 | participant2-displayname | Message deleted by {actor} | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} | |
163163
Then user "participant1" received a system messages in room "group room" to delete "Message 1"
164164
Then user "participant2" received a system messages in room "group room" to delete "Message 1"
165165

@@ -187,12 +187,12 @@ Feature: chat/delete
187187
And user "participant2" deletes message "Message 2" from room "room1" with 200
188188
Then user "participant1" sees the following messages in room "room1" with 200
189189
| room | actorType | actorId | actorDisplayName | message | messageParameters |
190-
| room1 | users | participant2 | participant2-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname"}} |
191-
| room1 | users | participant1 | participant1-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} |
190+
| room1 | users | participant2 | participant2-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} |
191+
| room1 | users | participant1 | participant1-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
192192
Then user "participant2" sees the following messages in room "room1" with 200
193193
| room | actorType | actorId | actorDisplayName | message | messageParameters |
194-
| room1 | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname"}} |
195-
| room1 | users | participant1 | participant1-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} |
194+
| room1 | users | participant2 | participant2-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","mention-id":"participant2"}} |
195+
| room1 | users | participant1 | participant1-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
196196

197197
Scenario: Clear chat history as a moderator
198198
Given user "participant1" creates room "room1" (v4)

Diff for: tests/integration/features/chat-1/file-share.feature

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Feature: chat/file-share
104104
And user "participant1" deletes message "shared::file::welcome.txt" from room "public room" with 200
105105
Then user "participant1" sees the following messages in room "public room" with 200
106106
| room | actorType | actorId | actorDisplayName | message | messageParameters |
107-
| public room | users | participant1 | participant1-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} |
107+
| public room | users | participant1 | participant1-displayname | Message deleted by you | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1"}} |
108108

109109
Scenario: Can not delete a share file message without chat permission
110110
Given user "participant1" creates room "public room" (v4)

Diff for: tests/integration/features/chat-1/note-to-self.feature

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Feature: chat/note-to-self
1111
| participant1-note-to-self | 6 | Note to self |
1212
Then user "participant1" sees the following system messages in room "participant1-note-to-self" with 200
1313
| room | actorType | actorId | actorDisplayName | message | messageParameters | systemMessage |
14-
| participant1-note-to-self | users | participant1 | participant1-displayname | You created the conversation | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname"}} | conversation_created |
14+
| 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 |
1515

1616

1717
Scenario: Created automatically when fetching the room list
@@ -37,4 +37,3 @@ Feature: chat/note-to-self
3737
Then user "participant1" sees the following messages in room "participant1-note-to-self" with 200
3838
| room | actorType | actorId | actorDisplayName | message | messageParameters | lastEditActorType | lastEditActorId | lastEditActorDisplayName |
3939
| participant1-note-to-self | users | participant1 | participant1-displayname | Edited after 24 hours | [] | users | participant1 | participant1-displayname |
40-

0 commit comments

Comments
 (0)