use Friendica\Object\Image;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network;
+use Friendica\Database\DBM;
require_once 'boot.php';
require_once 'include/dba.php';
}
$item = Item::insert($postarray);
+
+ if ($notify) {
+ $item = $notify;
+ }
+
$postarray["id"] = $item;
logger('twitter_fetchparentpost: User ' . $self["nick"] . ' posted parent timeline item ' . $item);
continue;
}
- $item = Item::insert($postarray);
+ $notify = false;
+
+ if ($postarray['uri'] == $postarray['parent-uri']) {
+ $contact = dba::selectFirst('contact', [], ['id' => $postarray['contact-id'], 'self' => false]);
+ if (DBM::is_result($contact)) {
+ $notify = Item::isRemoteSelf($contact, $postarray);
+ }
+ }
+
+ $item = Item::insert($postarray, false, $notify);
$postarray["id"] = $item;
logger('twitter_fetchhometimeline: User ' . $self["nick"] . ' posted home timeline item ' . $item);