From dc13a4f4d835a31e3ab0ca8cfeace8ff70826488 Mon Sep 17 00:00:00 2001 From: Matt Baer Date: Fri, 28 Apr 2023 14:02:47 -0400 Subject: [PATCH] Retrieve URL in NewRemoteActor --- remoteActor.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/remoteActor.go b/remoteActor.go index 99dabe1..86e99a2 100644 --- a/remoteActor.go +++ b/remoteActor.go @@ -14,6 +14,7 @@ import ( // that we want to interact with type RemoteActor struct { iri, outbox, inbox, sharedInbox string + url string info map[string]interface{} } @@ -31,6 +32,7 @@ func NewRemoteActor(iri string) (RemoteActor, error) { outbox, _ := info["outbox"].(string) inbox, _ := info["inbox"].(string) + url, _ := info["url"].(string) var endpoints map[string]interface{} var sharedInbox string if info["endpoints"] != nil { @@ -45,6 +47,7 @@ func NewRemoteActor(iri string) (RemoteActor, error) { outbox: outbox, inbox: inbox, sharedInbox: sharedInbox, + url: url, }, err } @@ -106,3 +109,7 @@ func (ra RemoteActor) GetSharedInbox() string { } return ra.sharedInbox } + +func (ra RemoteActor) URL() string { + return ra.url +}