diff options
Diffstat (limited to 'model/post.go')
-rw-r--r-- | model/post.go | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/model/post.go b/model/post.go index 7cf0f1b35..4a774b5d4 100644 --- a/model/post.go +++ b/model/post.go @@ -122,12 +122,13 @@ type PostActionIntegrationResponse struct { func (o *Post) ToJson() string { copy := *o copy.StripActionIntegrations() - b, err := json.Marshal(©) - if err != nil { - return "" - } else { - return string(b) - } + b, _ := json.Marshal(©) + return string(b) +} + +func (o *Post) ToUnsanitizedJson() string { + b, _ := json.Marshal(o) + return string(b) } func PostFromJson(data io.Reader) *Post { |