From 6f3b14604bd719c9a32aeb21277f7ec377cb5539 Mon Sep 17 00:00:00 2001 From: soasurs Date: Thu, 23 Mar 2023 12:51:01 +0800 Subject: [PATCH] feat: allow modify msg for any content type by callback Signed-off-by: soasurs --- internal/rpc/msg/callback.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/rpc/msg/callback.go b/internal/rpc/msg/callback.go index 4742750f0..a58895187 100644 --- a/internal/rpc/msg/callback.go +++ b/internal/rpc/msg/callback.go @@ -140,7 +140,7 @@ func callbackAfterSendGroupMsg(msg *pbChat.SendMsgReq) cbApi.CommonCallbackResp func callbackMsgModify(msg *pbChat.SendMsgReq) cbApi.CommonCallbackResp { log.NewDebug(msg.OperationID, utils.GetSelfFuncName(), msg) callbackResp := cbApi.CommonCallbackResp{OperationID: msg.OperationID} - if !config.Config.Callback.CallbackMsgModify.Enable || msg.MsgData.ContentType != constant.Text { + if !config.Config.Callback.CallbackMsgModify.Enable { return callbackResp } commonCallbackReq := copyCallbackCommonReqStruct(msg)