Add outbox and liked initializations to person
Made Person conform to the LinkOrUri interface
This commit is contained in:
parent
5d39ddce9a
commit
a60599cd02
1 changed files with 8 additions and 0 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Reference in a new issue