Retrieve URL in NewRemoteActor
parent
d7ab3eaa44
commit
dc13a4f4d8
|
@ -14,6 +14,7 @@ import (
|
||||||
// that we want to interact with
|
// that we want to interact with
|
||||||
type RemoteActor struct {
|
type RemoteActor struct {
|
||||||
iri, outbox, inbox, sharedInbox string
|
iri, outbox, inbox, sharedInbox string
|
||||||
|
url string
|
||||||
info map[string]interface{}
|
info map[string]interface{}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +32,7 @@ func NewRemoteActor(iri string) (RemoteActor, error) {
|
||||||
|
|
||||||
outbox, _ := info["outbox"].(string)
|
outbox, _ := info["outbox"].(string)
|
||||||
inbox, _ := info["inbox"].(string)
|
inbox, _ := info["inbox"].(string)
|
||||||
|
url, _ := info["url"].(string)
|
||||||
var endpoints map[string]interface{}
|
var endpoints map[string]interface{}
|
||||||
var sharedInbox string
|
var sharedInbox string
|
||||||
if info["endpoints"] != nil {
|
if info["endpoints"] != nil {
|
||||||
|
@ -45,6 +47,7 @@ func NewRemoteActor(iri string) (RemoteActor, error) {
|
||||||
outbox: outbox,
|
outbox: outbox,
|
||||||
inbox: inbox,
|
inbox: inbox,
|
||||||
sharedInbox: sharedInbox,
|
sharedInbox: sharedInbox,
|
||||||
|
url: url,
|
||||||
}, err
|
}, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,3 +109,7 @@ func (ra RemoteActor) GetSharedInbox() string {
|
||||||
}
|
}
|
||||||
return ra.sharedInbox
|
return ra.sharedInbox
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (ra RemoteActor) URL() string {
|
||||||
|
return ra.url
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue