diff options
author | Joram Wilander <jwawilander@gmail.com> | 2015-07-09 23:22:03 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2015-07-09 23:22:03 -0400 |
commit | 704b6766b21ef75cbec123ff73bb8872777056ff (patch) | |
tree | 86264569e2466075c242b5ddd8866a044a2481ff /api/channel.go | |
parent | 763618ef3613d0af6baea0e1d49abb6641979841 (diff) | |
parent | 3371f146f89ef13fcb083b484dd30e9a12f361f9 (diff) | |
download | chat-704b6766b21ef75cbec123ff73bb8872777056ff.tar.gz chat-704b6766b21ef75cbec123ff73bb8872777056ff.tar.bz2 chat-704b6766b21ef75cbec123ff73bb8872777056ff.zip |
Merge pull request #155 from nickago/MM-1296
MM-1296 Server now notifies users they have been added to a new channel
Diffstat (limited to 'api/channel.go')
-rw-r--r-- | api/channel.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/api/channel.go b/api/channel.go index 8264b3e74..88db27def 100644 --- a/api/channel.go +++ b/api/channel.go @@ -655,6 +655,10 @@ func addChannelMember(c *Context, w http.ResponseWriter, r *http.Request) { c.LogAudit("name=" + channel.Name + " user_id=" + userId) + message := model.NewMessage(c.Session.TeamId, "", userId, model.ACTION_USER_ADDED) + + store.PublishAndForget(message) + <-Srv.Store.Channel().UpdateLastViewedAt(id, oUser.Id) w.Write([]byte(cm.ToJson())) } |