diff --git a/spec/mainApiHandler.spec.ts b/spec/mainApiHandler.spec.ts index f141eba0..928b12b4 100644 --- a/spec/mainApiHandler.spec.ts +++ b/spec/mainApiHandler.spec.ts @@ -673,7 +673,7 @@ describe('main api handler', () => { const spy = jest.spyOn(openfinHandler, 'unregisterIntentHandler'); const value = { cmd: apiCmds.openfinUnregisterIntentHandler, - intentName: 'ViewContact', + uuid: 'uuid', }; ipcMain.send(apiName.symphonyApi, value); diff --git a/src/app/main-api-handler.ts b/src/app/main-api-handler.ts index 5630bc79..93c1d209 100644 --- a/src/app/main-api-handler.ts +++ b/src/app/main-api-handler.ts @@ -649,7 +649,7 @@ ipcMain.handle( case apiCmds.openfinJoinSessionContextGroup: return openfinHandler.joinSessionContextGroup(arg.contextGroupId); case apiCmds.openfinUnregisterIntentHandler: - return openfinHandler.unregisterIntentHandler(arg.intentName); + return openfinHandler.unregisterIntentHandler(arg.uuid); case apiCmds.openfinFireIntentForContext: return openfinHandler.fireIntentForContext(arg.context); case apiCmds.openfinRemoveFromContextGroup: diff --git a/src/app/openfin-handler.ts b/src/app/openfin-handler.ts index 36c6348a..97417e7c 100644 --- a/src/app/openfin-handler.ts +++ b/src/app/openfin-handler.ts @@ -118,10 +118,12 @@ export class OpenfinHandler { /** * Removes an intent handler for a given intent */ - public unregisterIntentHandler(uuid: UUID) { + public async unregisterIntentHandler(uuid: UUID) { const unsubscriptionCallback = this.intentHandlerSubscriptions.get(uuid); - unsubscriptionCallback.unsubscribe(); + + const response = await unsubscriptionCallback.unsubscribe(); this.intentHandlerSubscriptions.delete(uuid); + return response; } /** diff --git a/src/renderer/ssf-api.ts b/src/renderer/ssf-api.ts index d7f5230d..6166461c 100644 --- a/src/renderer/ssf-api.ts +++ b/src/renderer/ssf-api.ts @@ -1070,7 +1070,7 @@ export class SSFApi { const response = await local.ipcRenderer.invoke(apiName.symphonyApi, { cmd: apiCmds.openfinUnregisterIntentHandler, - callbackId, + uuid: callbackId, }); return response; }