From ed176ec71a9bfe98cae0a708f78debf4fff0a541 Mon Sep 17 00:00:00 2001 From: EpicMo <1982742309@qq.com> Date: Sat, 2 Sep 2023 09:12:56 +0800 Subject: [PATCH] fix: magic msg out of range --- src/services/message/handler.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/services/message/handler.go b/src/services/message/handler.go index 14bc7a0..38f6c31 100644 --- a/src/services/message/handler.go +++ b/src/services/message/handler.go @@ -463,7 +463,7 @@ func sendMagicMessage() { logger.WithFields(logrus.Fields{ "UserId": friend.Id, "Err": err, - }).Errorf("Cannot get recommend video of user %d", friend.Id) + }).Errorf("Cannot get recommend video of user") logging.SetSpanError(span, err) continue } @@ -476,7 +476,7 @@ func sendMagicMessage() { ActorId: config.EnvCfg.MagicUserId, VideoIds: []uint32{videoId}, }) - if err != nil { + if err != nil || len(videoQueryResponse.VideoList) < 1 { logger.WithFields(logrus.Fields{ "UserId": friend.Id, "VideoId": videoId,