}
foreach ($activity['receiver'] as $receiver) {
- $item = Post::selectFirst(['id', 'uri-id', 'tag', 'origin', 'author-link'], ['uri' => $activity['target_id'], 'uid' => $receiver]);
+ $item = Post::selectFirst(['id', 'uri-id', 'origin', 'author-link'], ['uri' => $activity['target_id'], 'uid' => $receiver]);
if (!DBA::isResult($item)) {
// We don't fetch missing content for this purpose
continue;
}
$replyto = JsonLD::fetchElement($activity['as:object'], 'as:inReplyTo', '@id');
- if (Post::exists(['uri' => $replyto])) {
- Logger::info('Post is a reply to an existing post - accepted', ['id' => $id, 'replyto' => $replyto]);
+ $uriid = ItemURI::getIdByURI($replyto);
+ if (Post::exists(['uri-id' => $uriid])) {
+ Logger::info('Post is a reply to an existing post - accepted', ['id' => $id, 'uri-id' => $uriid, 'replyto' => $replyto]);
return true;
}