bigbluebutton-Github/bigbluebutton-html5/imports/api/user-reaction/index.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

15 lines
587 B
JavaScript

import { Meteor } from 'meteor/meteor';
const expireSeconds = Meteor.settings.public.userReaction.expire;
const UserReaction = new Mongo.Collection('user-reaction');
if (Meteor.isServer) {
// TTL indexes are special single-field indexes to automatically remove documents
// from a collection after a certain amount of time.
// A single-field with only a date is necessary to this special single-field index, because
// compound indexes do not support TTL.
UserReaction._ensureIndex({ creationDate: 1 }, { expireAfterSeconds: expireSeconds });
}
export default UserReaction;