Merge pull request #7892 from capilkey/fix-cursor-send

Allow negative cursor updates to publish
This commit is contained in:
Anton Georgiev 2019-08-07 14:28:42 -04:00 committed by GitHub
commit cf94072b80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,10 +21,15 @@ export default function publishCursorUpdate(credentials, payload) {
whiteboardId: String, whiteboardId: String,
}); });
const { whiteboardId } = payload; const {
whiteboardId,
xPercent,
yPercent,
} = payload;
const allowed = isPodPresenter(meetingId, whiteboardId, requesterUserId) const allowed = isPodPresenter(meetingId, whiteboardId, requesterUserId)
|| getMultiUserStatus(meetingId, whiteboardId); || getMultiUserStatus(meetingId, whiteboardId)
|| (xPercent < 0 && yPercent < 0);
if (!allowed) { if (!allowed) {
throw new Meteor.Error('not-allowed', `User ${requesterUserId} is not allowed to move the cursor`); throw new Meteor.Error('not-allowed', `User ${requesterUserId} is not allowed to move the cursor`);
} }