From 2a95c8c5b3866a42288bfeb1c7ab0bf62e823400 Mon Sep 17 00:00:00 2001 From: Monet Lee Date: Tue, 10 Sep 2024 12:12:26 +0800 Subject: [PATCH] update --- internal/push/offlinepush_handler.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/internal/push/offlinepush_handler.go b/internal/push/offlinepush_handler.go index f2c0deb88..239305df9 100644 --- a/internal/push/offlinepush_handler.go +++ b/internal/push/offlinepush_handler.go @@ -49,11 +49,14 @@ func (o *OfflinePushConsumerHandler) handleMsg2OfflinePush(ctx context.Context, log.ZError(ctx, "offline push Unmarshal msg err", err, "msg", string(msg)) return } - err := o.offlinePushMsg(ctx, offlinePushMsg.MsgData, offlinePushMsg.UserIDs) - if err != nil { - log.ZWarn(ctx, "offline push failed", err, "msg", offlinePushMsg.String()) - } + if offlinePushMsg.MsgData == nil && offlinePushMsg.UserIDs == nil { + log.ZInfo(ctx, "receive to OfflinePush MQ", "userIDs", offlinePushMsg.UserIDs, "msg", offlinePushMsg.MsgData) + err := o.offlinePushMsg(ctx, offlinePushMsg.MsgData, offlinePushMsg.UserIDs) + if err != nil { + log.ZWarn(ctx, "offline push failed", err, "msg", offlinePushMsg.String()) + } + } } func (c *OfflinePushConsumerHandler) getOfflinePushInfos(msg *sdkws.MsgData) (title, content string, opts *options.Opts, err error) {