summaryrefslogtreecommitdiffstats
path: root/model/post.go
diff options
context:
space:
mode:
Diffstat (limited to 'model/post.go')
-rw-r--r--model/post.go13
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(&copy)
- if err != nil {
- return ""
- } else {
- return string(b)
- }
+ b, _ := json.Marshal(&copy)
+ return string(b)
+}
+
+func (o *Post) ToUnsanitizedJson() string {
+ b, _ := json.Marshal(o)
+ return string(b)
}
func PostFromJson(data io.Reader) *Post {