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

25 lines
653 B
Go
Raw Normal View History

2017-09-11 20:45:57 +00:00
package activitypub
2017-09-16 17:53:11 +00:00
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
2017-09-11 20:45:57 +00:00
// Outbox is a type alias for an Ordered Collection
Outbox = OrderedCollection
2017-09-16 17:53:11 +00:00
)
// OutboxNew initializes a new Outbox
func OutboxNew() *Outbox {
2019-12-05 18:02:15 +00:00
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
}