Enable sending notifications via gRPC to FCM topic (#531)

This commit is contained in:
Maxim Shilov
2020-07-09 14:46:52 +07:00
committed by GitHub
parent 7b7d27f16c
commit 300fdc2f22

View File

@@ -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,