|
@@ -146,6 +146,9 @@ func Do(mode string, rmsg *dingbot.ReceiveMsg) error {
|
|
|
logger.Error("往MySQL新增数据失败,错误信息:", err)
|
|
|
}
|
|
|
logger.Info(fmt.Sprintf("🤖 %s得到的答案: %#v", rmsg.SenderNick, reply))
|
|
|
+ if public.JudgeSensitiveWord(reply) {
|
|
|
+ reply = public.SolveSensitiveWord(reply)
|
|
|
+ }
|
|
|
// 回复@我的用户
|
|
|
_, err = rmsg.ReplyToDingtalk(string(dingbot.TEXT), reply)
|
|
|
if err != nil {
|
|
@@ -204,6 +207,9 @@ func Do(mode string, rmsg *dingbot.ReceiveMsg) error {
|
|
|
// 将当前回答的ID放入缓存
|
|
|
public.UserService.SetAnswerID(rmsg.SenderNick, rmsg.GetChatTitle(), aid)
|
|
|
logger.Info(fmt.Sprintf("🤖 %s得到的答案: %#v", rmsg.SenderNick, reply))
|
|
|
+ if public.JudgeSensitiveWord(reply) {
|
|
|
+ reply = public.SolveSensitiveWord(reply)
|
|
|
+ }
|
|
|
// 回复@我的用户
|
|
|
_, err = rmsg.ReplyToDingtalk(string(dingbot.TEXT), reply)
|
|
|
if err != nil {
|