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/tokenpass/client/startup.js

21 lines
468 B

import { Meteor } from 'meteor/meteor';
import { ChannelSettings } from '../../channel-settings';
import { Rooms } from '../../models';
Meteor.startup(function() {
ChannelSettings.addOption({
group: ['room'],
id: 'tokenpass',
template: 'channelSettings__tokenpass',
validation(data) {
if (data && data.rid) {
const room = Rooms.findOne(data.rid, { fields: { tokenpass: 1 } });
return room && room.tokenpass;
}
return false;
},
});
});