Add outbox and liked initializations to person

Made Person conform to the LinkOrUri interface
This commit is contained in:
Marius Orcsik 2018-07-13 10:13:31 +02:00
parent 5d39ddce9a
commit a60599cd02
No known key found for this signature in database
GPG key ID: 889CE8E4FB2D877A

View file

@ -194,8 +194,12 @@ func ActorNew(id ObjectID, typ ActivityVocabularyType) *Actor {
a.Content = make(NaturalLanguageValue)
a.Summary = make(NaturalLanguageValue)
in := InboxNew()
out := OutboxNew()
liked := LikedNew()
a.Inbox = InboxStream(*in)
a.Outbox = OutboxStream(*out)
a.Liked = LikedCollection(*liked)
a.PreferredUsername = make(NaturalLanguageValue, 0)
return &a
@ -354,3 +358,7 @@ func (p Person) GetID() ObjectID {
func (p Person) GetType() ActivityVocabularyType {
return p.Type
}
func (p Person) GetLink() URI {
return p.URL.(URI)
}