feat(grpc): support ThreadID and ContentAvailable (#328)

This commit is contained in:
Bo-Yi Wu
2018-01-10 09:36:27 +08:00
committed by GitHub
parent ffd78ffaec
commit 4c203c9829
6 changed files with 135 additions and 52 deletions

View File

@@ -50,14 +50,16 @@ func (s *Server) Check(ctx context.Context, in *proto.HealthCheckRequest) (*prot
func (s *Server) Send(ctx context.Context, in *proto.NotificationRequest) (*proto.NotificationReply, error) {
var badge = int(in.Badge)
notification := gorush.PushNotification{
Platform: int(in.Platform),
Tokens: in.Tokens,
Message: in.Message,
Title: in.Title,
Topic: in.Topic,
APIKey: in.Key,
Category: in.Category,
Sound: in.Sound,
Platform: int(in.Platform),
Tokens: in.Tokens,
Message: in.Message,
Title: in.Title,
Topic: in.Topic,
APIKey: in.Key,
Category: in.Category,
Sound: in.Sound,
ContentAvailable: in.ContentAvailable,
ThreadID: in.ThreadID,
}
if badge > 0 {