mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Skip notifications for expired sessions (#8934)
This commit is contained in:
committed by
Harrison Healey
parent
3bae67489f
commit
ed59e2b735
@@ -752,6 +752,11 @@ func (a *App) sendPushNotification(post *model.Post, user *model.User, channel *
|
||||
msg.Message = a.getPushNotificationMessage(post.Message, explicitMention, channelWideMention, hasFiles, senderName, channelName, channel.Type, replyToThreadType, userLocale)
|
||||
|
||||
for _, session := range sessions {
|
||||
|
||||
if session.IsExpired() {
|
||||
continue
|
||||
}
|
||||
|
||||
tmpMessage := *model.PushNotificationFromJson(strings.NewReader(msg.ToJson()))
|
||||
tmpMessage.SetDeviceIdAndPlatform(session.DeviceId)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user