Allow replies as well
This commit is contained in:
parent
cf6874cffc
commit
9468b7427d
|
@ -418,27 +418,26 @@ 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)) {
|
||||||
// We will import it everytime, when it is started by our contacts
|
if (self::$itemlist[0]['uri'] == self::$itemlist[0]['parent-uri']) {
|
||||||
$valid = !empty(self::$itemlist[0]['contact-id']);
|
// We will import it everytime, when it is started by our contacts
|
||||||
if (!$valid) {
|
$valid = !empty(self::$itemlist[0]['contact-id']);
|
||||||
// If not, then it depends on this setting
|
if (!$valid) {
|
||||||
$valid = !Config::get('system','ostatus_full_threads');
|
// If not, then it depends on this setting
|
||||||
}
|
$valid = !Config::get('system','ostatus_full_threads');
|
||||||
|
}
|
||||||
if ($valid) {
|
if ($valid) {
|
||||||
// But we will only import complete threads
|
// Never post a thread when the only interaction by our contact was a like
|
||||||
$valid = self::$itemlist[0]['uri'] == self::$itemlist[0]['parent-uri'];
|
$valid = false;
|
||||||
}
|
$verbs = array(ACTIVITY_POST, ACTIVITY_SHARE);
|
||||||
|
foreach (self::$itemlist AS $item) {
|
||||||
if ($valid) {
|
if (!empty($item['contact-id']) && in_array($item['verb'], $verbs)) {
|
||||||
// Never post a thread when the only interaction by our contact was a like
|
$valid = true;
|
||||||
$valid = false;
|
}
|
||||||
$verbs = array(ACTIVITY_POST, ACTIVITY_SHARE);
|
|
||||||
foreach (self::$itemlist AS $item) {
|
|
||||||
if (!empty($item['contact-id']) && in_array($item['verb'], $verbs)) {
|
|
||||||
$valid = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} 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) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user