kryptokrona / hugin-api

RESTful API and WebSocket server for the Hugin Messenger service.
https://kryptokrona.org
Other
28 stars 8 forks source link

[Feature]: Get avatar string URL in message object and save to DB #168

Closed mjovanc closed 2 years ago

mjovanc commented 2 years ago

Description of feature request

No response

Why is this needed

No response

Code of Conduct

f-r00t commented 2 years ago

Not sure what the purpose of this is. The avatars are generated from the senders XKR-adress, and are easily generated on the frontend. IMO thats where all the avatar handling should occur.

mjovanc commented 2 years ago

@f-r00t Perhaps @Swepool can elaborate on this since it was requested by him.

Swepool commented 2 years ago

Yes, I had them generated for each address but google slaughter our page score for that. Hence why I thought it could be a good idea to serve the src url instead. One could render this on server side on request or on client side load as few avatars as possible to use pagination to load the rest. Bu tI don't see an issue pre generating them.

Swepool commented 2 years ago

For SPA's or apps this is not an issue really.

Swepool commented 2 years ago

Would be nice to just src={message.avatar} that shit as well :P

f-r00t commented 2 years ago

I see, thanks Google.. Well, maybe it's a good idea then!