diff options
Diffstat (limited to 'api')
-rw-r--r-- | api/channel.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/api/channel.go b/api/channel.go index 474c41d07..c5ec36d4b 100644 --- a/api/channel.go +++ b/api/channel.go @@ -4,7 +4,6 @@ package api import ( - "fmt" "net/http" "strconv" "strings" @@ -644,7 +643,7 @@ func addMember(c *Context, w http.ResponseWriter, r *http.Request) { return } - go app.PostUserAddRemoveMessage(c.Session.UserId, channel.Id, channel.TeamId, fmt.Sprintf(utils.T("api.channel.add_member.added"), nUser.Username, oUser.Username), model.POST_ADD_REMOVE) + go app.PostAddToChannelMessage(oUser, nUser, channel) app.UpdateChannelLastViewedAt([]string{id}, oUser.Id) w.Write([]byte(cm.ToJson())) @@ -697,7 +696,7 @@ func removeMember(c *Context, w http.ResponseWriter, r *http.Request) { return } - go app.PostUserAddRemoveMessage(c.Session.UserId, channel.Id, channel.TeamId, fmt.Sprintf(utils.T("api.channel.remove_member.removed"), user.Username), model.POST_ADD_REMOVE) + go app.PostRemoveFromChannelMessage(c.Session.UserId, user, channel) result := make(map[string]string) result["channel_id"] = channel.Id |