conversation fetching is partially working - but it isn't always glueing the conversation pieces together.

This commit is contained in:
zotlabs 2017-06-28 20:07:53 -07:00
parent 126af3a24a
commit 024809f970

View File

@ -1081,6 +1081,18 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) {
if((! $pmid) && $parent_link !== '') {
$f = feed_conversation_fetch($importer,$contact,$parent_link);
if($f) {
// check both potential conversation parents again
if($conv_id) {
$c = q("select parent_mid from item left join iconfig on item.id = iconfig.iid where iconfig.cat = 'ostatus' and iconfig.k = 'conversation' and iconfig.v = '%s' and item.uid = %d order by item.id limit 1",
dbesc($conv_id),
intval($importer['channel_id'])
);
if($c) {
$pmid = $c[0]['parent_mid'];
$datarray['parent_mid'] = $pmid;
}
}
if(! $pmid) {
$x = q("select parent_mid from item where mid = '%s' and uid = %d limit 1",
dbesc($parent_mid),
intval($importer['channel_id'])
@ -1092,6 +1104,7 @@ function consume_feed($xml, $importer, &$contact, $pass = 0) {
}
}
}
}
if(! $pmid) {