summaryrefslogtreecommitdiffstats
path: root/api4
diff options
context:
space:
mode:
authorJesús Espino <jespinog@gmail.com>2018-09-26 16:34:12 +0200
committerGitHub <noreply@github.com>2018-09-26 16:34:12 +0200
commit15d64fb201848002a25facc3bbffc9535a704df6 (patch)
tree558282bb4126eef469525c3cb11ea3238919e6fa /api4
parent37e00ef916af9a5aeae760a01fa0a0cf8ca93637 (diff)
downloadchat-15d64fb201848002a25facc3bbffc9535a704df6.tar.gz
chat-15d64fb201848002a25facc3bbffc9535a704df6.tar.bz2
chat-15d64fb201848002a25facc3bbffc9535a704df6.zip
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
Diffstat (limited to 'api4')
-rw-r--r--api4/channel.go2
-rw-r--r--api4/post.go2
2 files changed, 2 insertions, 2 deletions
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