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/packages/rocketchat-channel-settings/server/functions/saveReactWhenReadOnly.js

10 lines
373 B

import { Meteor } from 'meteor/meteor';
import { Match } from 'meteor/check';
RocketChat.saveReactWhenReadOnly = function(rid, allowReact) {
if (!Match.test(rid, String)) {
throw new Meteor.Error('invalid-room', 'Invalid room', { function: 'RocketChat.saveReactWhenReadOnly' });
}
return RocketChat.models.Rooms.setAllowReactingWhenReadOnlyById(rid, allowReact);
};