summaryrefslogtreecommitdiffstats
path: root/api/post.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/post.go')
-rw-r--r--api/post.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/api/post.go b/api/post.go
index 734cb7148..6be3ec7eb 100644
--- a/api/post.go
+++ b/api/post.go
@@ -919,6 +919,12 @@ func updatePost(c *Context, w http.ResponseWriter, r *http.Request) {
c.Err.StatusCode = http.StatusForbidden
return
}
+
+ if oldPost.IsSystemMessage() {
+ c.Err = model.NewLocAppError("updatePost", "api.post.update_post.system_message.app_error", nil, "id="+post.Id)
+ c.Err.StatusCode = http.StatusForbidden
+ return
+ }
}
hashtags, _ := model.ParseHashtags(post.Message)