Skip to content

Commit

Permalink
fix: Adjust test for mention-id
Browse files Browse the repository at this point in the history
Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
  • Loading branch information
SystemKeeper committed Feb 11, 2025
1 parent b26a784 commit 03eb9ec
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 34 deletions.
1 change: 1 addition & 0 deletions lib/Chat/Parser/SystemMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,7 @@ protected function getCircle(string $circleId): array {
'id' => $circleId,
'name' => $this->circleNames[$circleId],
'url' => $this->circleLinks[$circleId],
'mention' => 'team/' . $circleId,
];
}

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/features/chat-1/note-to-self.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ 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 |
2 changes: 1 addition & 1 deletion tests/integration/features/chat-2/poll.feature
Original file line number Diff line number Diff line change
Expand Up @@ -804,4 +804,4 @@ 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"}} |
8 changes: 4 additions & 4 deletions tests/integration/features/federation/chat.feature
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,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@{$REMOTE_URL} | participant2-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","server":"{$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@{$REMOTE_URL} | participant2-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant2","name":"participant2-displayname","server":"{$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@{$BASE_URL} | participant1-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","server":"{$BASE_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@{$BASE_URL} | participant1-displayname | Message deleted by author | {"actor":{"type":"user","id":"participant1","name":"participant1-displayname","mention-id":"participant1","server":"{$BASE_URL}"}} | |
Then user "participant2" is participant of the following rooms (v4)
| id | type | lastMessage |
| LOCAL::room | 2 | Message deleted by author |
Expand Down
Loading

0 comments on commit 03eb9ec

Please sign in to comment.