30 lines
1.7 KiB
Go
30 lines
1.7 KiB
Go
|
package ap
|
||
|
|
||
|
import (
|
||
|
"net/url"
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
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
|
||
|
MkContent string `json:"_misskey_content"` // Misskey version of content
|
||
|
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 []Tag `json:"tag"` // List of hashtags
|
||
|
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?
|
||
|
|
||
|
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?
|
||
|
}
|