File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -104,17 +104,18 @@ func sendMutableNotificationToOwner(
104104 return nil
105105 }
106106
107- log .WithField ("tokens" , pushTokenRecords ).Debug ("Found push tokens" )
107+ log .WithField ("tokens" , pushTokenRecords ).Info ("Found push tokens" )
108108 slices .SortFunc (pushTokenRecords , func (a , b * push_data.Record ) int {
109- return b .CreatedAt .Compare (a .CreatedAt )
109+ return a .CreatedAt .Compare (b .CreatedAt )
110110 })
111111
112- pushTokenRecord := pushTokenRecords [0 ]
112+ pushTokenRecord := pushTokenRecords [len ( pushTokenRecords ) - 1 ]
113113 log = log .WithField ("push_token" , pushTokenRecord .PushToken )
114114
115115 // Try push
116116 switch pushTokenRecord .TokenType {
117117 case push_data .TokenTypeFcmApns :
118+ log .Info ("Sending mutable push" )
118119 err = pusher .SendMutableAPNSPush (
119120 ctx ,
120121 pushTokenRecord .PushToken ,
@@ -125,6 +126,7 @@ func sendMutableNotificationToOwner(
125126 )
126127 case push_data .TokenTypeFcmAndroid :
127128 // todo: anything special required for Android?
129+ log .Info ("Sending data push" )
128130 err = pusher .SendDataPush (
129131 ctx ,
130132 pushTokenRecord .PushToken ,
You can’t perform that action at this time.
0 commit comments