Add missing GRPC data field (#412)
* feat(grpc): add support for data field in request body * docs: update Readme with embedmd
This commit is contained in:
@@ -82,6 +82,13 @@ func (s *Server) Send(ctx context.Context, in *proto.NotificationRequest) (*prot
|
||||
}
|
||||
}
|
||||
|
||||
if in.Data != nil {
|
||||
notification.Data = map[string]interface{}{}
|
||||
for k, v := range in.Data.Fields {
|
||||
notification.Data[k] = v
|
||||
}
|
||||
}
|
||||
|
||||
go gorush.SendNotification(notification)
|
||||
|
||||
return &proto.NotificationReply{
|
||||
|
||||
Reference in New Issue
Block a user