From a97bfb512a30da90e57fa5347545f0a0ad8b0719 Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 20 Dec 2021 21:16:00 +0000 Subject: [PATCH] Issue 11104: Don't cann the addons on Diaspora reshare --- src/Model/Item.php | 4 +++- src/Protocol/Diaspora.php | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index ca5e4bec0..07ae42d4a 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -949,7 +949,9 @@ class Item $item['parent'] = $parent_id; // Trigger automatic reactions for addons - $item['api_source'] = true; + if (!isset($item['api_source'])) { + $item['api_source'] = true; + } // We have to tell the hooks who we are - this really should be improved if (!local_user()) { diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 5caa6c7a1..3ddd5d663 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -4100,6 +4100,9 @@ class Diaspora $item['private'] = Item::PUBLIC; } + // Don't trigger the addons + $item['api_source'] = false; + return Item::insert($item, true); } }