Merge pull request #18977 from Scroody/patch-2

Fix: Moderator lowering hand from toast broken
This commit is contained in:
Ramón Souza 2023-10-23 11:40:55 -03:00 committed by GitHub
commit a1dd1371e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,7 +121,7 @@ class RaiseHandNotifier extends Component {
} }
raisedHandAvatars() { raisedHandAvatars() {
const { raiseHandUsers, clearUserStatus, intl } = this.props; const { raiseHandUsers, lowerUserHands, intl } = this.props;
let users = raiseHandUsers; let users = raiseHandUsers;
if (raiseHandUsers.length > MAX_AVATAR_COUNT) users = users.slice(0, MAX_AVATAR_COUNT); if (raiseHandUsers.length > MAX_AVATAR_COUNT) users = users.slice(0, MAX_AVATAR_COUNT);
@ -134,8 +134,8 @@ class RaiseHandNotifier extends Component {
role="button" role="button"
tabIndex={0} tabIndex={0}
style={{ backgroundColor: `${u.color}` }} style={{ backgroundColor: `${u.color}` }}
onClick={() => clearUserStatus(u.userId)} onClick={() => lowerUserHands(u.userId)}
onKeyDown={(e) => (e.keyCode === ENTER ? clearUserStatus(u.userId) : null)} onKeyDown={(e) => (e.keyCode === ENTER ? lowerUserHands(u.userId) : null)}
data-test="avatarsWrapperAvatar" data-test="avatarsWrapperAvatar"
moderator={u.role === ROLE_MODERATOR} moderator={u.role === ROLE_MODERATOR}
avatar={u.avatar} avatar={u.avatar}