diff options
author | Friendika <info@friendika.com> | 2010-11-21 23:00:01 -0800 |
---|---|---|
committer | Friendika <info@friendika.com> | 2010-11-21 23:00:01 -0800 |
commit | de6c777d3f6753b8fb5f33bc0ee8acafc6772551 (patch) | |
tree | ef95d120dd770da99071b195fdc08626981cc639 /include/notifier.php | |
parent | 552c56102ea70c6c9e32e13675b564a36814a069 (diff) | |
download | volse-hubzilla-de6c777d3f6753b8fb5f33bc0ee8acafc6772551.tar.gz volse-hubzilla-de6c777d3f6753b8fb5f33bc0ee8acafc6772551.tar.bz2 volse-hubzilla-de6c777d3f6753b8fb5f33bc0ee8acafc6772551.zip |
infrastructure for queueing, redelivery
Diffstat (limited to 'include/notifier.php')
-rw-r--r-- | include/notifier.php | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/include/notifier.php b/include/notifier.php index f22917e4f..bbc4f0047 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -255,10 +255,24 @@ case 'dfrn': logger('notifier: dfrndelivery: ' . $contact['name']); $deliver_status = dfrn_deliver($owner,$contact,$atom); + + if($deliver_status == (-1)) { + // queue message for redelivery + + } + break; default: if($followup && $contact['notify']) { - slapper($owner,$contact['notify'],$slap); + logger('notifier: slapdelivery: ' . $contact['name']); + $deliver_status = slapper($owner,$contact['notify'],$slap); + + if($deliver_status == (-1)) { + // queue message for redelivery + + } + + } else { @@ -269,7 +283,13 @@ logger('notifier: slapdelivery: ' . $contact['name']); foreach($slaps as $slappy) { if($contact['notify']) { - slapper($owner,$contact['notify'],$slappy); + $deliver_status = slapper($owner,$contact['notify'],$slappy); + if($deliver_status == (-1)) { + // queue message for redelivery + // if not already in queue + // else if deliver_status ok and queued, remove from queue + + } } } } @@ -277,6 +297,7 @@ break; } + if(($cmd === 'mail') && ($deliver_status == 0)) { $r = q("UPDATE `mail` SET `delivered` = 1 WHERE `id` = %d LIMIT 1", intval($item_id) @@ -292,7 +313,7 @@ logger('notifier: urldelivery: ' . $url); foreach($slaps as $slappy) { if($url) { - slapper($owner,$url,$slappy); + $deliver_status = slapper($owner,$url,$slappy); } } } |