bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/presentation/cursor/service.js
Oleksandr Zhurbenko 251bd22738 PR review fixes
2017-09-06 12:36:52 -07:00

20 lines
417 B
JavaScript

import Cursor from '/imports/api/2.0/cursor';
import Users from '/imports/api/2.0/users';
const getCurrentCursor = (cursorId) => {
const cursor = Cursor.findOne({ _id: cursorId });
if (cursor) {
const { userId } = cursor;
const user = Users.findOne({ userId });
if (user) {
cursor.userName = user.name;
return cursor;
}
}
return false;
};
export default {
getCurrentCursor,
};