aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-11-16 15:53:02 -0800
committerfriendica <info@friendica.com>2012-11-16 15:53:02 -0800
commitb8609aba638c15164e0e3aa1689578a24c268959 (patch)
treeab891d5eb6a7cc5f507f4306da75ed4e4299a4ba /include
parent661d418222f97a3fca18357b9d136b5817e2450d (diff)
downloadvolse-hubzilla-b8609aba638c15164e0e3aa1689578a24c268959.tar.gz
volse-hubzilla-b8609aba638c15164e0e3aa1689578a24c268959.tar.bz2
volse-hubzilla-b8609aba638c15164e0e3aa1689578a24c268959.zip
little stuff
Diffstat (limited to 'include')
-rw-r--r--include/notifier.php23
1 files changed, 19 insertions, 4 deletions
diff --git a/include/notifier.php b/include/notifier.php
index efe417a0f..76e52e3ee 100644
--- a/include/notifier.php
+++ b/include/notifier.php
@@ -103,7 +103,7 @@ function notifier_run($argv, $argc){
));
if($data) {
$result = zot_zot($hh['hubloc_callback'],$data);
-
+// zot_queue_item is not yet written
// if(! $result['success']
// zot_queue_item();
@@ -199,10 +199,15 @@ function notifier_run($argv, $argc){
$top_level_post = false;
}
+ $encoded_item = encode_item($target_item);
+
$relay_to_owner = (((! $top_level_post) && ($target_item['item_flags'] & ITEM_ORIGIN)) ? true : false);
if($relay_to_owner) {
logger('notifier: followup relay', LOGGER_DEBUG);
$recipients = array($parent_item['owner_xchan']);
+ if(! $encoded_item['flags'])
+ $encoded_item['flags'] = array();
+ $encoded_item['flags'][] = 'relay';
}
else {
logger('notifier: normal distribution', LOGGER_DEBUG);
@@ -210,22 +215,32 @@ function notifier_run($argv, $argc){
// FIXME add any additional recipients such as mentions, etc.
- }
+ // don't send deletions onward for other people's stuff
+ // TODO verify this is needed - copied logic from same place in old code
- $encoded_item = encode_item($target_item);
+ if(($target_item['item_restrict'] & ITEM_DELETED) && (!($target_item['item_flags'] & ITEM_WALL))) {
+ logger('notifier: ignoring delete notification for non-wall item');
+ return;
+ }
+
+
+ }
logger('notifier: encoded item: ' . print_r($encoded_item,true));
stringify_array_elms($recipients);
-
logger('notifier: recipients: ' . print_r($recipients,true));
// get all hubs we need to talk to.
+ // do local delivery or local delivery queueing for anybody on our own hub
+
+ // queue everything else
+ // trigger delivery
return;