diff options
author | Tsilavina Razafinirina <t.razafinirina@gmail.com> | 2017-11-20 18:15:33 +0300 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2017-11-20 10:15:33 -0500 |
commit | ab6ef954b4acbd30ba87c2a7680e7843b946adca (patch) | |
tree | a3cd78018f1379412b6c80a8718324dc94182b64 /model/post.go | |
parent | 3836f9992056410e00041004132f5d53b4e43300 (diff) | |
download | chat-ab6ef954b4acbd30ba87c2a7680e7843b946adca.tar.gz chat-ab6ef954b4acbd30ba87c2a7680e7843b946adca.tar.bz2 chat-ab6ef954b4acbd30ba87c2a7680e7843b946adca.zip |
PLT-6217 Fixes system message posted to Town Square when a member leaves a team (#7752)
* Fixes system message posted to Town Square when adding/removing team member (#6483)
Fixes unit test method call to match RemoveUserFromTeam modification (#6483)
Fixes system message posted to Town Square when adding/removing team member (#6483)
Removes unnessary error message
* Updates system message when a user leaves a team (#6483)
* Changes system message when a user is removed from team (#6483)
* Adds a new string to be post to town-square when a member is added to a team (#6483)
Diffstat (limited to 'model/post.go')
-rw-r--r-- | model/post.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/model/post.go b/model/post.go index a7be63432..8e4689eb7 100644 --- a/model/post.go +++ b/model/post.go @@ -19,8 +19,10 @@ const ( POST_JOIN_LEAVE = "system_join_leave" // Deprecated, use POST_JOIN_CHANNEL or POST_LEAVE_CHANNEL instead POST_JOIN_CHANNEL = "system_join_channel" POST_LEAVE_CHANNEL = "system_leave_channel" + POST_LEAVE_TEAM = "system_leave_team" POST_ADD_REMOVE = "system_add_remove" // Deprecated, use POST_ADD_TO_CHANNEL or POST_REMOVE_FROM_CHANNEL instead POST_ADD_TO_CHANNEL = "system_add_to_channel" + POST_ADD_TO_TEAM = "system_add_to_team" POST_REMOVE_FROM_CHANNEL = "system_remove_from_channel" POST_HEADER_CHANGE = "system_header_change" POST_DISPLAYNAME_CHANGE = "system_displayname_change" @@ -167,8 +169,8 @@ func (o *Post) IsValid() *AppError { } if !(o.Type == POST_DEFAULT || o.Type == POST_JOIN_LEAVE || o.Type == POST_ADD_REMOVE || - o.Type == POST_JOIN_CHANNEL || o.Type == POST_LEAVE_CHANNEL || - o.Type == POST_REMOVE_FROM_CHANNEL || o.Type == POST_ADD_TO_CHANNEL || + o.Type == POST_JOIN_CHANNEL || o.Type == POST_LEAVE_CHANNEL || o.Type == POST_LEAVE_TEAM || + o.Type == POST_REMOVE_FROM_CHANNEL || o.Type == POST_ADD_TO_CHANNEL || o.Type == POST_ADD_TO_TEAM || o.Type == POST_SLACK_ATTACHMENT || o.Type == POST_HEADER_CHANGE || o.Type == POST_PURPOSE_CHANGE || o.Type == POST_DISPLAYNAME_CHANGE || o.Type == POST_CHANNEL_DELETED || strings.HasPrefix(o.Type, POST_CUSTOM_TYPE_PREFIX)) { |