summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/post.go5
-rw-r--r--api/websocket_test.go2
2 files changed, 2 insertions, 5 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)
diff --git a/api/websocket_test.go b/api/websocket_test.go
index 0a39a012f..a3c716abd 100644
--- a/api/websocket_test.go
+++ b/api/websocket_test.go
@@ -227,7 +227,7 @@ func TestWebSocketEvent(t *testing.T) {
}
evt2 := model.NewWebSocketEvent(model.WEBSOCKET_EVENT_TYPING, "", "somerandomid", "", nil)
- go th.App.Publish(evt2)
+ th.App.Publish(evt2)
time.Sleep(300 * time.Millisecond)
eventHit = false