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

23 lines
611 B
JavaScript
Raw Normal View History

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,
},
header: {
timestamp: new Date().getTime(),
name: 'user_emoji_status_message',
version: '0.0.1',
},
};
// publish to pubsub
publish(Meteor.config.redis.channels.toBBBApps.users, message);
}
}
});