mirror of
https://github.com/friendica/friendica
synced 2025-04-28 12:24:23 +02:00
Issue 11952: Avoid to send AP related comments to Diaspora
This commit is contained in:
parent
38cf0666bd
commit
7395ae22f7
2 changed files with 15 additions and 0 deletions
|
@ -4133,6 +4133,17 @@ class Diaspora
|
|||
return false;
|
||||
}
|
||||
|
||||
$parent_post = Post::selectFirstPost(['gravity', 'signed_text', 'author-link'], ['uri-id' => $item['thr-parent-id']]);
|
||||
if (empty(FContact::getByURL($parent_post['author-link'], false))) {
|
||||
Logger::info('Parent author is no Diaspora contact. A signature will not be created.', ['uri-id' => $item['uri-id'], 'guid' => $item['guid']]);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (($parent_post['gravity'] == GRAVITY_COMMENT) && empty($parent_post['signed_text'])) {
|
||||
Logger::info('Parent comment has got no Diaspora signature. A signature will not be created.', ['uri-id' => $item['uri-id'], 'guid' => $item['guid']]);
|
||||
return false;
|
||||
}
|
||||
|
||||
$message = self::constructComment($item, $owner);
|
||||
if ($message === false) {
|
||||
return false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue