-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(chat): Add the mention id to parameters for easier editing
Signed-off-by: Joas Schilling <[email protected]>
- Loading branch information
1 parent
a10955b
commit ee0074e
Showing
4 changed files
with
40 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected]', | ||
] | ||
]; | ||
|
||
|
@@ -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', | ||
] | ||
]; | ||
|
||
|