feat: Use identicons for avatars
This commit is contained in:
parent
50e6b2f8f9
commit
6e825fd589
@ -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}`,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user