2018-03-10 02:42:14 +08:00
|
|
|
import { Meteor } from 'meteor/meteor';
|
|
|
|
import RedisPubSub from '/imports/startup/server/redis';
|
2020-02-07 04:47:28 +08:00
|
|
|
import { extractCredentials } from '/imports/api/common/server/helpers';
|
2018-03-10 02:42:14 +08:00
|
|
|
|
2020-02-07 04:47:28 +08:00
|
|
|
export default function createGroupChat() {
|
2018-03-10 02:42:14 +08:00
|
|
|
const REDIS_CONFIG = Meteor.settings.private.redis;
|
|
|
|
const CHANNEL = REDIS_CONFIG.channels.toAkkaApps;
|
2020-02-07 04:47:28 +08:00
|
|
|
const { meetingId, requesterUserId } = extractCredentials(this.userId);
|
2018-03-10 02:42:14 +08:00
|
|
|
|
|
|
|
const eventName = 'DestroyGroupChatReqMsg';
|
|
|
|
|
|
|
|
const payload = {
|
|
|
|
// TODO: Implement this together with #4988
|
|
|
|
// chats: Array[String],
|
|
|
|
};
|
|
|
|
|
|
|
|
return RedisPubSub.publishUserMessage(CHANNEL, eventName, meetingId, requesterUserId, payload);
|
|
|
|
}
|