Skip to content

Commit

Permalink
Merge pull request #18855 from ramonlsouza/add-reactions-userlist
Browse files Browse the repository at this point in the history
fix: user reactions do not appear in userlist
  • Loading branch information
ramonlsouza committed Sep 27, 2023
2 parents 60cbcda + 47e6943 commit 5b196af
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bigbluebutton-html5/imports/ui/Types/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ export interface Voice {
startTime: number;
}

export interface Reaction {
reactionEmoji: string;
}

export interface User {
userId: string;
extId: string;
Expand All @@ -66,4 +70,5 @@ export interface User {
size: number;
away: boolean;
raiseHand: boolean;
reaction: Reaction;
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ const UserListItem: React.FC<UserListItemProps> = ({ user, lockSettings }) => {
: <Icon iconName={normalizeEmojiName('away')} />;
} if (user.emoji !== 'none' && user.emoji !== 'notAway') {
return <Icon iconName={normalizeEmojiName(user.emoji)} />;
} if (user.reaction && user.reaction.reactionEmoji !== 'none') {
return user.reaction.reactionEmoji;
} if (user.name && userAvatarFiltered.length === 0) {
return user.name.toLowerCase().slice(0, 2);
} return '';
Expand Down
3 changes: 3 additions & 0 deletions bigbluebutton-html5/imports/ui/core/graphql/queries/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ export const USER_LIST_SUBSCRIPTION = gql`subscription Users($offset: Int!, $lim
shortName
currentlyInRoom
}
reaction {
reactionEmoji
}
}
}`;

Expand Down

0 comments on commit 5b196af

Please sign in to comment.