feat: Include chat public key in conversation data and enhance chat page layout for full width and dynamic height.

This commit is contained in:
Christomatt
2026-01-27 04:16:05 +01:00
parent 5262cb1dbd
commit c007741b65
4 changed files with 18 additions and 5 deletions
@@ -54,6 +54,7 @@ export async function GET(request: NextRequest) {
handle: participant2Handle,
displayName: participant2Handle,
avatarUrl: null as string | null,
chatPublicKey: null as string | null,
};
// Try to get cached user info
@@ -66,6 +67,7 @@ export async function GET(request: NextRequest) {
handle: cachedUser.handle,
displayName: cachedUser.displayName || cachedUser.handle,
avatarUrl: cachedUser.avatarUrl,
chatPublicKey: cachedUser.publicKey, // This is the chat public key
};
}
+6 -1
View File
@@ -1,7 +1,12 @@
/* Chat Page Styles */
.chat-page {
height: calc(100vh - 60px);
height: 100vh;
/* Use dynamic viewport height for mobile browsers */
height: 100dvh;
max-height: 100dvh;
display: flex;
flex-direction: column;
}
.chat-container {
+6 -1
View File
@@ -9,7 +9,12 @@ import './chat.css';
interface Conversation {
id: string;
participant2: { handle: string; displayName: string; avatarUrl: string | null; chatPublicKey: string | null; };
participant2: {
handle: string;
displayName: string;
avatarUrl: string | null;
chatPublicKey: string | null;
};
lastMessageAt: string;
lastMessagePreview: string;
unreadCount: number;
+3 -2
View File
@@ -260,8 +260,9 @@ a.btn-primary:visited {
}
.layout.hide-right-sidebar .main {
flex: 0 1 920px !important;
max-width: 920px !important;
flex: 1 !important;
max-width: 100% !important;
width: 100%;
}
.aside {