mirror of
https://github.com/friendica/friendica
synced 2025-04-26 21:10:16 +00:00
Queue: Better handling of return values of transmissions
This commit is contained in:
parent
64ea49788e
commit
3e6507441e
2 changed files with 30 additions and 29 deletions
|
@ -313,7 +313,7 @@ class Delivery {
|
|||
if (!Queue::wasDelayed($contact['id'])) {
|
||||
$deliver_status = DFRN::deliver($owner, $contact, $atom);
|
||||
} else {
|
||||
$deliver_status = (-1);
|
||||
$deliver_status = -1;
|
||||
}
|
||||
|
||||
logger('notifier: dfrn_delivery to '.$contact["url"].' with guid '.$target_item["guid"].' returns '.$deliver_status);
|
||||
|
@ -323,12 +323,12 @@ class Delivery {
|
|||
Queue::add($contact['id'], NETWORK_DFRN, $atom, false, $target_item['guid']);
|
||||
}
|
||||
|
||||
if ($deliver_status < 200) {
|
||||
// The message could not be delivered. We mark the contact as "dead"
|
||||
Contact::markForArchival($contact);
|
||||
} else {
|
||||
if (($deliver_status >= 200) && ($deliver_status <= 299)) {
|
||||
// We successfully delivered a message, the contact is alive
|
||||
Contact::unmarkForArchival($contact);
|
||||
} else {
|
||||
// The message could not be delivered. We mark the contact as "dead"
|
||||
Contact::markForArchival($contact);
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue