interface ChatRoomMessage {
id: number
chat_room_id: number
chat_room_uuid: string
chat_room_participant_id: number
body: string
bookmark_id: number | null
// uses TipTap, similar to Posts but a simplified version
rich_text_body?: TipTapRichBodyText
sent_at: string
created_at: string
updated_at: string | null
deleted_at: string | null
edited_at?: string | null
embedded: false
chat_thread_id?: number
reactions: ChatMessageReaction[]
creation_uuid?: string
sender: {
id: number
name: string
community_member_id: number
user_public_uid: string
avatar_url: string
}
thread_participant_avatar_urls: string[]
parent_message_id: number | null
replies_count: number
total_thread_participants_count: number
thread_participants_preview?: OtherParticipant[]
chat_thread_replies_count: number
}
type ReactionEmoji = 'thumbsup' | 'heart' | 'joy' | 'open_mouth' | 'cry' | 'pray' | 'tada'
type ChatMessageReaction = {
emoji: ReactionEmoji
count: number
community_member_ids: number[]
}