linstrom/ap/note-object.go

31 lines
1.8 KiB
Go
Raw Normal View History

2024-01-30 11:26:41 +00:00
package ap
import (
"net/url"
"time"
)
2024-01-31 16:56:07 +00:00
// A post
2024-01-30 11:26:41 +00:00
type Note struct {
2024-01-31 16:56:07 +00:00
Context *map[string]any `json:"@context,omitempty"` // Lots of something. Not included if note is embedded as object in another object
2024-01-30 11:26:41 +00:00
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
2024-01-31 16:56:07 +00:00
Source *RawNoteContent `json:"source"` // Raw content
2024-01-30 11:26:41 +00:00
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
2024-01-31 16:56:07 +00:00
Tag []any `json:"tag"` // List of hashtags, mentions & custom emotes
2024-01-30 11:26:41 +00:00
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?
2024-01-31 16:56:07 +00:00
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?
2024-01-30 11:26:41 +00:00
}