Add func to add ap links to local users (untested)
All checks were successful
/ docker (push) Successful in 4m27s

This commit is contained in:
Melody Becker 2025-05-15 11:13:58 +02:00
parent e69f53bbd7
commit f991a1f353
7 changed files with 84 additions and 22 deletions

View file

@ -1,6 +1,11 @@
package activitypub
import "strings"
import (
"fmt"
"strings"
"git.mstar.dev/mstar/linstrom/config"
)
type InvalidFullHandleError struct {
Raw string
@ -17,3 +22,11 @@ func SplitFullHandle(full string) (string, string, error) {
}
return splits[0], splits[1], nil
}
func UserIdToApUrl(id string) string {
return fmt.Sprintf(
"%s/api/activitypub/user/%s",
config.GlobalConfig.General.GetFullPublicUrl(),
id,
)
}