Skip to content

Commit

Permalink
Revert base class
Browse files Browse the repository at this point in the history
  • Loading branch information
tassoevan committed Oct 18, 2023
1 parent 7504aca commit 3b907d8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions apps/meteor/app/apps/server/bridges/uiInteraction.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import type { IUIKitInteraction } from '@rocket.chat/apps-engine/definition/uikit';
import type { IUser } from '@rocket.chat/apps-engine/definition/users';
import { BaseBridge } from '@rocket.chat/apps-engine/server/bridges/BaseBridge';
import { UiInteractionBridge as AppsEngineUiInteractionBridge } from '@rocket.chat/apps-engine/server/bridges/UiInteractionBridge';
import { api } from '@rocket.chat/core-services';
import type { UiKit } from '@rocket.chat/core-typings';

import type { AppServerOrchestrator } from '../../../../ee/server/apps/orchestrator';

export class UiInteractionBridge extends BaseBridge {
export class UiInteractionBridge extends AppsEngineUiInteractionBridge {
constructor(private readonly orch: AppServerOrchestrator) {
super();
}

protected async notifyUser(user: IUser, interaction: UiKit.ServerInteraction, appId: string): Promise<void> {
protected async notifyUser(user: IUser, interaction: IUIKitInteraction, appId: string): Promise<void> {
this.orch.debugLog(`The App ${appId} is sending an interaction to user.`);

const app = this.orch.getManager()?.getOneById(appId);
Expand All @@ -19,6 +20,6 @@ export class UiInteractionBridge extends BaseBridge {
throw new Error('Invalid app provided');
}

void api.broadcast('notify.uiInteraction', user.id, interaction);
void api.broadcast('notify.uiInteraction', user.id, interaction as UiKit.ServerInteraction);
}
}

0 comments on commit 3b907d8

Please sign in to comment.