bigbluebutton-Github/bigbluebutton-html5/imports/api/1.1/deskshare/server/publishers.js

18 lines
515 B
JavaScript
Raw Normal View History

2017-06-19 19:57:32 +08:00
import Deskshare from '/imports/api/1.1/deskshare';
2016-05-10 23:23:22 +08:00
import { logger } from '/imports/startup/server/logger';
2017-06-01 01:54:43 +08:00
import mapToAcl from '/imports/startup/mapToAcl';
2016-05-07 04:15:47 +08:00
2017-06-01 01:54:43 +08:00
function deskshare(credentials) {
2016-05-17 02:12:27 +08:00
const { meetingId } = credentials;
2016-05-13 01:43:59 +08:00
logger.info(`publishing deskshare for ${meetingId}`);
2017-06-03 03:25:02 +08:00
return Deskshare.find({ meetingId });
2017-06-06 03:12:06 +08:00
}
function publish(...args) {
const boundDeskshare = deskshare.bind(this);
return mapToAcl('subscriptions.deskshare', boundDeskshare)(args);
}
Meteor.publish('deskshare', publish);