From 4c297164a54fc9104be5467a72f153d9bf422b35 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Fri, 4 Mar 2022 18:03:22 +0800 Subject: [PATCH] cb --- config/config.yaml | 11 ++++++----- internal/rpc/msg/callback.go | 5 +++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/config/config.yaml b/config/config.yaml index c76d69ef6..c71011247 100644 --- a/config/config.yaml +++ b/config/config.yaml @@ -194,26 +194,27 @@ iospush: badgeCount: true callback: + # callback url 需要自行更换callback url callbackUrl : "http://127.0.0.1:8080/callback" # 开启关闭操作前后回调的配置 callbackbeforeSendSingleMsg: - enable: false # 回调是否启用 + enable: true # 回调是否启用 callbackTimeOut: 2 # 回调超时时间 CallbackFailedContinue: true # 回调超时是否继续执行代码 callbackAfterSendSingleMsg: - enable: false + enable: true callbackTimeOut: 2 callbackBeforeSendGroupMsg: - enable: false + enable: true callbackTimeOut: 2 CallbackFailedContinue: true callbackAfterSendGroupMsg: - enable: false + enable: true callbackTimeOut: 2 callbackWordFilter: enable: true callbackTimeOut: 2 - CallbackFailedContinue: true + CallbackFailedContinue: false notification: diff --git a/internal/rpc/msg/callback.go b/internal/rpc/msg/callback.go index 41421ec2c..a56038de8 100644 --- a/internal/rpc/msg/callback.go +++ b/internal/rpc/msg/callback.go @@ -52,6 +52,7 @@ func callbackBeforeSendSingleMsg(msg *pbChat.SendMsgReq) (canSend bool, err erro return false, nil } } + log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), err.Error()) return true, err } @@ -98,7 +99,7 @@ func callbackBeforeSendGroupMsg(msg *pbChat.SendMsgReq) (canSend bool, err error return false, nil } } - //log.NewInfo() + log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), err.Error()) return true, err } @@ -150,6 +151,6 @@ func callbackWordFilter(msg *pbChat.SendMsgReq) (canSend bool, err error) { } log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), string(msg.MsgData.Content)) } - log.NewDebug(msg.OperationID, utils.GetSelfFuncName()) + log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), err.Error()) return true, err }