This repository has been archived on 2022-11-27. You can view files and clone it, but cannot push or open issues or pull requests.
activitypub/outbox.go
2019-12-05 19:02:15 +01:00

25 lines
653 B
Go

package activitypub
type (
// OutboxStream contains activities the user has published,
// subject to the ability of the requestor to retrieve the activity (that is,
// the contents of the outbox are filtered by the permissions of the person reading it).
OutboxStream = Outbox
// Outbox is a type alias for an Ordered Collection
Outbox = OrderedCollection
)
// OutboxNew initializes a new Outbox
func OutboxNew() *Outbox {
id := ID("outbox")
i := Outbox{ID: id, Type: OrderedCollectionType}
i.Name = NaturalLanguageValuesNew()
i.Content = NaturalLanguageValuesNew()
i.TotalItems = 0
i.OrderedItems = make(ItemCollection, 0)
return &i
}