Skip to content

Commit

Permalink
fix: 修复新建会话时ip地址错误的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zgqgit committed Jul 11, 2024
1 parent 91ec7ef commit f029f67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/bisheng/chat/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from bisheng.api.services.audit_log import AuditLogService
from bisheng.api.services.user_service import UserPayload
from bisheng.api.utils import build_flow_no_yield
from bisheng.api.utils import build_flow_no_yield, get_request_ip
from bisheng.api.v1.schemas import ChatMessage, ChatResponse, FileResponse
from bisheng.cache import cache_manager
from bisheng.cache.flow import InMemoryCache
Expand Down Expand Up @@ -410,7 +410,7 @@ async def _process_when_payload(self, flow_id: str, chat_id: str,
"user_id": user_id,
"user_name": UserDao.get_user(user_id).user_name,
})
AuditLogService.create_chat_flow(login_user, websocket.client.host, flow_id)
AuditLogService.create_chat_flow(login_user, get_request_ip(websocket), flow_id)
start_resp.type = 'start'

# should input data
Expand Down

0 comments on commit f029f67

Please sign in to comment.