add publishVoiceMessage

This commit is contained in:
KDSBrowne 2017-09-12 10:58:06 -07:00
parent 090b3e91c2
commit 571c3763dd
2 changed files with 10 additions and 5 deletions

View File

@ -44,5 +44,5 @@ export default function listenOnlyToggle(credentials, isJoining = true) {
Logger.verbose(`VoiceUser '${requesterUserId}' ${isJoining
? 'joined' : 'left'} global audio from meeting '${meetingId}'`);
return RedisPubSub.publishUserMessage(CHANNEL, EVENT_NAME, meetingId, Meeting.voiceProp.voiceConf, payload);
return RedisPubSub.publishVoiceMessage(CHANNEL, EVENT_NAME, Meeting.voiceProp.voiceConf, payload);
}

View File

@ -40,6 +40,15 @@ class RedisPubSub2x {
return this.emitter.on(...args);
}
publishVoiceMessage(channel, eventName, voiceConf, payload) {
const header = {
name: eventName,
voiceConf
}
this.publish(channel, eventName, header, payload);
}
publishSystemMessage(channel, eventName, payload) {
const header = {
name: eventName
@ -104,10 +113,6 @@ class RedisPubSub2x {
requesterId: 'nodeJSapp',
};
const header = {
name: EVENT_NAME,
};
this.publishSystemMessage(CHANNEL, EVENT_NAME, body);
this.didSendRequestEvent = true;
}