duplicate likes if we posted it locally and it also comes back from FB
This commit is contained in:
parent
b93f0df890
commit
a2b26948d8
|
@ -733,11 +733,17 @@ function fb_consume_stream($uid,$j,$wall = false) {
|
|||
if(! $orig_post)
|
||||
continue;
|
||||
|
||||
$r = q("SELECT * FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `verb` = '%s' AND `author-link` = '%s' LIMIT 1",
|
||||
// If we posted the like locally, it will be found with our url, not the FB url.
|
||||
|
||||
$second_url = (($likes->id == $self_id) ? $self[0]['url'] : 'http://facebook.com/profile.php?id=' . $likes->id);
|
||||
|
||||
$r = q("SELECT * FROM `item` WHERE `parent-uri` = '%s' AND `uid` = %d AND `verb` = '%s'
|
||||
AND ( `author-link` = '%s' OR `author-link` = '%s' ) LIMIT 1",
|
||||
dbesc($orig_post['uri']),
|
||||
intval($uid),
|
||||
dbesc(ACTIVITY_LIKE),
|
||||
dbesc('http://facebook.com/profile.php?id=' . $likes->id)
|
||||
dbesc('http://facebook.com/profile.php?id=' . $likes->id),
|
||||
dbesc($second_url)
|
||||
);
|
||||
|
||||
if(count($r))
|
||||
|
|
Loading…
Reference in New Issue
Block a user