Support Article objects
Includes a new Name field for them to use.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user