diff options
-rw-r--r-- | OutboxPost.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/OutboxPost.go b/OutboxPost.go index a51d509..c5d5f2a 100644 --- a/OutboxPost.go +++ b/OutboxPost.go @@ -566,9 +566,11 @@ func ParseInboxRequest(w http.ResponseWriter, r *http.Request, db *sql.DB) { for _, e := range activity.To { actor := GetActorFromDB(db, e) if actor.Id != "" { - for _, e := range activity.Object.Replies.OrderedItems { - TombstoneObjectFromCache(db, e.Id) - DeleteObject(db, e.Id) + if activity.Object.Replies != nil { + for _, k := range activity.Object.Replies.OrderedItems { + TombstoneObjectFromCache(db, k.Id) + DeleteObject(db, k.Id) + } } TombstoneObjectFromCache(db, activity.Object.Id) break @@ -587,6 +589,7 @@ func ParseInboxRequest(w http.ResponseWriter, r *http.Request, db *sql.DB) { fmt.Println("follow request for rejected") response := RejectActivity(activity) MakeActivityRequest(db, response) + return } } break @@ -597,7 +600,8 @@ func ParseInboxRequest(w http.ResponseWriter, r *http.Request, db *sql.DB) { SetActorFollowingDB(db, activity) } break - } + } + } func MakeActivityFollowingReq(w http.ResponseWriter, r *http.Request, activity Activity) bool { |