updated publish channel parser to watch for anonymous

This commit is contained in:
bill bittner 2017-12-15 10:30:32 -08:00
parent 94c2fcca4c
commit 592fbb79d8

View file

@ -57,7 +57,12 @@ module.exports = {
};
},
parsePublishApiChannel ({channelName, channelPassword}, user) {
logger.debug('publish api parser input:', {channelName, channelPassword, user});
// if no channel name provided, publish will be anonymous
// if anonymous or '' provided, publish will be anonymous (even if client is logged in)
if (channelName === 'anonymous' || channelName === '') {
channelName = null;
}
// if a channel name is provided...
if (channelName) {
// make sure a password was provided