forked from lxh/go-wxhelper
🎨 语法优化
This commit is contained in:
parent
86daff5763
commit
697f5560a4
@ -26,8 +26,13 @@ func Parse(remoteAddr net.Addr, msg []byte) {
|
|||||||
groupUser := ""
|
groupUser := ""
|
||||||
msgStr := m.Content
|
msgStr := m.Content
|
||||||
if strings.Contains(m.FromUser, "@") {
|
if strings.Contains(m.FromUser, "@") {
|
||||||
// 系统消息不单独处理
|
switch m.Type {
|
||||||
if m.Type != types.MsgTypeRecalled && m.Type != types.MsgTypeSys {
|
case types.MsgTypeRecalled:
|
||||||
|
// 消息撤回
|
||||||
|
case types.MsgTypeSys:
|
||||||
|
// 系统消息
|
||||||
|
default:
|
||||||
|
// 默认消息处理
|
||||||
groupUser = strings.Split(m.Content, "\n")[0]
|
groupUser = strings.Split(m.Content, "\n")[0]
|
||||||
groupUser = strings.ReplaceAll(groupUser, ":", "")
|
groupUser = strings.ReplaceAll(groupUser, ":", "")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user