From 24099c343930a59249700546ad47a2f81d22a57f Mon Sep 17 00:00:00 2001
From: Michael <heluecht@pirati.ca>
Date: Fri, 26 Mar 2021 20:09:23 +0000
Subject: [PATCH] Comment deletions are always send via DFRN

---
 src/Worker/Notifier.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php
index 99b6a5ec03..e1f5d6be5c 100644
--- a/src/Worker/Notifier.php
+++ b/src/Worker/Notifier.php
@@ -519,7 +519,9 @@ class Notifier
 				$contact['network'] = Protocol::DFRN;
 			}
 
-			if (in_array($contact['id'], $ap_contacts)) {
+			// Deletions are always sent via DFRN as well.
+			// This is done until we can perform deletions of foreign comments on our own threads via AP.
+			if (($cmd != Delivery::DELETION) && in_array($contact['id'], $ap_contacts)) {
 				Logger::info('Contact is already delivered via AP, so skip delivery via legacy DFRN/Diaspora', ['target' => $post_uriid, 'uid' => $sender_uid, 'contact' => $contact['url']]);
 				continue;
 			}