Skip to content

Commit

Permalink
fix: Tagging a user shows wrong user status (#30064)
Browse files Browse the repository at this point in the history
  • Loading branch information
yash-rajpal committed Aug 16, 2023
1 parent 53e0c34 commit dfb9a07
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/lucky-hounds-sing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

fixed wrong user status displayed during mentioning a user in a channel
7 changes: 4 additions & 3 deletions apps/meteor/app/ui-message/client/popup/messagePopupConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ Meteor.startup(() => {
fields: {
'u.username': 1,
'u.name': 1,
'u._id': 1,
'ts': 1,
},
sort: { ts: -1 },
Expand All @@ -52,9 +53,9 @@ Meteor.startup(() => {
uniqueMessageUsersControl[username] = true;
return notMapped;
})
.forEach(({ u: { username, name }, ts }) =>
usersFromRoomMessages.upsert(username, {
_id: username,
.forEach(({ u: { username, name, _id }, ts }) =>
usersFromRoomMessages.upsert(_id, {
_id,
username,
name,
ts,
Expand Down

0 comments on commit dfb9a07

Please sign in to comment.