feat: implement websocket URL creation and enhance websocket connection logging

This commit is contained in:
mlogclub
2026-04-14 19:59:49 +08:00
parent 2222256f5a
commit 0f3d110018
5 changed files with 27 additions and 8 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
import { request } from "@/lib/api/client"
import { generateUUID } from "@/lib/utils"
import { createWebSocketBaseUrl } from "@/lib/api/websocket"
export type Paging = {
page: number
@@ -124,7 +125,7 @@ export function getImVisitorId() {
}
export function createImWebSocketUrl() {
const baseUrl = API_BASE_URL.replace(/^http/, "ws")
const baseUrl = createWebSocketBaseUrl()
const params = new URLSearchParams({
externalId: getImVisitorId(),
externalSource: OPEN_IM_EXTERNAL_SOURCE,