diff --git a/apps/meteor/server/modules/listeners/listeners.module.ts b/apps/meteor/server/modules/listeners/listeners.module.ts index f21081e43d0a..ce2ee7de5899 100644 --- a/apps/meteor/server/modules/listeners/listeners.module.ts +++ b/apps/meteor/server/modules/listeners/listeners.module.ts @@ -471,5 +471,13 @@ export class ListenersModule { notifications.streamApps.emitWithoutBroadcast('actions/changed'); notifications.streamApps.emitWithoutBroadcast('apps', ['actions/changed', []]); }); + + service.onEvent('mac.limitReached', () => { + notifications.notifyLoggedInThisInstance('mac.limit', { limitReached: true }); + }); + + service.onEvent('mac.limitRestored', () => { + notifications.notifyLoggedInThisInstance('mac.limit', { limitReached: false }); + }); } } diff --git a/apps/meteor/server/services/omnichannel/mac.ts b/apps/meteor/server/services/omnichannel/mac.ts deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/apps/meteor/server/services/omnichannel/service.ts b/apps/meteor/server/services/omnichannel/service.ts index 58a894477c59..5c705d4d35ac 100644 --- a/apps/meteor/server/services/omnichannel/service.ts +++ b/apps/meteor/server/services/omnichannel/service.ts @@ -32,12 +32,12 @@ export class OmnichannelService extends ServiceClassInternal implements IOmnicha }); License.onLimitReached('monthlyActiveContacts', async (): Promise => { - void this.api?.broadcast('mac.LimitReached', {}); + void this.api?.broadcast('mac.limitReached'); await this.queueWorker.stop(); }); License.onValidateLicense(async (): Promise => { - void this.api?.broadcast('mac.limitRestored', {}); + void this.api?.broadcast('mac.limitRestored'); await this.queueWorker.shouldStart(); }); } diff --git a/ee/packages/ddp-client/src/types/streams.ts b/ee/packages/ddp-client/src/types/streams.ts index a32dec470564..ceba1995b7d1 100644 --- a/ee/packages/ddp-client/src/types/streams.ts +++ b/ee/packages/ddp-client/src/types/streams.ts @@ -235,6 +235,7 @@ export interface StreamerEvents { }, { key: 'voip.statuschanged'; args: [boolean] }, + { key: 'mac.limit'; args: [{ limitReached: boolean }] }, { key: 'omnichannel.priority-changed'; args: [{ id: string; clientAction: ClientAction; name?: string }] }, ];