Skip to content

Commit

Permalink
feat: 保护隐私,不再显示撤回的内容
Browse files Browse the repository at this point in the history
  • Loading branch information
rehiy committed Mar 25, 2024
1 parent 63c18c3 commit 6cbeb8f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
2 changes: 1 addition & 1 deletion dbase/setting/extra.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var (
// 添加好友后的响应内容,留空则忽略
FriendHello = "群主去修仙了,请留言"
// 私聊撤回消息时响应的内容,留空则忽略
RevokeMsg = "撤回了寂寞?"
RevokeMsg = "撤回了"
// 自动下载消息中的图片
AutoSaveImage = true
// 开启后仅已注册的群和用户可以使用机器人
Expand Down
23 changes: 8 additions & 15 deletions wclient/robot/receiver_10002.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,26 +59,19 @@ func receiver10002(msg *wcferry.WxMsg) {
}

if str != "" {
output += "\n----------------\n" + str
output += "一则流芳百世的金句?"
reply(msg, output)
return
}

if origin.Type == 3 {
if origin.Remark != "" {
if origin.IsGroup {
wc.CmdClient.SendImg(origin.Remark, origin.Roomid)
} else {
wc.CmdClient.SendImg(origin.Remark, origin.Sender)
}
}
output += "\n----------------\n一张不可描述的图片"
output += "一张不可描述的图片?"
reply(msg, output)
return
}

if origin.Type == 47 {
output += "\n----------------\n一个震惊四座的表情"
output += "一个震惊四座的表情?"
reply(msg, output)
return
}
Expand All @@ -89,20 +82,20 @@ func receiver10002(msg *wcferry.WxMsg) {
if err == nil {
switch appmsg.AppMsg.Type {
case 6:
output += "\n----------------\n一份暗藏机密的文件"
output += "一份暗藏机密的文件?"
case 19:
output += "\n----------------\n多条来自异界的消息"
output += "多条来自异界的消息?"
case 57:
output += "\n----------------\n" + appmsg.AppMsg.Title
output += "一则流芳百世的金句?"
default:
output += "\n----------------\n暂不支持回显的消息类型"
output += "系统也无法揣测的消息?"
}
reply(msg, output)
return
}
}

output += "\n----------------\n暂不支持回显的消息类型"
output += "系统也无法揣测的消息?"
reply(msg, output)

}

0 comments on commit 6cbeb8f

Please sign in to comment.