linstrom/ap/note-object.go
2024-01-31 16:56:07 +00:00

30 lines
1.8 KiB
Go

package ap
import (
"net/url"
"time"
)
// A post
type Note struct {
Context *map[string]any `json:"@context,omitempty"` // Lots of something. Not included if note is embedded as object in another object
ID url.URL `json:"id"` // Url to this resource
Type string `json:"type"` // Should always be "Note"
AttributedTo url.URL `json:"attributedTo"` // Author of this note
Content string `json:"content"` // Content of this note
Source *RawNoteContent `json:"source"` // Raw content
InReplyTo *url.URL `json:"inReplyTo,omitempty"` // Note this is a reply to. Empty if not a reply
Attachment []map[string]string `json:"attachment"` // Media attachments - TODO: Make proper type for this
Tag []any `json:"tag"` // List of hashtags, mentions & custom emotes
Published time.Time `json:"published"` // When this note was created
To []url.URL `json:"to"` // Where this note should get sent to
Cc []url.URL `json:"cc"` // More where this note should get sent to
Summary *string `json:"summary"` // Summary of a post (also known as content warning)
Sensitive bool `json:"sensitive"` // Does this note have a content warning?
MkContent *string `json:"_misskey_content,omitempty"` // Misskey version of content
MkQuote *url.URL `json:"_misskey_quote,omitempty"` // Misskey link to note this quotes
QuoteUrl *url.URL `json:"quoteUrl,omitempty"` // Link to quoted note object
QuoteUri *url.URL `json:"quoteUri,omitempty"` // Same as Quote Url?
}