summaryrefslogtreecommitdiffstats
path: root/app/post.go
diff options
context:
space:
mode:
authorDebanshu Kundu <debanshu.kundu@joshtechnologygroup.com>2017-07-31 23:47:21 +0530
committerSaturnino Abril <saturnino.abril@gmail.com>2017-08-01 02:17:21 +0800
commit8a91235fb3cdc8d094dbc2eaa0d7baa447132b3c (patch)
tree28496b27f4da93baa8707bf0690ef88f8cdcc178 /app/post.go
parent59992ae4a4638006ec1489dd834151b258c1728c (diff)
downloadchat-8a91235fb3cdc8d094dbc2eaa0d7baa447132b3c.tar.gz
chat-8a91235fb3cdc8d094dbc2eaa0d7baa447132b3c.tar.bz2
chat-8a91235fb3cdc8d094dbc2eaa0d7baa447132b3c.zip
#4755 Combining consecutive user join/leave system messages to single message and few other changes. (#5945)
fix 7 and 8 remove @ at "{username} joined the channel" refactor and update test
Diffstat (limited to 'app/post.go')
-rw-r--r--app/post.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/post.go b/app/post.go
index 99626c41f..c40eab0e8 100644
--- a/app/post.go
+++ b/app/post.go
@@ -250,8 +250,8 @@ func UpdatePost(post *model.Post, safeUpdate bool) (*model.Post, *model.AppError
return nil, err
}
- if oldPost.IsSystemMessage() {
- err := model.NewAppError("UpdatePost", "api.post.update_post.system_message.app_error", nil, "id="+post.Id, http.StatusBadRequest)
+ if oldPost.IsSystemMessage() && !oldPost.IsUserActivitySystemMessage() {
+ err := model.NewAppError("updatePost", "api.post.update_post.system_message.app_error", nil, "id="+post.Id, http.StatusBadRequest)
return nil, err
}