From ec9b7af25bc100bdd9cc16e0b553370ca474fb02 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 16 Mar 2018 20:34:28 +0000 Subject: [PATCH] Fix: Private transmission via Diaspora to Friendica servers --- src/Protocol/Diaspora.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 097ec8ddd5..9da41b1b36 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -3217,13 +3217,14 @@ class Diaspora } $logid = random_string(4); - $dest_url = ($public_batch ? $contact["batch"] : $contact["notify"]); - // Fetch the fcontact entry when there is missing data - // Will possibly happen when data is transmitted to a DFRN contact - if (empty($dest_url) && !empty($contact['addr'])) { + // We always try to use the data from the fcontact table. + // This is important for transmitting data to Friendica servers. + if (!empty($contact['addr'])) { $fcontact = self::personByHandle($contact['addr']); $dest_url = ($public_batch ? $fcontact["batch"] : $fcontact["notify"]); + } else { + $dest_url = ($public_batch ? $contact["batch"] : $contact["notify"]); } if (!$dest_url) {