From 123f08191ab30edf622cf9c60a0957dc18991cf5 Mon Sep 17 00:00:00 2001 From: withchao <993506633@qq.com> Date: Mon, 4 Sep 2023 19:30:37 +0800 Subject: [PATCH] fix: jpush return a nil pointer panic --- internal/push/push_to_client.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/push/push_to_client.go b/internal/push/push_to_client.go index 50010ca84..de0ecc192 100644 --- a/internal/push/push_to_client.go +++ b/internal/push/push_to_client.go @@ -288,7 +288,7 @@ func (p *Pusher) offlinePushMsg(ctx context.Context, conversationID string, msg } func (p *Pusher) GetOfflinePushOpts(msg *sdkws.MsgData) (opts *offlinepush.Opts, err error) { - opts = &offlinepush.Opts{} + opts = &offlinepush.Opts{Signal: &offlinepush.Signal{}} // if msg.ContentType > constant.SignalingNotificationBegin && msg.ContentType < constant.SignalingNotificationEnd { // req := &sdkws.SignalReq{} // if err := proto.Unmarshal(msg.Content, req); err != nil {