summaryrefslogtreecommitdiffstats
path: root/app/post.go
diff options
context:
space:
mode:
Diffstat (limited to 'app/post.go')
-rw-r--r--app/post.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/post.go b/app/post.go
index 6d34cc035..d7bc2cf71 100644
--- a/app/post.go
+++ b/app/post.go
@@ -110,9 +110,6 @@ func CreatePost(post *model.Post, teamId string, triggerWebhooks bool) (*model.P
}
}
- InvalidateCacheForChannel(rpost.ChannelId)
- InvalidateCacheForChannelPosts(rpost.ChannelId)
-
if err := handlePostEvents(rpost, teamId, triggerWebhooks); err != nil {
return nil, err
}
@@ -139,6 +136,9 @@ func handlePostEvents(post *model.Post, teamId string, triggerWebhooks bool) *mo
channel = result.Data.(*model.Channel)
}
+ InvalidateCacheForChannel(channel)
+ InvalidateCacheForChannelPosts(channel.Id)
+
var user *model.User
if result := <-uchan; result.Err != nil {
return result.Err