comments imported from ignored FB contact

This commit is contained in:
Friendika 2011-05-15 17:04:02 -07:00
parent 730322ee5f
commit 31d53c5b2a

View file

@ -778,12 +778,15 @@ function fb_consume_stream($uid,$j,$wall = false) {
$cmntdata['contact-id'] = $self[0]['id'];
}
else {
$r = q("SELECT * FROM `contact` WHERE `notify` = '%s' AND `uid` = %d AND `blocked` = 0 AND `readonly` = 0 LIMIT 1",
$r = q("SELECT * FROM `contact` WHERE `notify` = '%s' AND `uid` = %d LIMIT 1",
dbesc($cmnt->from->id),
intval($uid)
);
if(count($r))
if(count($r)) {
$cmntdata['contact-id'] = $r[0]['id'];
if($r[0]['blocked'] || $r[0]['readonly'])
continue;
}
}
if(! x($cmntdata,'contact-id'))
$cmntdata['contact-id'] = $orig_post['contact-id'];