From 6ca250bcf40d314e268718c8f208a8f00bd253d6 Mon Sep 17 00:00:00 2001 From: Michael Demetriou Date: Mon, 14 Oct 2019 12:01:07 +0300 Subject: [PATCH] Make sure endpoints["sharedInbox"] exists before using it --- remoteActor.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/remoteActor.go b/remoteActor.go index fe981e1..f68b7d9 100644 --- a/remoteActor.go +++ b/remoteActor.go @@ -34,7 +34,9 @@ func NewRemoteActor(iri string) (RemoteActor, error) { var sharedInbox string if info["endpoints"] != nil { endpoints = info["endpoints"].(map[string]interface{}) - sharedInbox = endpoints["sharedInbox"].(string) + if val, ok := endpoints["sharedInbox"]; ok { + sharedInbox = val.(string) + } } return RemoteActor{