bigbluebutton-Github/bigbluebutton-html5/server/methods/userSetEmoji.js

23 lines
699 B
JavaScript
Raw Normal View History

import { publish } from '/server/redispubsub';
import { isAllowedTo } from '/server/user_permissions';
import { appendMessageHeader } from '/server/helpers';
2016-04-20 01:43:31 +08:00
Meteor.methods({
userSetEmoji(meetingId, toRaiseUserId, raisedByUserId, raisedByToken, status) {
let message;
if (isAllowedTo('setEmojiStatus', meetingId, raisedByUserId, raisedByToken)) {
message = {
payload: {
emoji_status: status,
userid: toRaiseUserId,
meeting_id: meetingId,
2016-04-20 05:16:32 +08:00
}
2016-04-20 01:43:31 +08:00
};
2016-04-20 05:16:32 +08:00
message = appendMessageHeader('user_emoji_status_message', message);
2016-04-20 01:43:31 +08:00
// publish to pubsub
publish(Meteor.config.redis.channels.toBBBApps.users, message);
}
}
});