bigbluebutton-Github/bigbluebutton-html5/imports/api/user-reaction/server/modifiers/clearReactions.js
Max Franke d28b93a586 feat(reactions): add user reaction
add user-reaction collection
add emoji picker for user reaction in the user list
add options to enable/disable user-reaction
add a way to pass style to emoji-picker component
2023-04-27 11:54:11 -03:00

27 lines
645 B
JavaScript

import UserReaction from '/imports/api/user-reaction';
import Logger from '/imports/startup/server/logger';
export default function clearReactions(meetingId) {
const selector = {};
if (meetingId) {
selector.meetingId = meetingId;
}
try {
const numberAffected = UserReaction.remove(selector);
if (numberAffected) {
if (meetingId) {
Logger.info(`Removed UserReaction (${meetingId})`);
} else {
Logger.info('Removed UserReaction (all)');
}
} else {
Logger.warn('Removing UserReaction nonaffected');
}
} catch (err) {
Logger.error(`Removing UserReaction: ${err}`);
}
}