interface Conversation {
    chatsCount: number;
    createdAt: Date;
    creatorId: string;
    creatorUsername: string;
    deletedByPostCreator: boolean;
    deletedByPostUser: boolean;
    id: string;
    lastMessage: string;
    lastMessageAuthorId: string;
    messagesCount: number;
    postId: null | string;
    postImageSrc: string;
    postUserId: string;
    postUsername: string;
    title: undefined | string;
    updatedAt: Date;
}

Properties

chatsCount: number

The number of chats on the Post

createdAt: Date

The creation date of the Conversation

Example

Observed: 2024-02-22T17:50:20.363Z
creatorId: string

The User#id that created the Conversation

creatorUsername: string

The User#username that created the Conversation

deletedByPostCreator: boolean

Probably if the Post is deleted

TODO: Check this

deletedByPostUser: boolean

Probably if the Post is deleted

TODO: Check this

id: string

The unique id of the Conversation

This can be acquired by using PostAPI#getChatId

lastMessage: string

The Message.text of the most recent Message in the Conversation

lastMessageAuthorId: string

The User#id that sent the last Message in the Conversation

messagesCount: number

The number of chats on the Conversation

postId: null | string

The Post Post#id that this Conversation is in reference to

postImageSrc: string

The Post#mediaUrl to show as the header of the Conversation.

TODO: Check if this can be null

postUserId: string

The User#id that created the Post this conversation is about

postUsername: string

The User#username that created the Post

title: undefined | string

The title of the Conversation

Example

This has been seen as the username that started the conversation

TODO: Check if this is the initiator, or the other user
updatedAt: Date

The time of the last change to the Conversation

Example

Observed: 2024-02-22T17:55:29.483Z

Generated using TypeDoc