Merge pull request #18855 from ramonlsouza/add-reactions-userlist
fix: user reactions do not appear in userlist
This commit is contained in:
commit
5b196afb3b
@ -42,6 +42,10 @@ export interface Voice {
|
|||||||
startTime: number;
|
startTime: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Reaction {
|
||||||
|
reactionEmoji: string;
|
||||||
|
}
|
||||||
|
|
||||||
export interface User {
|
export interface User {
|
||||||
userId: string;
|
userId: string;
|
||||||
extId: string;
|
extId: string;
|
||||||
@ -66,4 +70,5 @@ export interface User {
|
|||||||
size: number;
|
size: number;
|
||||||
away: boolean;
|
away: boolean;
|
||||||
raiseHand: boolean;
|
raiseHand: boolean;
|
||||||
|
reaction: Reaction;
|
||||||
}
|
}
|
||||||
|
@ -108,6 +108,8 @@ const UserListItem: React.FC<UserListItemProps> = ({ user, lockSettings }) => {
|
|||||||
: <Icon iconName={normalizeEmojiName('away')} />;
|
: <Icon iconName={normalizeEmojiName('away')} />;
|
||||||
} if (user.emoji !== 'none' && user.emoji !== 'notAway') {
|
} if (user.emoji !== 'none' && user.emoji !== 'notAway') {
|
||||||
return <Icon iconName={normalizeEmojiName(user.emoji)} />;
|
return <Icon iconName={normalizeEmojiName(user.emoji)} />;
|
||||||
|
} if (user.reaction && user.reaction.reactionEmoji !== 'none') {
|
||||||
|
return user.reaction.reactionEmoji;
|
||||||
} if (user.name && userAvatarFiltered.length === 0) {
|
} if (user.name && userAvatarFiltered.length === 0) {
|
||||||
return user.name.toLowerCase().slice(0, 2);
|
return user.name.toLowerCase().slice(0, 2);
|
||||||
} return '';
|
} return '';
|
||||||
|
@ -53,6 +53,9 @@ export const USER_LIST_SUBSCRIPTION = gql`subscription Users($offset: Int!, $lim
|
|||||||
shortName
|
shortName
|
||||||
currentlyInRoom
|
currentlyInRoom
|
||||||
}
|
}
|
||||||
|
reaction {
|
||||||
|
reactionEmoji
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}`;
|
}`;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user