Compare commits
No commits in common. "5f059c1d7cfcfd2f392ea175d202d120f547d434" and "14956c06de42a455f97a8ed6a2e8dbb1ee883dce" have entirely different histories.
5f059c1d7c
...
14956c06de
@ -647,23 +647,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