feat: expose more apis

This commit is contained in:
2026-04-29 23:39:09 +02:00
parent fa2cca6fa4
commit 3f92e74350
14 changed files with 297 additions and 23 deletions

View File

@@ -289,6 +289,7 @@ function handleChatMessage(user: ConnectedUser, message: WsMessage): void {
function handleTyping(user: ConnectedUser, message: WsMessage): void {
const typingSid = (message['serverId'] as string | undefined) ?? user.viewedServerId;
const channelId = typeof message['channelId'] === 'string' && message['channelId'].trim() ? message['channelId'].trim() : 'general';
const isTyping = message['isTyping'] !== false;
if (typingSid && user.serverIds.has(typingSid)) {
broadcastToServer(
@@ -297,6 +298,7 @@ function handleTyping(user: ConnectedUser, message: WsMessage): void {
type: 'user_typing',
serverId: typingSid,
channelId,
isTyping,
oderId: user.oderId,
displayName: user.displayName
},