Signing works

This commit is contained in:
Melody Becker 2025-04-10 16:40:06 +02:00
parent d272fa90b4
commit da2a89010c
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI
19 changed files with 348 additions and 100 deletions

View file

@ -4,6 +4,7 @@ import (
"slices"
"time"
"git.mstar.dev/mstar/linstrom/config"
"git.mstar.dev/mstar/linstrom/shared"
"git.mstar.dev/mstar/linstrom/storage-new/models"
)
@ -97,7 +98,11 @@ func (u *User) FromModel(m *models.User) {
u.BannerId = &m.IconId.String
}
u.Indexable = m.Indexable
u.PublicKey = append(u.PublicKey, m.PublicKey...)
if config.GlobalConfig.Experimental.UseEd25519Keys {
u.PublicKey = append(u.PublicKey, m.PublicKeyEd...)
} else {
u.PublicKey = append(u.PublicKey, m.PublicKeyRsa...)
}
u.RestrictedFollow = m.RestrictedFollow
if m.Location.Valid {
u.Location = &m.Location.String