aboutsummaryrefslogtreecommitdiff
path: root/activitypub
diff options
context:
space:
mode:
Diffstat (limited to 'activitypub')
-rw-r--r--activitypub/object.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/activitypub/object.go b/activitypub/object.go
index c461310..e7b7630 100644
--- a/activitypub/object.go
+++ b/activitypub/object.go
@@ -1116,6 +1116,10 @@ func GetObjectsWithoutPreviewsCallback(callback func(id string, href string, med
func GetToFromJson(to []byte) ([]string, error) {
var generic interface{}
+ if len(to) == 0 {
+ return nil, nil
+ }
+
err := json.Unmarshal(to, &generic)
if err != nil {
return nil, err