Add more information to the post

This commit is contained in:
Peter Stuifzand 2018-04-07 15:07:04 +02:00
parent 9399dc3435
commit 44f10dc8f2
2 changed files with 25 additions and 0 deletions

View File

@ -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)
}

View File

@ -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"`