diff --git a/client/src/app/gateways/notify.service.ts b/client/src/app/gateways/notify.service.ts index 3313464af5..b5a236c9cd 100644 --- a/client/src/app/gateways/notify.service.ts +++ b/client/src/app/gateways/notify.service.ts @@ -30,7 +30,6 @@ interface NotifyBase { */ export interface NotifyRequest extends NotifyBase { channel_id: string; - to_all?: boolean; /** * Targeted Meeting as MeetingID @@ -83,7 +82,7 @@ interface ChannelIdResponse { interface NotifySendOptions { name: string; message: T; - toAll?: boolean; + meeting?: number; users?: number[]; channels?: string[]; } @@ -145,12 +144,17 @@ export class NotifyService extends BaseICCGatewayService(name: string, content: T): Promise { - await this.send(this.buildRequest({ name, message: content, toAll: true })); + * @param meetingId The meeting id to send this message to + */ + public async sendToMeeting( + name: string, + content: T, + meetingId: number = this.activeMeetingIdService.meetingId + ): Promise { + await this.send(this.buildRequest({ name, message: content, meeting: meetingId })); } /** @@ -197,8 +201,8 @@ export class NotifyService extends BaseICCGatewayService(this.EDIT_NOTIFICATION_NAME, content); + this.notifyService.sendToMeeting(this.EDIT_NOTIFICATION_NAME, content); } } diff --git a/client/src/app/ui/modules/sidenav/modules/easter-egg/modules/c4-dialog/components/c4-dialog/c4-dialog.component.ts b/client/src/app/ui/modules/sidenav/modules/easter-egg/modules/c4-dialog/components/c4-dialog/c4-dialog.component.ts index 25b96037dd..92bdebf8e5 100644 --- a/client/src/app/ui/modules/sidenav/modules/easter-egg/modules/c4-dialog/components/c4-dialog/c4-dialog.component.ts +++ b/client/src/app/ui/modules/sidenav/modules/easter-egg/modules/c4-dialog/components/c4-dialog/c4-dialog.component.ts @@ -363,7 +363,7 @@ export class C4DialogComponent implements OnInit, OnDestroy { */ public enter_search(): void { this.caption = this.translate.instant(`Searching for players ...`); - this.notifyService.sendToAllUsers(`c4_search_request`, { name: this.getPlayerName() }); + this.notifyService.sendToMeeting(`c4_search_request`, { name: this.getPlayerName() }); } /**