2018-03-10 02:42:14 +08:00
|
|
|
import { Meteor } from 'meteor/meteor';
|
|
|
|
|
2021-10-20 04:35:39 +08:00
|
|
|
const collectionOptions = Meteor.isClient ? {
|
|
|
|
connection: null,
|
|
|
|
} : {};
|
|
|
|
|
|
|
|
const GroupChat = new Mongo.Collection('group-chat', collectionOptions);
|
2018-03-10 02:42:14 +08:00
|
|
|
|
|
|
|
if (Meteor.isServer) {
|
2023-03-16 21:03:29 +08:00
|
|
|
GroupChat.createIndexAsync({
|
2018-03-10 02:42:14 +08:00
|
|
|
meetingId: 1, chatId: 1, access: 1, users: 1,
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
export default GroupChat;
|
|
|
|
|
2018-07-26 22:56:26 +08:00
|
|
|
const CHAT_ACCESS = {
|
2018-03-10 02:42:14 +08:00
|
|
|
PUBLIC: 'PUBLIC_ACCESS',
|
|
|
|
PRIVATE: 'PRIVATE_ACCESS',
|
|
|
|
};
|
|
|
|
|
|
|
|
export const CHAT_ACCESS_PUBLIC = CHAT_ACCESS.PUBLIC;
|
|
|
|
export const CHAT_ACCESS_PRIVATE = CHAT_ACCESS.PRIVATE;
|