linstrom/ap/create-action.go

19 lines
1,017 B
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
// Sent when posting something
2024-01-30 11:26:41 +00:00
type CreateAction struct {
2024-01-31 16:56:07 +00:00
Context *map[string]any `json:"@context,omitempty"` // Lots of something. Not included if action is embedded as object in another object
ID url.URL `json:"id"` // URL to this resource
Actor url.URL `json:"actor"` // Account that created this action, links to the AP url
Type string `json:"type"` // Should always be "Create"
Published time.Time `json:"published"` // When this action was created
Object any `json:"object"` // Content of the action, is an AP object, like notes or questions (survey)
To []url.URL `json:"to"` // Array of url targets to deliver it to. With dms, oonly includes target accounts. Followers only goes to followers url of posting account
Cc []url.URL `json:"cc"` // More targets to deliver to?
2024-01-30 11:26:41 +00:00
}