Regression: Send app info along with interaction payload to the UI (#16511)

pull/16514/head
Douglas Gubert 5 years ago committed by GitHub
parent c2d559a400
commit 762c4e9155
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      app/apps/server/bridges/uiInteraction.js

@ -8,6 +8,18 @@ export class UiInteractionBridge {
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');
}
const { name, iconFileContent } = app.getInfo();
Object.assign(interaction, {
appInfo: { name, base64Icon: iconFileContent },
});
Notifications.notifyUser(user.id, 'uiInteraction', interaction);
}
}

Loading…
Cancel
Save