The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/app/livechat/server/methods/startFileUploadRoom.js

21 lines
487 B

import { Meteor } from 'meteor/meteor';
import { Random } from 'meteor/random';
import { LivechatVisitors } from '../../../models';
import { Livechat } from '../lib/Livechat';
Meteor.methods({
'livechat:startFileUploadRoom'(roomId, token) {
const guest = LivechatVisitors.getVisitorByToken(token);
const message = {
_id: Random.id(),
rid: roomId || Random.id(),
msg: '',
ts: new Date(),
token: guest.token,
};
return Livechat.getRoom(guest, message);
},
});