X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FWorker%2FDelivery.php;h=94a0f4902b0ba3c441e0cfe915b6c740fd985711;hb=5367620467f690774966c77cf5049ace9e6552a8;hp=4f9d522df9eb32ae5b7691910fd570e9a9ca5503;hpb=1bc4b2e0788ac11d3b377013b410f2250fff68aa;p=friendica.git diff --git a/src/Worker/Delivery.php b/src/Worker/Delivery.php index 4f9d522df9..94a0f4902b 100644 --- a/src/Worker/Delivery.php +++ b/src/Worker/Delivery.php @@ -1,10 +1,26 @@ . + * */ + namespace Friendica\Worker; -use Friendica\Core\Config; use Friendica\Core\Logger; use Friendica\Core\Protocol; use Friendica\Database\DBA; @@ -160,7 +176,7 @@ class Delivery && empty($parent['allow_gid']) && empty($parent['deny_cid']) && empty($parent['deny_gid']) - && !$parent["private"]) { + && ($parent["private"] != Model\Item::PRIVATE)) { $public_message = true; } } @@ -414,7 +430,7 @@ class Delivery Logger::notice('Deliver via Diaspora', ['target' => $target_item['id'], 'guid' => $target_item['guid'], 'to' => $loc]); - if (Config::get('system', 'dfrn_only') || !Config::get('system', 'diaspora_enabled')) { + if (DI::config()->get('system', 'dfrn_only') || !DI::config()->get('system', 'diaspora_enabled')) { return; } @@ -495,7 +511,7 @@ class Delivery */ private static function deliverMail($cmd, $contact, $owner, $target_item, $thr_parent) { - if (Config::get('system','dfrn_only')) { + if (DI::config()->get('system','dfrn_only')) { return; } @@ -548,7 +564,8 @@ class Delivery $headers = 'From: ' . Email::encodeHeader($local_user['username'],'UTF-8') . ' <' . $local_user['email'] . '>' . "\n"; } } else { - $headers = 'From: '. Email::encodeHeader($local_user['username'], 'UTF-8') . ' getHostname() . '>' . "\n"; + $sender = DI::config()->get('config', 'sender_email', 'noreply@' . DI::baseUrl()->getHostname()); + $headers = 'From: '. Email::encodeHeader($local_user['username'], 'UTF-8') . ' <' . $sender . '>' . "\n"; } $headers .= 'Message-Id: <' . Email::iri2msgid($target_item['uri']) . '>' . "\n";