diff options
author | Nick Frazier <nrflaw@gmail.com> | 2016-12-20 08:56:45 -0500 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-12-20 08:56:45 -0500 |
commit | e9a1a8d3d9ee9a952f5552fc708b0e3830b21dd1 (patch) | |
tree | 58d5cffcc37c14d38bda4becd324909f838aefef /model/post.go | |
parent | fad14e6624d229b41283227e987f2362ef1d5af5 (diff) | |
download | chat-e9a1a8d3d9ee9a952f5552fc708b0e3830b21dd1.tar.gz chat-e9a1a8d3d9ee9a952f5552fc708b0e3830b21dd1.tar.bz2 chat-e9a1a8d3d9ee9a952f5552fc708b0e3830b21dd1.zip |
GH-4685 Post a System Message when channel is renamed (#4762)
* test changes
* added system message when displayname changed
* added test
* gofmt
Diffstat (limited to 'model/post.go')
-rw-r--r-- | model/post.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/model/post.go b/model/post.go index cffe8e342..43b4ad977 100644 --- a/model/post.go +++ b/model/post.go @@ -17,6 +17,7 @@ const ( POST_JOIN_LEAVE = "system_join_leave" POST_ADD_REMOVE = "system_add_remove" POST_HEADER_CHANGE = "system_header_change" + POST_DISPLAYNAME_CHANGE = "system_displayname_change" POST_CHANNEL_DELETED = "system_channel_deleted" POST_EPHEMERAL = "system_ephemeral" POST_FILEIDS_MAX_RUNES = 150 @@ -117,7 +118,7 @@ func (o *Post) IsValid() *AppError { } // should be removed once more message types are supported - if !(o.Type == POST_DEFAULT || o.Type == POST_JOIN_LEAVE || o.Type == POST_ADD_REMOVE || o.Type == POST_SLACK_ATTACHMENT || o.Type == POST_HEADER_CHANGE) { + if !(o.Type == POST_DEFAULT || o.Type == POST_JOIN_LEAVE || o.Type == POST_ADD_REMOVE || o.Type == POST_SLACK_ATTACHMENT || o.Type == POST_HEADER_CHANGE || o.Type == POST_DISPLAYNAME_CHANGE) { return NewLocAppError("Post.IsValid", "model.post.is_valid.type.app_error", nil, "id="+o.Type) } |