summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-12-28 09:25:11 -0500
committerChristopher Speller <crspeller@gmail.com>2016-12-28 09:25:11 -0500
commit5811acca7fb654cfc4d9fa979873774294c7166d (patch)
treea315aee41aa6c3d6ba5d1d73190e5d8878cc61d3 /api
parent2294936595355703afba14a91adb73c321abf8ac (diff)
downloadchat-5811acca7fb654cfc4d9fa979873774294c7166d.tar.gz
chat-5811acca7fb654cfc4d9fa979873774294c7166d.tar.bz2
chat-5811acca7fb654cfc4d9fa979873774294c7166d.zip
Fix join message sometimes not appearing (#4909)
Diffstat (limited to 'api')
-rw-r--r--api/channel.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/api/channel.go b/api/channel.go
index 9c2baf50c..91b7ad565 100644
--- a/api/channel.go
+++ b/api/channel.go
@@ -674,11 +674,11 @@ func JoinDefaultChannels(teamId string, user *model.User, channelRole string) *m
UserId: user.Id,
}
+ InvalidateCacheForChannel(result.Data.(*model.Channel).Id)
+
if _, err := CreatePost(fakeContext, post, false); err != nil {
l4g.Error(utils.T("api.channel.post_user_add_remove_message_and_forget.error"), err)
}
-
- InvalidateCacheForChannel(result.Data.(*model.Channel).Id)
}
if result := <-Srv.Store.Channel().GetByName(teamId, "off-topic"); result.Err != nil {
@@ -698,11 +698,11 @@ func JoinDefaultChannels(teamId string, user *model.User, channelRole string) *m
UserId: user.Id,
}
+ InvalidateCacheForChannel(result.Data.(*model.Channel).Id)
+
if _, err := CreatePost(fakeContext, post, false); err != nil {
l4g.Error(utils.T("api.channel.post_user_add_remove_message_and_forget.error"), err)
}
-
- InvalidateCacheForChannel(result.Data.(*model.Channel).Id)
}
return err