From 5e51c63643fd4dcb17a23af08bb25cf47fad7650 Mon Sep 17 00:00:00 2001 From: Julio Capote Date: Sat, 17 Dec 2022 16:28:13 -0500 Subject: start of actor endpoint --- registry/registry.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'registry/registry.go') 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 ® } -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 } -- cgit v1.2.3