underbbs/models/msg.go

36 lines
540 B
Go
Raw Normal View History

2024-05-10 04:14:40 +00:00
package models
import (
"time"
)
type MessageFactory interface {
FromNostr(interface{}) Message
FromMasto(interface{}) Message
}
type Message struct {
Author Author
Protocol string
Content string
Attachments []Attachment
ReplyTo Message
Replies []Message
Mentions []Author
Created time.Time
Aux *interface{}
}
type Author struct {
Id string
Name string
ProfileData interface{}
Messages []Message
}
type Attachment struct {
Src string
Data []uint8
Desc string
}