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

51 lines
4.3 KiB
Go

package ap
import (
"net/url"
"time"
)
// An account
type Person struct {
Context map[string]any `json:"@context"` // Big chunk of hopefully don't give a fuck
ID url.URL `json:"id"` // URL to this resource
Type string `json:"type"` // Should always be of content "Person" (or "Service", if a bot)
Following url.URL `json:"following"` // Ordered collection of accounts this account follows
Followers url.URL `json:"followers"` // Ordered collection of accounts following this account
Inbox url.URL `json:"inbox"` // Where others send activities to (posts, follow requests, reactions, etc)
Outbox url.URL `json:"outbox"` // Where others can read this account's activities from
Featured url.URL `json:"featured"` // Ordered collection of something featured - TODO: Find out what this is
PreferredUsername string `json:"preferredUsername"` // Username
Name string `json:"name"` // Vanity name
Summary string `json:"summary"` // Description of the account. Could contain html or maybe mfm for *key
Url url.URL `json:"url"` // Public location of the account
ManualApproval bool `json:"manuallyApprovesFollowers"` // Does this account have to approve of follows before they are actual follows?
Discoverable bool `json:"discoverable"` // If this account can be found via search things? I guess?
PublicKey PublicKey `json:"publicKey"` // public key of that account. For verifying that that account is actually them
Tag []Emote `json:"tag"` // Contains custom emote info - TODO: Add proper type
Attachment PersonInfoField `json:"attachment"` // Additional profile information (fields below the description, like "Source: https://gitlab.com/mstarongitlab/linstrom")
Endpoints map[string]string `json:"endpoints"` // Stores at least the shared inbox of the server this account is on in "sharedInbox", which is an url
Icon *Media `json:"icon"` // Profile image of the account, null if not set
Image *Media `json:"image"` // Header image of the account, null if not set
// Section: Mastodon only
Indexable *bool `json:"indexable,omitempty"` // Probably if this account will be shown to search engines and crawlers?
FeaturedTags *url.URL `json:"featuredTags,omitempty"` // Collection of something, not ordered - TODO: Find out what this is
Published *time.Time `json:"published,omitempty"` // When this account was created I guess?
Memorial *bool `json:"memorial,omitempty"` // If this account is closed? Or moved? Probably closed
Devices *url.URL `json:"devices,omitempty"` // Collection of something - TODO: Find out what this is
// Section: Misskey only
SharedInbox *url.URL `json:"sharedInbox,omitempty"` // Replicates the shared inbox url here I guess
MkSummary *string `json:"_misskey_summary,omitempty"` // Misskey's version of the summary
Background *url.URL `json:"backgroundUrl,omitempty"` // Background image
IsCat *bool `json:"isCat,omitempty"` // Is the user a cat (apply cat ears in that case)
NoIndex *bool `json:"noindex,omitempty"` // probably the same as Indexable, just reversed?
SpeakAsCat *bool `json:"speakAsCat,omitempty"` // Does the account speak like a cat
Birthday *string `json:"vcard:bday,omitempty"` // Birthday date, but doesn't quite follow normalised datetime
Location *string `json:"vcard:Address,omitempty"` // Where the user of the account lives, could technically be anything as just a string
// Section: Akkoma things
AlsoKnownAs *[]any `json:"alsoKnownAs"` // Meaning unknown
Capabilities *map[string]any `json:"capabilities"` // Meaning unknown
}