Enable sending notifications via gRPC to FCM topic (#531)
This commit is contained in:
parent
7b7d27f16c
commit
300fdc2f22
|
@ -68,6 +68,10 @@ func (s *Server) Send(ctx context.Context, in *proto.NotificationRequest) (*prot
|
|||
notification.Badge = &badge
|
||||
}
|
||||
|
||||
if in.Topic != "" && in.Platform == gorush.PlatFormAndroid {
|
||||
notification.To = in.Topic
|
||||
}
|
||||
|
||||
if in.Alert != nil {
|
||||
notification.Alert = gorush.Alert{
|
||||
Title: in.Alert.Title,
|
||||
|
|
Loading…
Reference in New Issue