From b42c01bae0e0cf11bae516d595fc7a211b0588be Mon Sep 17 00:00:00 2001 From: Jose Semedo <jose.semedo@cern.ch> Date: Tue, 14 Jun 2022 11:39:46 +0200 Subject: [PATCH] [HOTFIX] Add sendPrivate flag to all channels list DTO --- src/controllers/channels/dto.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/controllers/channels/dto.ts b/src/controllers/channels/dto.ts index 050c0eb7..0c130846 100644 --- a/src/controllers/channels/dto.ts +++ b/src/controllers/channels/dto.ts @@ -495,6 +495,13 @@ export class GetChannelResponse extends GetChannelPublicResponse { @Type(() => RelationshipResponse) relationships: RelationshipResponse; + @IsBoolean() + @JSONSchema({ + description: 'Whether the channel allows private notifications to be sent.', + example: false, + }) + sendPrivate: boolean; + constructor(channel: Channel, subscribed: boolean, manage: boolean, send: boolean) { super(channel); this.subscribed = subscribed; @@ -505,6 +512,7 @@ export class GetChannelResponse extends GetChannelPublicResponse { channel.members?.length || 0, channel.groups?.length || 0, ); + this.sendPrivate = channel.sendPrivate; } } -- GitLab