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

21 lines
568 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.createIndexAsync({ meetingId: 1, chatId: 1 });
UsersTyping.createIndexAsync({ 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 };