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/apps/meteor/app/file-upload/client/lib/fileUploadHandler.ts

14 lines
450 B

import { Meteor } from 'meteor/meteor';
import { Accounts } from 'meteor/accounts-base';
import { Tracker } from 'meteor/tracker';
Tracker.autorun(function () {
const userId = Meteor.userId();
if (userId) {
const secure = location.protocol === 'https:' ? '; secure' : '';
document.cookie = `rc_uid=${escape(userId)}; path=/${secure}`;
document.cookie = `rc_token=${escape(Accounts._storedLoginToken() as string)}; path=/${secure}`;
}
});