Retrieve URL in NewRemoteActor

master
Matt Baer 2023-04-28 14:02:47 -04:00
parent d7ab3eaa44
commit dc13a4f4d8
1 changed files with 7 additions and 0 deletions

View File

@ -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
}