Add func to add ap links to local users (untested)
All checks were successful
/ docker (push) Successful in 4m27s
All checks were successful
/ docker (push) Successful in 4m27s
This commit is contained in:
parent
e69f53bbd7
commit
f991a1f353
7 changed files with 84 additions and 22 deletions
|
@ -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,
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue