diff --git a/client/hooks/useRoomIcon.tsx b/client/hooks/useRoomIcon.tsx index 7bd0449e58b3..f88010389228 100644 --- a/client/hooks/useRoomIcon.tsx +++ b/client/hooks/useRoomIcon.tsx @@ -19,12 +19,14 @@ export const useRoomIcon = (room: IRoom): ReactNode | { name: string; color?: st return { name: room.t === 'p' ? 'team-lock' : 'team' }; } + const {_id: userId} = Meteor.user(); + if (isDirectMessageRoom(room)) { if (room.uids && room.uids.length > 2) { return { name: 'balloon' }; } if (room.uids && room.uids.length > 0) { - return uid !== room.u._id) || room.u._id} />; + return uid !== (room.u ? room.u._id : userId)) || room.u._id} />; } return { name: 'at' }; }