fix: 修改多个处理函数的返回类型为指针类型,以提高内存使用效率并避免不必要的拷贝

This commit is contained in:
lixiangwuxian
2025-04-09 23:28:39 +08:00
parent 144034939c
commit 7f0560b56e
32 changed files with 211 additions and 210 deletions

View File

@@ -13,17 +13,17 @@ func init() {
handler.RegisterHelpInform("撤回", "drawback", "发送 <引用消息>撤回 撤回消息")
}
func drawback(msg model.Message) model.Reply {
func drawback(msg model.Message) *model.Reply {
msgIdToDrawback := message.ReplyMessage{}
if err := msgIdToDrawback.ParseMessage(msg.RawMsg); err != nil {
return model.Reply{
return &model.Reply{
ReplyMsg: "",
ReferOriginMsg: false,
FromMsg: msg,
}
}
action.ActionManager.DrawbackMsg(int32(msgIdToDrawback.Data.ID))
return model.Reply{
return &model.Reply{
ReplyMsg: "",
ReferOriginMsg: false,
FromMsg: msg,