|
@@ -61,9 +61,7 @@ func (m *WsChat) Handle(ws *ghttp.WebSocket, msg []byte) {
|
|
|
}
|
|
|
return ""
|
|
|
}()
|
|
|
- if errReply != "" {
|
|
|
- reply, from = errReply, -1
|
|
|
- } else {
|
|
|
+ if errReply == "" {
|
|
|
reply, from, err = Question.DetailQuestion(m.Ctx, req)
|
|
|
if err != nil {
|
|
|
g.Log().Error(m.Ctx, "问答异常", err)
|
|
@@ -78,7 +76,7 @@ func (m *WsChat) Handle(ws *ghttp.WebSocket, msg []byte) {
|
|
|
Actions: gconv.Int(If(errReply == "", 1, 0)),
|
|
|
QuestionId: questionId,
|
|
|
PersonId: jSession.PositionId,
|
|
|
- Item: from,
|
|
|
+ Item: gconv.Int(If(errReply == "", from, -1)),
|
|
|
CreateTime: time.Now().Format(date.Date_Full_Layout),
|
|
|
})
|
|
|
if replyId <= 0 {
|