feat: Implement remote user profile caching and enhance chat conversation list display with updated styling.

This commit is contained in:
Christomatt
2026-01-29 01:00:22 +01:00
parent 491eb07fea
commit 9710a16f83
7 changed files with 168 additions and 51 deletions
+10
View File
@@ -64,6 +64,16 @@ export async function POST(request: NextRequest) {
publicKey = remoteProfile.publicKey;
senderDisplayName = remoteProfile.displayName || handle;
senderAvatarUrl = remoteProfile.avatarUrl;
// CACHE: Upsert the remote user into our local database
const { upsertRemoteUser } = await import('@/lib/swarm/user-cache');
await upsertRemoteUser({
handle: handle, // already full handle if remote
displayName: senderDisplayName,
avatarUrl: senderAvatarUrl || null,
did: did || '',
isBot: remoteProfile.isBot || false
});
}
}
} else {