summaryrefslogtreecommitdiffstats
path: root/api/post.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2018-03-02 10:49:18 -0600
committerJoram Wilander <jwawilander@gmail.com>2018-03-02 16:49:18 +0000
commit4ebf9746905c845ee3874f87478d7450391680d8 (patch)
tree03163cd0809b2ae8c11e774ea5fbec2dff9d4e59 /api/post.go
parent2b3b6051d265edf131d006b2eb14f55284faf1e5 (diff)
downloadchat-4ebf9746905c845ee3874f87478d7450391680d8.tar.gz
chat-4ebf9746905c845ee3874f87478d7450391680d8.tar.bz2
chat-4ebf9746905c845ee3874f87478d7450391680d8.zip
remove `go Publish(...)` idiom (#8373)
Diffstat (limited to 'api/post.go')
-rw-r--r--api/post.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/api/post.go b/api/post.go
index 192dc0abc..bed2f3fdb 100644
--- a/api/post.go
+++ b/api/post.go
@@ -136,10 +136,7 @@ func saveIsPinnedPost(c *Context, w http.ResponseWriter, r *http.Request, isPinn
message := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_POST_EDITED, "", rpost.ChannelId, "", nil)
message.Add("post", c.App.PostWithProxyAddedToImageURLs(rpost).ToJson())
-
- c.App.Go(func() {
- c.App.Publish(message)
- })
+ c.App.Publish(message)
c.App.InvalidateCacheForChannelPosts(rpost.ChannelId)