aboutsummaryrefslogtreecommitdiffstats
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
parent661d418222f97a3fca18357b9d136b5817e2450d (diff)
downloadvolse-hubzilla-b8609aba638c15164e0e3aa1689578a24c268959.tar.gz
volse-hubzilla-b8609aba638c15164e0e3aa1689578a24c268959.tar.bz2
volse-hubzilla-b8609aba638c15164e0e3aa1689578a24c268959.zip
little stuff
-rw-r--r--boot.php2
-rw-r--r--include/notifier.php23
-rw-r--r--version.inc2
3 files changed, 21 insertions, 6 deletions
diff --git a/boot.php b/boot.php
index 1f7c7d6c9..4f08d8921 100644
--- a/boot.php
+++ b/boot.php
@@ -358,7 +358,7 @@ define ( 'ITEM_WALL', 0x0020);
define ( 'ITEM_THREAD_TOP', 0x0040);
define ( 'ITEM_NOTSHOWN', 0x0080); // technically visible but not normally shown (e.g. like/dislike)
define ( 'ITEM_NSFW', 0x0100);
-
+define ( 'ITEM_RELAY', 0x0200); // used only in the communication layers, not stored
/**
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;
diff --git a/version.inc b/version.inc
index 40e919c00..aa83974a2 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2012-11-16.140
+2012-11-16.141