bigbluebutton-Github/bigbluebutton-html5/imports/api/group-chat-msg/index.js

21 lines
560 B
JavaScript
Raw Normal View History

import { Meteor } from 'meteor/meteor';
const collectionOptions = Meteor.isClient ? {
connection: null,
} : {};
const GroupChatMsg = new Mongo.Collection('group-chat-msg');
const UsersTyping = new Mongo.Collection('users-typing', collectionOptions);
if (Meteor.isServer) {
GroupChatMsg._ensureIndex({ meetingId: 1, chatId: 1 });
2019-08-15 02:39:15 +08:00
UsersTyping._ensureIndex({ meetingId: 1, isTypingTo: 1 });
}
2021-09-22 21:05:43 +08:00
// As we store chat in context, skip adding to mini mongo
if (Meteor.isClient) {
GroupChatMsg.onAdded = () => false;
}
2019-08-03 02:18:33 +08:00
export { GroupChatMsg, UsersTyping };