This commit is contained in:
2025-09-06 12:05:27 +03:00
Unverified
parent 7a9feda991
commit 7429289dc6
4 changed files with 27 additions and 24 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ export class DMPanel extends MessagePanel {
this.addMessage({
id: envelope.id,
content: plaintext,
username: isAuthor ? "You" : this.dmData.username,
username: isAuthor ? this.currentUser.currentUser?.username ?? "You" : this.dmData.username,
timestamp: envelope.timestamp,
is_read: false,
is_edited: false
+1 -4
View File
@@ -1,6 +1,6 @@
import { create } from "zustand";
import type { Message, User, WebSocketMessage } from "../core/types";
import { request, reconnectWebSocket } from "../websocket";
import { request } from "../websocket";
import { MessagePanel } from "./panels/MessagePanel";
import { PublicChatPanel } from "./panels/PublicChatPanel";
import { DMPanel, type DMPanelData } from "./panels/DMPanel";
@@ -151,9 +151,6 @@ export const useAppState = create<AppState>((set, get) => ({
}
}));
// Reconnect WebSocket with new auth token
reconnectWebSocket();
try {
const payload: WebSocketMessage = {
type: "ping",