fix(push): use SendEachForMulticast to avoid deprecated FCM batch API
This commit is contained in:
parent
3f3e228e8a
commit
6e1ba291c0
|
|
@ -113,7 +113,7 @@ func (s *PushService) SendPushWithBadge(ctx context.Context, userID, title, body
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
br, err := s.client.SendMulticast(ctx, message)
|
br, err := s.client.SendEachForMulticast(ctx, message)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("error sending multicast message: %w", err)
|
return fmt.Errorf("error sending multicast message: %w", err)
|
||||||
}
|
}
|
||||||
|
|
@ -179,7 +179,7 @@ func (s *PushService) SendSilentPush(ctx context.Context, userID string, data ma
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
_, err = s.client.SendMulticast(ctx, message)
|
_, err = s.client.SendEachForMulticast(ctx, message)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue