]> git.mxchange.org Git - friendica.git/commitdiff
Issue 11104: Don't cann the addons on Diaspora reshare
authorMichael <heluecht@pirati.ca>
Mon, 20 Dec 2021 21:16:00 +0000 (21:16 +0000)
committerMichael <heluecht@pirati.ca>
Mon, 20 Dec 2021 21:16:00 +0000 (21:16 +0000)
src/Model/Item.php
src/Protocol/Diaspora.php

index ca5e4bec02b94fa4231bba30082a09f0a6f50a56..07ae42d4a54d4c1e43c41c232d7d1583d2c49a09 100644 (file)
@@ -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()) {
index 5caa6c7a151147d53b296042af66c5872db6f3c3..3ddd5d663f483829d02e684d36385f69a025b7d9 100644 (file)
@@ -4100,6 +4100,9 @@ class Diaspora
                        $item['private'] = Item::PUBLIC;
                }
 
+               // Don't trigger the addons
+               $item['api_source'] = false;
+
                return Item::insert($item, true);
        }
 }