refactor: 重命名Message.RawMsg

This commit is contained in:
lixiangwuxian
2024-10-13 14:40:32 +08:00
parent eed624194a
commit 1495ac516b
11 changed files with 61 additions and 38 deletions

View File

@@ -24,16 +24,16 @@ func init() {
func headmasterHandler(msg model.Message) (reply model.Reply) {
from := util.From(msg.GroupInfo.GroupId, msg.UserId)
if len(msg.Msg) > 7 && msg.Msg[0:7] == "校长 " {
if len(msg.RawMsg) > 7 && msg.RawMsg[0:7] == "校长 " {
return model.Reply{
ReplyMsg: ask(from, msg.Msg[7:]),
ReplyMsg: ask(from, msg.RawMsg[7:]),
ReferOriginMsg: true,
FromMsg: msg,
}
}
// nickname := msg.UserNickName
return model.Reply{
ReplyMsg: ask(from, msg.Msg),
ReplyMsg: ask(from, msg.RawMsg),
ReferOriginMsg: true,
FromMsg: msg,
}