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))
ini_set('pcre.backtrack_limit', 250000);
-define ( 'FRIENDIKA_VERSION', '2.2.992' );
+define ( 'FRIENDIKA_VERSION', '2.2.993' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
define ( 'DB_UPDATE_VERSION', 1058 );