aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-06-02 18:26:06 -0700
committerFriendika <info@friendika.com>2011-06-02 18:26:06 -0700
commit1eb177235bafe63bd021e86a963b5d78f9bd0cd1 (patch)
tree2aa4012197b603191cb934f6d0f443ff9c048030 /include
parent2fcb5922c3ff883960f1dbb0aa63c2597dc38f15 (diff)
downloadvolse-hubzilla-1eb177235bafe63bd021e86a963b5d78f9bd0cd1.tar.gz
volse-hubzilla-1eb177235bafe63bd021e86a963b5d78f9bd0cd1.tar.bz2
volse-hubzilla-1eb177235bafe63bd021e86a963b5d78f9bd0cd1.zip
add queue_deliver plugin hook
Diffstat (limited to 'include')
-rw-r--r--include/queue.php16
1 files changed, 14 insertions, 2 deletions
diff --git a/include/queue.php b/include/queue.php
index d4fc7dbd6..ff280cb53 100644
--- a/include/queue.php
+++ b/include/queue.php
@@ -97,7 +97,7 @@ function queue_run($argv, $argc){
$deliver_status = 0;
switch($contact['network']) {
- case 'dfrn':
+ case NETWORK_DFRN:
logger('queue: dfrndelivery: item ' . $q_item['id'] . ' for ' . $contact['name']);
$deliver_status = dfrn_deliver($owner,$contact,$data);
@@ -109,7 +109,7 @@ function queue_run($argv, $argc){
remove_queue_item($q_item['id']);
}
break;
- default:
+ case NETWORK_OSTATUS:
if($contact['notify']) {
logger('queue: slapdelivery: item ' . $q_item['id'] . ' for ' . $contact['name']);
$deliver_status = slapper($owner,$contact['notify'],$data);
@@ -120,6 +120,18 @@ function queue_run($argv, $argc){
remove_queue_item($q_item['id']);
}
break;
+ default:
+ $a = get_app();
+ $params = array('owner' => $owner, 'contact' => $contact, 'queue' => $q_item, 'result' => false);
+ call_hooks('queue_deliver', $a, $params);
+
+ if($params['result'])
+ remove_queue_item($q_item['id']);
+ else
+ update_queue_time($q_item['id']);
+
+ break;
+
}
}