Add more information to the post
This commit is contained in:
parent
9399dc3435
commit
44f10dc8f2
|
@ -177,6 +177,30 @@ func mapToItem(result map[string]interface{}) microsub.Item {
|
|||
}
|
||||
}
|
||||
|
||||
if likeOf, e := result["like-of"]; e {
|
||||
item.LikeOf = likeOf.([]string)
|
||||
}
|
||||
|
||||
if value, e := result["repost-of"]; e {
|
||||
item.RepostOf = value.([]string)
|
||||
}
|
||||
|
||||
if value, e := result["bookmark-of"]; e {
|
||||
item.BookmarkOf = value.([]string)
|
||||
}
|
||||
|
||||
if value, e := result["in-reply-to"]; e {
|
||||
item.InReplyTo = value.([]string)
|
||||
}
|
||||
|
||||
if value, e := result["photo"]; e {
|
||||
item.Photo = value.([]string)
|
||||
}
|
||||
|
||||
if value, e := result["category"]; e {
|
||||
item.Category = value.([]string)
|
||||
}
|
||||
|
||||
if published, e := result["published"]; e {
|
||||
item.Published = published.(string)
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ type Item struct {
|
|||
Photo []string `json:"photo"`
|
||||
LikeOf []string `json:"like-of"`
|
||||
BookmarkOf []string `json:"bookmark-of"`
|
||||
RepostOf []string `json:"repost-of"`
|
||||
InReplyTo []string `json:"in-reply-to"`
|
||||
Summary []string `json:"summary,omitempty"`
|
||||
Content Content `json:"content,omitempty"`
|
||||
|
|
Loading…
Reference in New Issue
Block a user