Update handler.go
This commit is contained in:
parent
39dbc3a9a0
commit
4c602f780f
@ -630,7 +630,6 @@ func (a *ChatHandler) UserSwitchAutoReplyStatus(c *gin.Context) {
|
||||
}
|
||||
service.Success(c, resp)
|
||||
}
|
||||
|
||||
func (a *ChatHandler) SetSwitchAutoReplyStatus(c *gin.Context) {
|
||||
chatUser, code := jwt.ParseToChatUser(c)
|
||||
if code != 0 {
|
||||
@ -653,7 +652,16 @@ func (a *ChatHandler) SetSwitchAutoReplyStatus(c *gin.Context) {
|
||||
} else {
|
||||
msg.Text = "已进入人工,不会接收自动消息"
|
||||
}
|
||||
err := logic.NewMessage(c, &a.cache, chatUser, dto.NewMessageRequest{
|
||||
sender := &accountFiee.ChatUserData{
|
||||
ID: a.robot.Info.ID,
|
||||
NickName: a.robot.Name,
|
||||
Account: a.robot.Info.Account,
|
||||
Role: 3,
|
||||
Origin: a.robot.Info.Origin,
|
||||
OriginId: a.robot.Info.OriginId,
|
||||
Avatar: a.robot.Info.Avatar,
|
||||
}
|
||||
err := logic.NewMessage(c, &a.cache, sender, dto.NewMessageRequest{
|
||||
Robot: true,
|
||||
SessionId: sessionId,
|
||||
Message: msg,
|
||||
|
Loading…
Reference in New Issue
Block a user