🎨 语法优化

This commit is contained in:
李寻欢 2023-11-03 11:48:51 +08:00
parent 86daff5763
commit 697f5560a4

View File

@ -26,8 +26,13 @@ func Parse(remoteAddr net.Addr, msg []byte) {
groupUser := ""
msgStr := m.Content
if strings.Contains(m.FromUser, "@") {
// 系统消息不单独处理
if m.Type != types.MsgTypeRecalled && m.Type != types.MsgTypeSys {
switch m.Type {
case types.MsgTypeRecalled:
// 消息撤回
case types.MsgTypeSys:
// 系统消息
default:
// 默认消息处理
groupUser = strings.Split(m.Content, "\n")[0]
groupUser = strings.ReplaceAll(groupUser, ":", "")