Allow replies as well

This commit is contained in:
Michael 2017-09-14 10:00:45 +00:00
parent cf6874cffc
commit 9468b7427d

View file

@ -418,18 +418,13 @@ class ostatus {
self::processPost($xpath, $entry, $item, $importer); self::processPost($xpath, $entry, $item, $importer);
if ($initialize && (count(self::$itemlist) > 0)) { if ($initialize && (count(self::$itemlist) > 0)) {
if (self::$itemlist[0]['uri'] == self::$itemlist[0]['parent-uri']) {
// We will import it everytime, when it is started by our contacts // We will import it everytime, when it is started by our contacts
$valid = !empty(self::$itemlist[0]['contact-id']); $valid = !empty(self::$itemlist[0]['contact-id']);
if (!$valid) { if (!$valid) {
// If not, then it depends on this setting // If not, then it depends on this setting
$valid = !Config::get('system','ostatus_full_threads'); $valid = !Config::get('system','ostatus_full_threads');
} }
if ($valid) {
// But we will only import complete threads
$valid = self::$itemlist[0]['uri'] == self::$itemlist[0]['parent-uri'];
}
if ($valid) { if ($valid) {
// Never post a thread when the only interaction by our contact was a like // Never post a thread when the only interaction by our contact was a like
$valid = false; $valid = false;
@ -440,6 +435,10 @@ class ostatus {
} }
} }
} }
} else {
// But we will only import complete threads
$valid = dba::exists('item', array('uid' => $importer["uid"], 'uri' => self::$itemlist[0]['parent-uri']));
}
if ($valid) { if ($valid) {
$default_contact = 0; $default_contact = 0;