Refactor chat page useEffect organization and improve compose intent handling
Reorganizes useEffect hooks in chat/page.tsx to follow a helper-functions-first structure, improving readability and maintainability. Adds error handling and user feedback for compose intent, preventing UI flash while processing. In send/route.ts, ensures remote user handles are fully qualified and adds debug logging. Temporarily disables key caching in keys/route.ts to address development key mismatches.
This commit is contained in:
@@ -46,12 +46,13 @@ export async function GET(request: NextRequest) {
|
||||
),
|
||||
});
|
||||
|
||||
if (cached) {
|
||||
console.log('[Chat Keys GET] Found cached remote key');
|
||||
return NextResponse.json({
|
||||
publicKey: cached.publicKey,
|
||||
});
|
||||
}
|
||||
// DEBUG: Force refresh for now to fix development key mismatches
|
||||
// if (cached) {
|
||||
// console.log('[Chat Keys GET] Found cached remote key');
|
||||
// return NextResponse.json({
|
||||
// publicKey: cached.publicKey,
|
||||
// });
|
||||
// }
|
||||
|
||||
// If not in cache, try to resolve DID to a node
|
||||
console.log('[Chat Keys GET] resolving DID to node...');
|
||||
|
||||
Reference in New Issue
Block a user