diff options
author | =Corey Hulen <corey@hulen.com> | 2015-11-16 18:45:05 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-11-16 18:45:05 -0800 |
commit | efbd1c4214894ba3d25ede1630a66befc7c672f3 (patch) | |
tree | 05463632f37765ad94b7c642de37710c88a00cc8 | |
parent | fd74098264e3ff84f3cdff2c79c323468c6500b6 (diff) | |
download | chat-efbd1c4214894ba3d25ede1630a66befc7c672f3.tar.gz chat-efbd1c4214894ba3d25ede1630a66befc7c672f3.tar.bz2 chat-efbd1c4214894ba3d25ede1630a66befc7c672f3.zip |
Adding device type
-rw-r--r-- | api/post.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/api/post.go b/api/post.go index ef70e1336..0860fd299 100644 --- a/api/post.go +++ b/api/post.go @@ -544,11 +544,10 @@ func sendNotificationsAndForget(c *Context, post *model.Post, team *model.Team, alreadySeen := make(map[string]string) for _, session := range sessions { - if len(session.DeviceId) > 0 && alreadySeen[session.DeviceId] == "" { - + if len(session.DeviceId) > 0 && alreadySeen[session.DeviceId] == "" && strings.HasPrefix(session.DeviceId, "apple:") { alreadySeen[session.DeviceId] = session.DeviceId - utils.SendAppleNotifyAndForget(session.DeviceId, subjectPage.Render(), 1) + utils.SendAppleNotifyAndForget(strings.TrimPrefix(session.DeviceId, "apple:"), subjectPage.Render(), 1) } } } |