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/apps/server/bridges/uiInteraction.js

19 lines
462 B

import { Notifications } from '../../../notifications/server';
export class UiInteractionBridge {
constructor(orch) {
this.orch = orch;
}
async notifyUser(user, interaction, appId) {
this.orch.debugLog(`The App ${ appId } is sending an interaction to user.`);
const app = this.orch.getManager().getOneById(appId);
if (!app) {
throw new Error('Invalid app provided');
}
Notifications.notifyUser(user.id, 'uiInteraction', interaction);
}
}