d28b93a586
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
27 lines
645 B
JavaScript
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}`);
|
|
}
|
|
}
|