summaryrefslogtreecommitdiffstats
path: root/api/channel.go
diff options
context:
space:
mode:
Diffstat (limited to 'api/channel.go')
-rw-r--r--api/channel.go4
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()))
}