feat: include chatPublicKey in user profiles and the swarm user interface.

This commit is contained in:
Christomatt
2026-01-27 04:00:27 +01:00
parent 0d03933292
commit 1726ef0c7b
3 changed files with 41 additions and 36 deletions
@@ -22,6 +22,7 @@ export interface SwarmUserProfile {
isBot?: boolean;
botOwnerHandle?: string; // Handle of the bot's owner (e.g., "user" or "user@domain")
nodeDomain: string;
chatPublicKey?: string;
}
export interface SwarmUserPost {
@@ -91,6 +92,7 @@ export async function GET(request: NextRequest, context: RouteContext) {
isBot: user.isBot || undefined,
botOwnerHandle: user.isBot && user.botOwner ? user.botOwner.handle : undefined,
nodeDomain,
chatPublicKey: user.chatPublicKey || undefined,
};
// Get user's recent posts
+1
View File
@@ -62,6 +62,7 @@ export async function GET(request: Request, context: RouteContext) {
isSwarm: true,
nodeDomain: remoteDomain,
isBot: profile.isBot || false,
chatPublicKey: profile.chatPublicKey,
}
});
}
+2
View File
@@ -318,7 +318,9 @@ export interface SwarmUserProfile {
postsCount: number;
createdAt: string;
isBot?: boolean;
botOwnerHandle?: string; // Handle of the bot's owner (e.g., "user" or "user@domain")
nodeDomain: string;
chatPublicKey?: string;
}
export interface SwarmUserPost {