summary refs log tree commit diff
path: root/src/models/Channel.ts
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-31 20:32:50 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-05-31 20:32:50 +0200
commit0713f89bba9b4e4b11e7503877bb69f3907e02b4 (patch)
tree41cb308b0f98bcb899f46759f97facca4b714e02 /src/models/Channel.ts
parent:bug: fix config (diff)
downloadserver-0713f89bba9b4e4b11e7503877bb69f3907e02b4.tar.xz
:art: rename recipients -> recipient_ids
Diffstat (limited to 'src/models/Channel.ts')
-rw-r--r--src/models/Channel.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/models/Channel.ts b/src/models/Channel.ts

index d96a80dc..a77e492d 100644 --- a/src/models/Channel.ts +++ b/src/models/Channel.ts
@@ -5,7 +5,7 @@ import { UserModel } from "./User"; // @ts-ignore export interface AnyChannel extends Channel, DMChannel, TextChannel, VoiceChannel { - recipients: null | string[]; + recipient_ids: null | string[]; } export interface ChannelDocument extends Document, AnyChannel { @@ -44,6 +44,9 @@ ChannelSchema.virtual("recipients", { justOne: false, autopopulate: true, }); + +ChannelSchema.set("removeResponse", ["recipient_ids"]); + // @ts-ignore export const ChannelModel = db.model<ChannelDocument>("Channel", ChannelSchema, "channels");