mirror of
https://git.friendi.ca/friendica/friendica-addons.git
synced 2025-06-07 09:54:27 +02:00
Fix handling of the 'private' field / reformatted code
This commit is contained in:
parent
f499875f5b
commit
c22e0ae831
12 changed files with 135 additions and 157 deletions
|
@ -170,7 +170,7 @@ function twitter_hook_fork(array &$b)
|
|||
$post = $b['data'];
|
||||
|
||||
if (
|
||||
$post['deleted'] || $post['private'] || ($post['created'] !== $post['edited']) ||
|
||||
$post['deleted'] || ($post['private'] == Item::PRIVATE) || ($post['created'] !== $post['edited']) ||
|
||||
!strstr($post['postopts'], 'twitter') || ($post['gravity'] != Item::GRAVITY_PARENT)
|
||||
) {
|
||||
$b['execute'] = false;
|
||||
|
@ -184,7 +184,7 @@ function twitter_post_local(array &$b)
|
|||
return;
|
||||
}
|
||||
|
||||
if ($b['edit'] || $b['private'] || $b['parent']) {
|
||||
if ($b['edit'] || ($b['private'] == Item::PRIVATE) || ($b['gravity'] != Item::GRAVITY_PARENT)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -211,7 +211,7 @@ function twitter_post_hook(array &$b)
|
|||
{
|
||||
DI::logger()->debug('Invoke post hook', $b);
|
||||
|
||||
if (($b['gravity'] != Item::GRAVITY_PARENT) || !strstr($b['postopts'], 'twitter') || $b['private'] || $b['deleted'] || ($b['created'] !== $b['edited'])) {
|
||||
if (($b['gravity'] != Item::GRAVITY_PARENT) || !strstr($b['postopts'], 'twitter') || ($b['private'] == Item::PRIVATE) || $b['deleted'] || ($b['created'] !== $b['edited'])) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue