Merge pull request #20108 from Tainan404/Fix-reaction

Fix: user reaction not showing right emoji
This commit is contained in:
Ramón Souza 2024-04-30 15:24:06 -03:00 committed by GitHub
commit 8bf56ccad9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,6 +4,9 @@ import RedisPubSub from '/imports/startup/server/redis';
import Logger from '/imports/startup/server/logger';
import { extractCredentials } from '/imports/api/common/server/helpers';
const ALLOWED_REACTIONS = Meteor.settings.public.userReaction.reactions;
const nativeEmojis = ALLOWED_REACTIONS.map((reaction) => reaction.native);
export default function setUserReaction(reactionEmoji, userId = undefined) {
try {
const REDIS_CONFIG = Meteor.settings.private.redis;
@ -15,6 +18,7 @@ export default function setUserReaction(reactionEmoji, userId = undefined) {
check(meetingId, String);
check(requesterUserId, String);
check(reactionEmoji, String);
if (!nativeEmojis.includes(reactionEmoji) && reactionEmoji !== 'none') return;
const payload = {
reactionEmoji,