Merge remote-tracking branch 'upstream/develop' into user-contact

This commit is contained in:
Michael 2021-10-02 11:57:43 +00:00
commit 865006682a
54 changed files with 4237 additions and 4188 deletions

View file

@ -119,7 +119,8 @@ class APContact
*/
public static function getByURL($url, $update = null)
{
if (empty($url)) {
if (empty($url) || Network::isUrlBlocked($url)) {
Logger::info('Domain is blocked', ['url' => $url]);
return [];
}

View file

@ -1445,11 +1445,11 @@ class Contact
if ($thread_mode) {
$items = Post::toArray(Post::selectForUser(local_user(), ['uri-id', 'gravity', 'parent-uri-id', 'thr-parent-id', 'author-id'], $condition, $params));
$o .= conversation($a, $items, 'contacts', $update, false, 'commented', local_user());
$o .= DI::conversation()->create($items, 'contacts', $update, false, 'commented', local_user());
} else {
$items = Post::toArray(Post::selectForUser(local_user(), Item::DISPLAY_FIELDLIST, $condition, $params));
$o .= conversation($a, $items, 'contact-posts', $update);
$o .= DI::conversation()->create($items, 'contact-posts', $update);
}
if (!$update) {

View file

@ -74,9 +74,7 @@ class Mail
return false;
}
if ($msg['reply']) {
$reply = DBA::selectFirst('mail', ['uri', 'uri-id'], ['parent-uri' => $msg['parent-uri'], 'reply' => false]);
if ($msg['reply'] && DBA::isResult($reply = DBA::selectFirst('mail', ['uri', 'uri-id'], ['parent-uri' => $msg['parent-uri'], 'reply' => false]))) {
$msg['thr-parent'] = $reply['uri'];
$msg['thr-parent-id'] = $reply['uri-id'];
} else {