Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
mattermost-server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
sysadmin
mattermost
mattermost-server
Commits
89852d04
Commit
89852d04
authored
Sep 27, 2018
by
Jesús Espino
Committed by
George Goldberg
Sep 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When leave a channel the push notification can fail (#9478)
parent
e77f9d06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
app/channel.go
app/channel.go
+7
-1
No files found.
app/channel.go
View file @
89852d04
...
...
@@ -1565,7 +1565,13 @@ func (a *App) MarkChannelsAsViewed(channelIds []string, userId string, clearPush
if
*
a
.
Config
()
.
EmailSettings
.
SendPushNotifications
&&
clearPushNotifications
{
for
_
,
channelId
:=
range
channelIds
{
if
model
.
IsValidId
(
channelId
)
{
member
:=
(
<-
a
.
Srv
.
Store
.
Channel
()
.
GetMember
(
channelId
,
userId
))
.
Data
.
(
*
model
.
ChannelMember
)
result
:=
<-
a
.
Srv
.
Store
.
Channel
()
.
GetMember
(
channelId
,
userId
)
if
result
.
Err
!=
nil
{
mlog
.
Warn
(
fmt
.
Sprintf
(
"Failed to get membership %v"
,
result
.
Err
))
continue
}
member
:=
result
.
Data
.
(
*
model
.
ChannelMember
)
notify
:=
member
.
NotifyProps
[
model
.
PUSH_NOTIFY_PROP
]
if
notify
==
model
.
CHANNEL_NOTIFY_DEFAULT
{
user
,
_
:=
a
.
GetUser
(
userId
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment