From 15d64fb201848002a25facc3bbffc9535a704df6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Wed, 26 Sep 2018 16:34:12 +0200 Subject: MM-7188: Cleaning push notification on every read, not only on channel switch (#9348) * MM-7188: Cleaning push notification on every read, not only on channel switch * Removed unnecesary goroutine * Fixing tests * Applying suggestion from PR --- api4/channel.go | 2 +- api4/post.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'api4') diff --git a/api4/channel.go b/api4/channel.go index b29d2a94c..02a7c34b5 100644 --- a/api4/channel.go +++ b/api4/channel.go @@ -1073,7 +1073,7 @@ func addChannelMember(c *Context, w http.ResponseWriter, r *http.Request) { return } - cm, err := c.App.AddChannelMember(member.UserId, channel, c.Session.UserId, postRootId) + cm, err := c.App.AddChannelMember(member.UserId, channel, c.Session.UserId, postRootId, !c.Session.IsMobileApp()) if err != nil { c.Err = err return diff --git a/api4/post.go b/api4/post.go index 6500cba32..7c116b7c7 100644 --- a/api4/post.go +++ b/api4/post.go @@ -58,7 +58,7 @@ func createPost(c *Context, w http.ResponseWriter, r *http.Request) { post.CreateAt = 0 } - rp, err := c.App.CreatePostAsUser(c.App.PostWithProxyRemovedFromImageURLs(post)) + rp, err := c.App.CreatePostAsUser(c.App.PostWithProxyRemovedFromImageURLs(post), !c.Session.IsMobileApp()) if err != nil { c.Err = err return -- cgit v1.2.3-1-g7c22