fix: navigate to myself from mention (#5400)

Co-authored-by: Gabriel Casals <83978645+casalsgh@users.noreply.github.com>
This commit is contained in:
Reinaldo Neto 2023-12-22 12:36:23 -03:00 committed by GitHub
parent c7fc819f66
commit 64d1134ea6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -34,8 +34,9 @@ const AtMention = React.memo(({ mention, mentions, username, navToRoomInfo, styl
);
}
const itsMe = mention === username;
let mentionStyle = {};
if (mention === username) {
if (itsMe) {
mentionStyle = {
color: themes[theme].mentionMeColor
};
@ -51,7 +52,8 @@ const AtMention = React.memo(({ mention, mentions, username, navToRoomInfo, styl
logEvent(events.ROOM_MENTION_GO_USER_INFO);
const navParam = {
t: 'd',
rid: user && user._id
rid: user && user._id,
itsMe
};
if (navToRoomInfo) {
navToRoomInfo(navParam);