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/channel-settings/server/functions/saveStreamingOptions.ts

22 lines
677 B

import { Meteor } from 'meteor/meteor';
import { Match, check } from 'meteor/check';
import { Rooms } from '@rocket.chat/models';
export const saveStreamingOptions = async function (rid: string, options: Record<string, any>): Promise<void> {
if (!Match.test(rid, String)) {
throw new Meteor.Error('invalid-room', 'Invalid room', {
function: 'RocketChat.saveStreamingOptions',
});
}
check(options, {
id: Match.Optional(String),
type: Match.Optional(String),
url: Match.Optional(String),
thumbnail: Match.Optional(String),
isAudioOnly: Match.Optional(Boolean),
message: Match.Optional(String),
});
await Rooms.setStreamingOptionsById(rid, options);
};