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
15 lines
587 B
JavaScript
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;
|