feat: include chatPublicKey in user profiles and the swarm user interface.
This commit is contained in:
@@ -22,6 +22,7 @@ export interface SwarmUserProfile {
|
|||||||
isBot?: boolean;
|
isBot?: boolean;
|
||||||
botOwnerHandle?: string; // Handle of the bot's owner (e.g., "user" or "user@domain")
|
botOwnerHandle?: string; // Handle of the bot's owner (e.g., "user" or "user@domain")
|
||||||
nodeDomain: string;
|
nodeDomain: string;
|
||||||
|
chatPublicKey?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SwarmUserPost {
|
export interface SwarmUserPost {
|
||||||
@@ -91,6 +92,7 @@ export async function GET(request: NextRequest, context: RouteContext) {
|
|||||||
isBot: user.isBot || undefined,
|
isBot: user.isBot || undefined,
|
||||||
botOwnerHandle: user.isBot && user.botOwner ? user.botOwner.handle : undefined,
|
botOwnerHandle: user.isBot && user.botOwner ? user.botOwner.handle : undefined,
|
||||||
nodeDomain,
|
nodeDomain,
|
||||||
|
chatPublicKey: user.chatPublicKey || undefined,
|
||||||
};
|
};
|
||||||
|
|
||||||
// Get user's recent posts
|
// Get user's recent posts
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ export async function GET(request: Request, context: RouteContext) {
|
|||||||
isSwarm: true,
|
isSwarm: true,
|
||||||
nodeDomain: remoteDomain,
|
nodeDomain: remoteDomain,
|
||||||
isBot: profile.isBot || false,
|
isBot: profile.isBot || false,
|
||||||
|
chatPublicKey: profile.chatPublicKey,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -318,7 +318,9 @@ export interface SwarmUserProfile {
|
|||||||
postsCount: number;
|
postsCount: number;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
isBot?: boolean;
|
isBot?: boolean;
|
||||||
|
botOwnerHandle?: string; // Handle of the bot's owner (e.g., "user" or "user@domain")
|
||||||
nodeDomain: string;
|
nodeDomain: string;
|
||||||
|
chatPublicKey?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SwarmUserPost {
|
export interface SwarmUserPost {
|
||||||
|
|||||||
Reference in New Issue
Block a user