Merge pull request #11114 from annando/issue-11104

Issue 11104: Don't execute the addons on Diaspora reshare
This commit is contained in:
Hypolite Petovan 2021-12-21 17:31:32 -05:00 committed by GitHub
commit a06ab22f24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View 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()) {

View 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);
}
}