refactor: centralize avatar URL generation and backfill existing users

This commit is contained in:
2026-05-28 12:18:03 +02:00
parent dd4c7f80f3
commit fe0de5a214
3 changed files with 60 additions and 2 deletions

11
internal/users/avatar.go Normal file
View File

@@ -0,0 +1,11 @@
package users
import (
"net/url"
"strings"
)
func DefaultAvatarURL(username string) string {
seed := url.QueryEscape(strings.TrimSpace(username))
return "https://api.dicebear.com/9.x/dylan/svg?seed=" + seed
}