2025-02-14 15:54:36 -08:00
|
|
|
package persistence
|
2023-06-06 22:54:23 -03:00
|
|
|
|
|
|
|
type DMMessageID int
|
|
|
|
|
2023-06-22 17:58:50 -03:00
|
|
|
type DMReaction struct {
|
|
|
|
ID DMMessageID `db:"id"`
|
|
|
|
DMMessageID DMMessageID `db:"message_id"`
|
|
|
|
SenderID UserID `db:"sender_id"`
|
|
|
|
SentAt Timestamp `db:"sent_at"`
|
|
|
|
Emoji string `db:"emoji"`
|
|
|
|
}
|
|
|
|
|
2023-06-06 22:54:23 -03:00
|
|
|
type DMMessage struct {
|
2023-11-19 23:33:04 -08:00
|
|
|
ID DMMessageID `db:"id"`
|
|
|
|
DMChatRoomID DMChatRoomID `db:"chat_room_id"`
|
|
|
|
SenderID UserID `db:"sender_id"`
|
|
|
|
SentAt Timestamp `db:"sent_at"`
|
|
|
|
RequestID string `db:"request_id"`
|
|
|
|
Text string `db:"text"`
|
|
|
|
InReplyToID DMMessageID `db:"in_reply_to_id"`
|
|
|
|
EmbeddedTweetID TweetID `db:"embedded_tweet_id"`
|
|
|
|
Reactions map[UserID]DMReaction
|
2024-03-08 17:22:52 -08:00
|
|
|
|
|
|
|
Images []Image
|
|
|
|
Videos []Video
|
|
|
|
Urls []Url
|
|
|
|
|
2024-12-21 09:04:00 -08:00
|
|
|
LastReadEventUserIDs []UserID // Used for rendering
|
2023-06-06 22:54:23 -03:00
|
|
|
}
|