Support Article objects

Includes a new Name field for them to use.
This commit is contained in:
Matt Baer
2018-07-24 20:09:31 +02:00
parent a0cf234c62
commit 2b398e3b5a
+13
View File
@@ -41,6 +41,7 @@ type Object struct {
AttributedTo string `json:"attributedTo"`
To []string `json:"to"`
CC []string `json:"cc,omitempty"`
Name string `json:"name,omitempty"`
Content string `json:"content"`
ContentMap map[string]string `json:"contentMap,omitempty"`
}
@@ -56,3 +57,15 @@ func NewNoteObject() *Object {
}
return &o
}
func NewArticleObject() *Object {
o := Object{
BaseObject: BaseObject{
Type: "Article",
},
To: []string{
toPublic,
},
}
return &o
}