diff options
author | Emma [it/its]@Rory& <root@rory.gay> | 2023-12-11 01:12:54 +0100 |
---|---|---|
committer | Emma [it/its]@Rory& <root@rory.gay> | 2023-12-11 01:12:54 +0100 |
commit | 0a8ceb9e6349284e75545a01ffad608b020f78e2 (patch) | |
tree | 17a9163f963eddabf9168b0b630096b2f7535b64 /src/util/dtos/DmChannelDTO.ts | |
parent | Prettier: use editorconfig (diff) | |
download | server-dev/emma-refactors.tar.xz |
Actually run prettier dev/emma-refactors
Diffstat (limited to 'src/util/dtos/DmChannelDTO.ts')
-rw-r--r-- | src/util/dtos/DmChannelDTO.ts | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/util/dtos/DmChannelDTO.ts b/src/util/dtos/DmChannelDTO.ts index 8427f7f9..26829d58 100644 --- a/src/util/dtos/DmChannelDTO.ts +++ b/src/util/dtos/DmChannelDTO.ts @@ -29,11 +29,7 @@ export class DmChannelDTO { recipients: MinimalPublicUserDTO[]; type: number; - static async from( - channel: Channel, - excluded_recipients: string[] = [], - origin_channel_id?: string, - ) { + static async from(channel: Channel, excluded_recipients: string[] = [], origin_channel_id?: string) { const obj = new DmChannelDTO(); obj.icon = channel.icon || null; obj.id = channel.id; @@ -51,7 +47,7 @@ export class DmChannelDTO { where: { id: r.user_id }, select: PublicUserProjection, }); - }) || [], + }) || [] ) ).map((u) => new MinimalPublicUserDTO(u)); return obj; @@ -60,9 +56,7 @@ export class DmChannelDTO { excludedRecipients(excluded_recipients: string[]): DmChannelDTO { return { ...this, - recipients: this.recipients.filter( - (r) => !excluded_recipients.includes(r.id), - ), + recipients: this.recipients.filter((r) => !excluded_recipients.includes(r.id)), }; } } |