1
1
Fork 0

Now using the correct function call ...

This commit is contained in:
Michael 2019-11-23 04:31:40 +00:00
parent 37bdafcc96
commit 2dcf6d9e2b
2 changed files with 4 additions and 4 deletions

View file

@ -29,6 +29,7 @@ class ItemDeliveryData
const LEGACY_DFRN = 3;
const DIASPORA = 4;
const OSTATUS = 5;
const MAIL = 6;
/**
* Extract delivery data from the provided item fields

View file

@ -481,7 +481,7 @@ class Delivery extends BaseObject
* @param array $contact Contact record of the receiver
* @param array $owner Owner record of the sender
* @param array $target_item Item record of the content
* @param array $thr_parent Item record of the thread parent
* @param array $thr_parent Item record of the direct parent in the thread
* @throws \Friendica\Network\HTTPException\InternalServerErrorException
* @throws \ImagickException
*/
@ -490,7 +490,6 @@ class Delivery extends BaseObject
if (Config::get('system','dfrn_only')) {
return;
}
// WARNING: does not currently convert to RFC2047 header encodings, etc.
$addr = $contact['addr'];
if (!strlen($addr)) {
@ -545,7 +544,7 @@ class Delivery extends BaseObject
if ($target_item['uri'] !== $target_item['parent-uri']) {
$headers .= 'References: <' . Email::iri2msgid($target_item['parent-uri']) . '>';
// If Threading is enabled, write down the correct parent
// Export more references on deeper nested threads
if (($target_item['thr-parent'] != '') && ($target_item['thr-parent'] != $target_item['parent-uri'])) {
$headers .= ' <' . Email::iri2msgid($target_item['thr-parent']) . '>';
}
@ -575,7 +574,7 @@ class Delivery extends BaseObject
Email::send($addr, $subject, $headers, $target_item);
Model\ItemDeliveryData::incrementQueueFailed($target_item['id']);
Model\ItemDeliveryData::incrementQueueDone($target_item['id'], Model\ItemDeliveryData::MAIL);
Logger::info('Delivered via mail', ['guid' => $target_item['guid'], 'to' => $addr, 'subject' => $subject]);
}