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"`
|
AttributedTo string `json:"attributedTo"`
|
||||||
To []string `json:"to"`
|
To []string `json:"to"`
|
||||||
CC []string `json:"cc,omitempty"`
|
CC []string `json:"cc,omitempty"`
|
||||||
|
Name string `json:"name,omitempty"`
|
||||||
Content string `json:"content"`
|
Content string `json:"content"`
|
||||||
ContentMap map[string]string `json:"contentMap,omitempty"`
|
ContentMap map[string]string `json:"contentMap,omitempty"`
|
||||||
}
|
}
|
||||||
@@ -56,3 +57,15 @@ func NewNoteObject() *Object {
|
|||||||
}
|
}
|
||||||
return &o
|
return &o
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func NewArticleObject() *Object {
|
||||||
|
o := Object{
|
||||||
|
BaseObject: BaseObject{
|
||||||
|
Type: "Article",
|
||||||
|
},
|
||||||
|
To: []string{
|
||||||
|
toPublic,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
return &o
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user