Add-ish support for tags and mentions in new messages
Some checks failed
/ docker (push) Has been cancelled

This commit is contained in:
Melody Becker 2025-06-05 17:07:04 +02:00
parent 94106bb82f
commit b0f041e7b0
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI
14 changed files with 242 additions and 53 deletions

View file

@ -1,7 +1,9 @@
package webshared
import (
"fmt"
"slices"
"strings"
"time"
"git.mstar.dev/mstar/linstrom/config"
@ -118,3 +120,11 @@ func (u *User) FromModel(m *models.User) {
u.Verified = &m.Verified
u.FinishedRegistration = &m.FinishedRegistration
}
func UserPublicUrl(id string) string {
if strings.HasPrefix(id, "http") {
return id
} else {
return fmt.Sprintf("%s/api/activitypub/user/%s", config.GlobalConfig.General.GetFullPublicUrl(), id)
}
}