aboutsummaryrefslogtreecommitdiff
path: root/registry
diff options
context:
space:
mode:
authorJulio Capote <jcapote@gmail.com>2022-12-17 21:28:13 +0000
committerJulio Capote <jcapote@gmail.com>2022-12-17 21:28:13 +0000
commit5e51c63643fd4dcb17a23af08bb25cf47fad7650 (patch)
tree0798b6db60806003c5fc8942e3484b5fb4895e38 /registry
parent7baee5b892afcddb72a575282c6c8983d477ed44 (diff)
downloadcommunique-5e51c63643fd4dcb17a23af08bb25cf47fad7650.tar.gz
start of actor endpoint
Diffstat (limited to 'registry')
-rw-r--r--registry/registry.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/registry/registry.go b/registry/registry.go
index 04c4565..fc0e9d9 100644
--- a/registry/registry.go
+++ b/registry/registry.go
@@ -26,8 +26,13 @@ func NewRegistry(cfg config.Config) *Registry {
return &reg
}
-func (r *Registry) LookupResource(name string) *webfinger.Resource {
- handler, ok := r.handlerMap[name]
+func (r *Registry) LookupByName(name string) *webfinger.Resource {
+ fqdn := fmt.Sprintf("acct:%s@%s", name, r.cfg.Domain)
+ return r.LookupResource(fqdn)
+}
+
+func (r *Registry) LookupResource(fqdn string) *webfinger.Resource {
+ handler, ok := r.handlerMap[fqdn]
if !ok {
return nil
}