diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2021-03-05 09:55:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-05 09:55:44 +0100 |
commit | 3aba094d86ae6008a6ff6d6a5ec7eff9f0b5dc69 (patch) | |
tree | de7952886e9aff725c269150a14c1a2c3fa166b0 /lib/private | |
parent | b4b55616c2f78f16b70be24f5613cd89e2971486 (diff) | |
parent | 5164f43bd36645fc274d6ab18ead37a906631fd4 (diff) | |
download | nextcloud-server-3aba094d86ae6008a6ff6d6a5ec7eff9f0b5dc69.tar.gz nextcloud-server-3aba094d86ae6008a6ff6d6a5ec7eff9f0b5dc69.zip |
Merge pull request #25573 from nextcloud/backport/25378/stable21
[stable21] Improve mention matches
Diffstat (limited to 'lib/private')
-rw-r--r-- | lib/private/Comments/Comment.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/Comments/Comment.php b/lib/private/Comments/Comment.php index 7368425174a..8517bef5893 100644 --- a/lib/private/Comments/Comment.php +++ b/lib/private/Comments/Comment.php @@ -233,6 +233,9 @@ class Comment implements IComment { return []; } $uids = array_unique($mentions[0]); + usort($uids, static function ($uid1, $uid2) { + return mb_strlen($uid2) <=> mb_strlen($uid1); + }); $result = []; foreach ($uids as $uid) { $cleanUid = trim(substr($uid, 1), '"'); |