Skip to content
This repository has been archived by the owner on Sep 12, 2023. It is now read-only.

Commit

Permalink
intrn(manager): customize the model chain to user for chat message
Browse files Browse the repository at this point in the history
  • Loading branch information
KennethTrecy committed Sep 11, 2022
1 parent ed06d62 commit 5e7cccb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions database/managers/chat_message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { ChatMessageQueryParameters } from "$/types/query"
import type { ChatMessageAttributes } from "$/types/documents/chat_message"
import type { AttachedChatFileDocument } from "$/types/documents/attached_chat_file"
import type {
Model as BaseModel,
ModelCtor,
FindAndCountOptions,
Attributes,
Expand Down Expand Up @@ -197,6 +198,13 @@ export default class extends BaseManager<
}
}

get modelChainToUser(): readonly ModelCtor<BaseModel>[] {
return [
ChatMessageActivity,
User
]
}

private async insertModelWithUpdatedChatMessageActivity(
details: RawChatMessageAttributes & CreationAttributes<Model>
): Promise<Model> {
Expand Down

0 comments on commit 5e7cccb

Please sign in to comment.