From 1b31a07b40d4fe20be1a496a99b97ab842df72e4 Mon Sep 17 00:00:00 2001 From: soasurs <4958649+soasurs@users.noreply.github.com> Date: Thu, 23 Mar 2023 12:53:22 +0800 Subject: [PATCH] feat: allow modify msg for any content type by callback (#352) * feat: add recvID/groupID for msg modification callback Signed-off-by: soasurs * feat: allow modify msg for any content type by callback Signed-off-by: soasurs --------- 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)