Skip to content

Commit ec7c77f

Browse files
committed
Log
1 parent 46a338b commit ec7c77f

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

‎backend/shared/src/websockets/server.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
CLIENT_MESSAGE_SCHEMA,
1111
} from 'common/api/websockets'
1212
import {IS_LOCAL} from "common/envs/constants";
13+
import {getWebsocketUrl} from "common/api/utils";
1314

1415
const SWITCHBOARD = new Switchboard()
1516

@@ -127,7 +128,7 @@ export function listen(server: HttpServer, path: string) {
127128
const wss = new WebSocketServer({ server, path })
128129
let deadConnectionCleaner: NodeJS.Timeout | undefined
129130
wss.on('listening', () => {
130-
log.info(`Web socket server listening on ${path}.`)
131+
log.info(`Web socket server listening on ${path}. ${getWebsocketUrl()}`)
131132
deadConnectionCleaner = setInterval(function ping() {
132133
const now = Date.now()
133134
for (const ws of wss.clients) {

‎web/hooks/use-private-messages.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@ import { PrivateMessageChannel } from 'common/supabase/private-messages'
1515
import { useAPIGetter } from 'web/hooks/use-api-getter'
1616
import { useApiSubscription } from 'web/hooks/use-api-subscription'
1717
import { usePersistentInMemoryState } from 'web/hooks/use-persistent-in-memory-state'
18+
import {getWebsocketUrl} from "common/api/utils";
1819

1920
export function usePrivateMessages(
2021
channelId: number,
2122
limit: number,
2223
userId: string
2324
) {
25+
console.log('getWebsocketUrl', getWebsocketUrl())
2426
const [messages, setMessages] = usePersistentLocalState<
2527
PrivateChatMessage[] | undefined
2628
>(undefined, `private-messages-${channelId}-${limit}-v1`)

0 commit comments

Comments
 (0)