summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2015-07-07 13:36:05 -0400
committerChristopher Speller <crspeller@gmail.com>2015-07-07 13:36:05 -0400
commit4e856c29b20270997ef54bdcc4260ff28390873f (patch)
tree1a99970afbfb384df22ad52e22d602926c38f972 /api
parent95b9f872882b367556ca2330eea8c8309db542e6 (diff)
parent23e527978ed3e889bebe5c879de2d4835509626a (diff)
downloadchat-4e856c29b20270997ef54bdcc4260ff28390873f.tar.gz
chat-4e856c29b20270997ef54bdcc4260ff28390873f.tar.bz2
chat-4e856c29b20270997ef54bdcc4260ff28390873f.zip
Merge pull request #138 from hmhealey/mm756
MM-756 Don't mark channels as unread after user joined/left messages
Diffstat (limited to 'api')
-rw-r--r--api/channel.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/api/channel.go b/api/channel.go
index c0c2d1548..8264b3e74 100644
--- a/api/channel.go
+++ b/api/channel.go
@@ -366,7 +366,7 @@ func JoinChannel(c *Context, channelId string, role string) {
post := &model.Post{ChannelId: channel.Id, Message: fmt.Sprintf(
`User %v has joined this channel.`,
- user.Username)}
+ user.Username), Type: model.POST_JOIN_LEAVE}
if _, err := CreatePost(c, post, false); err != nil {
l4g.Error("Failed to post join message %v", err)
c.Err = model.NewAppError("joinChannel", "Failed to send join request", "")
@@ -453,7 +453,7 @@ func leaveChannel(c *Context, w http.ResponseWriter, r *http.Request) {
post := &model.Post{ChannelId: channel.Id, Message: fmt.Sprintf(
`%v has left the channel.`,
- user.Username)}
+ user.Username), Type: model.POST_JOIN_LEAVE}
if _, err := CreatePost(c, post, false); err != nil {
l4g.Error("Failed to post leave message %v", err)
c.Err = model.NewAppError("leaveChannel", "Failed to send leave message", "")
@@ -646,7 +646,7 @@ func addChannelMember(c *Context, w http.ResponseWriter, r *http.Request) {
post := &model.Post{ChannelId: id, Message: fmt.Sprintf(
`%v added to the channel by %v`,
- nUser.Username, oUser.Username)}
+ nUser.Username, oUser.Username), Type: model.POST_JOIN_LEAVE}
if _, err := CreatePost(c, post, false); err != nil {
l4g.Error("Failed to post add message %v", err)
c.Err = model.NewAppError("addChannelMember", "Failed to add member to channel", "")