feat: Use identicons for avatars

This commit is contained in:
April Hall 2025-01-11 14:56:41 -05:00
parent 50e6b2f8f9
commit 6e825fd589
Signed by: arithefirst
GPG Key ID: 4508A15C4DB91C5B
2 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ export function startupSocketIOServer(httpServer: HttpServer | null) {
io!.emit('message', {
user: msg.id,
message: msg.content,
imageSrc: 'https://www.arithefirst.com/images/pfp.png',
imageSrc: `https://api.dicebear.com/9.x/identicon/svg?seed=${msg.id}`,
});
}
});

View File

@ -6,7 +6,7 @@ export const load: PageLoad = async () => {
const rows = await getMessages(client, '000', 5);
const messages: TypeMessage[] = rows
? rows.map((value) => {
return { message: value.message_content, user: value.sender.toString(), imageSrc: 'https://thispersondoesnotexist.com' };
return { message: value.message_content, user: value.sender.toString(), imageSrc: `https://api.dicebear.com/9.x/identicon/svg?seed=${value.sender.toString()}` };
})
: [];
return {