Compare commits
No commits in common. "e667837d6acf06028a3707f69513c936178fec33" and "d20cd6d41bc55e2c688ff2483a42077334148eae" have entirely different histories.
e667837d6a
...
d20cd6d41b
@ -643,23 +643,5 @@ func (a *ChatHandler) SetSwitchAutoReplyStatus(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
a.cache.SetAutoReplySwitch(c, chatUser.ID, req.EnableAutoReply)
|
a.cache.SetAutoReplySwitch(c, chatUser.ID, req.EnableAutoReply)
|
||||||
msg := dto.Message{
|
|
||||||
MsgType: 1,
|
|
||||||
LocalStamp: time.Now().Unix(),
|
|
||||||
}
|
|
||||||
if req.EnableAutoReply {
|
|
||||||
msg.Text = "已退出人工"
|
|
||||||
} else {
|
|
||||||
msg.Text = "已进入人工,不会接收自动消息"
|
|
||||||
}
|
|
||||||
err := logic.NewMessage(c, &a.cache, chatUser, dto.NewMessageRequest{
|
|
||||||
Robot: true,
|
|
||||||
SessionId: fmt.Sprintf("%d", chatUser.ID),
|
|
||||||
Message: msg,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
service.Error(c, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
service.Success(c)
|
service.Success(c)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user