little stuff
This commit is contained in:
parent
661d418222
commit
b8609aba63
2
boot.php
2
boot.php
@ -358,7 +358,7 @@ define ( 'ITEM_WALL', 0x0020);
|
|||||||
define ( 'ITEM_THREAD_TOP', 0x0040);
|
define ( 'ITEM_THREAD_TOP', 0x0040);
|
||||||
define ( 'ITEM_NOTSHOWN', 0x0080); // technically visible but not normally shown (e.g. like/dislike)
|
define ( 'ITEM_NOTSHOWN', 0x0080); // technically visible but not normally shown (e.g. like/dislike)
|
||||||
define ( 'ITEM_NSFW', 0x0100);
|
define ( 'ITEM_NSFW', 0x0100);
|
||||||
|
define ( 'ITEM_RELAY', 0x0200); // used only in the communication layers, not stored
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -103,7 +103,7 @@ function notifier_run($argv, $argc){
|
|||||||
));
|
));
|
||||||
if($data) {
|
if($data) {
|
||||||
$result = zot_zot($hh['hubloc_callback'],$data);
|
$result = zot_zot($hh['hubloc_callback'],$data);
|
||||||
|
// zot_queue_item is not yet written
|
||||||
// if(! $result['success']
|
// if(! $result['success']
|
||||||
// zot_queue_item();
|
// zot_queue_item();
|
||||||
|
|
||||||
@ -199,10 +199,15 @@ function notifier_run($argv, $argc){
|
|||||||
$top_level_post = false;
|
$top_level_post = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$encoded_item = encode_item($target_item);
|
||||||
|
|
||||||
$relay_to_owner = (((! $top_level_post) && ($target_item['item_flags'] & ITEM_ORIGIN)) ? true : false);
|
$relay_to_owner = (((! $top_level_post) && ($target_item['item_flags'] & ITEM_ORIGIN)) ? true : false);
|
||||||
if($relay_to_owner) {
|
if($relay_to_owner) {
|
||||||
logger('notifier: followup relay', LOGGER_DEBUG);
|
logger('notifier: followup relay', LOGGER_DEBUG);
|
||||||
$recipients = array($parent_item['owner_xchan']);
|
$recipients = array($parent_item['owner_xchan']);
|
||||||
|
if(! $encoded_item['flags'])
|
||||||
|
$encoded_item['flags'] = array();
|
||||||
|
$encoded_item['flags'][] = 'relay';
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
logger('notifier: normal distribution', LOGGER_DEBUG);
|
logger('notifier: normal distribution', LOGGER_DEBUG);
|
||||||
@ -210,22 +215,32 @@ function notifier_run($argv, $argc){
|
|||||||
|
|
||||||
// FIXME add any additional recipients such as mentions, etc.
|
// 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
|
||||||
|
|
||||||
|
if(($target_item['item_restrict'] & ITEM_DELETED) && (!($target_item['item_flags'] & ITEM_WALL))) {
|
||||||
|
logger('notifier: ignoring delete notification for non-wall item');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$encoded_item = encode_item($target_item);
|
|
||||||
|
|
||||||
logger('notifier: encoded item: ' . print_r($encoded_item,true));
|
logger('notifier: encoded item: ' . print_r($encoded_item,true));
|
||||||
|
|
||||||
stringify_array_elms($recipients);
|
stringify_array_elms($recipients);
|
||||||
|
|
||||||
logger('notifier: recipients: ' . print_r($recipients,true));
|
logger('notifier: recipients: ' . print_r($recipients,true));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// get all hubs we need to talk to.
|
// 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;
|
return;
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
2012-11-16.140
|
2012-11-16.141
|
||||||
|
Reference in New Issue
Block a user