+ /**
+ * Checks if the current action is a deletion command of a account removal activity
+ * For Diaspora and ActivityPub we don't need to send single item deletion calls.
+ * These protocols do have a dedicated command for deleting a whole account.
+ *
+ * @param string $cmd Notifier command
+ * @param array $owner Sender of the post
+ * @param string $network Receiver network
+ * @return bool
+ * @throws \Friendica\Network\HTTPException\InternalServerErrorException
+ * @throws \ImagickException
+ */
+ private static function isRemovalActivity($cmd, $owner, $network)
+ {
+ return ($cmd == Delivery::DELETION) && $owner['account_removed'] && in_array($network, [Protocol::ACTIVITYPUB, Protocol::DIASPORA]);
+ }
+