feat: multi-WebSocket connection manager for instance federation

Refactor the WebSocket layer from a singleton connection to a connection
map supporting N concurrent instances. Each connection has its own
heartbeat worker, reconnect state, and token. Stores are now
instance-aware: serverStore merges servers by origin, chatStore routes
API calls through the correct client, and instanceStore triggers WS
connect/disconnect on add/remove. DM, social, and voice events remain
home-only.
This commit is contained in:
Jannis Braun
2026-03-02 23:53:30 +01:00
parent ef7aa3ff5a
commit 5194dbef25
6 changed files with 444 additions and 156 deletions
+2 -2
View File
@@ -60,9 +60,9 @@ export function Message({ message, isCompact, isFirstInGroup }: MessageProps) {
const toggleReaction = (emoji: string) => {
const hasReacted = message.reactions?.some(r => r.userId === currentUser?.id && r.emoji === emoji);
if (hasReacted) {
removeReaction(message.id, emoji);
removeReaction(message.id, emoji, channelKey);
} else {
addReaction(message.id, emoji);
addReaction(message.id, emoji, channelKey);
}
};