do away with single delivery (delivery from clones to singleton networks attached to other clones)
This commit is contained in:
parent
f0a2747d80
commit
c70ac572fa
@ -64,8 +64,6 @@ require_once('include/bbcode.php');
|
|||||||
* purge_all channel_id
|
* purge_all channel_id
|
||||||
* expire channel_id
|
* expire channel_id
|
||||||
* relay item_id (item was relayed to owner, we will deliver it as owner)
|
* relay item_id (item was relayed to owner, we will deliver it as owner)
|
||||||
* single_activity item_id (deliver to a singleton network from the appropriate clone)
|
|
||||||
* single_mail mail_id (deliver to a singleton network from the appropriate clone)
|
|
||||||
* location channel_id
|
* location channel_id
|
||||||
* request channel_id xchan_hash message_id
|
* request channel_id xchan_hash message_id
|
||||||
* rating xlink_id
|
* rating xlink_id
|
||||||
@ -105,7 +103,7 @@ class Notifier {
|
|||||||
$normal_mode = true;
|
$normal_mode = true;
|
||||||
$packet_type = 'undefined';
|
$packet_type = 'undefined';
|
||||||
|
|
||||||
if($cmd === 'mail' || $cmd === 'single_mail') {
|
if($cmd === 'mail') {
|
||||||
$normal_mode = false;
|
$normal_mode = false;
|
||||||
$mail = true;
|
$mail = true;
|
||||||
$private = true;
|
$private = true;
|
||||||
@ -451,7 +449,7 @@ class Notifier {
|
|||||||
'uplink' => $uplink,
|
'uplink' => $uplink,
|
||||||
'cmd' => $cmd,
|
'cmd' => $cmd,
|
||||||
'mail' => $mail,
|
'mail' => $mail,
|
||||||
'single' => (($cmd === 'single_mail' || $cmd === 'single_activity') ? true : false),
|
'single' => false,
|
||||||
'location' => $location,
|
'location' => $location,
|
||||||
'request' => $request,
|
'request' => $request,
|
||||||
'normal_mode' => $normal_mode,
|
'normal_mode' => $normal_mode,
|
||||||
@ -558,7 +556,7 @@ class Notifier {
|
|||||||
'uplink' => $uplink,
|
'uplink' => $uplink,
|
||||||
'cmd' => $cmd,
|
'cmd' => $cmd,
|
||||||
'mail' => $mail,
|
'mail' => $mail,
|
||||||
'single' => (($cmd === 'single_mail' || $cmd === 'single_activity') ? true : false),
|
'single' => false,
|
||||||
'location' => $location,
|
'location' => $location,
|
||||||
'request' => $request,
|
'request' => $request,
|
||||||
'normal_mode' => $normal_mode,
|
'normal_mode' => $normal_mode,
|
||||||
@ -577,21 +575,6 @@ class Notifier {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// singleton deliveries by definition 'not got zot'.
|
|
||||||
// Single deliveries are other federated networks (plugins) and we're essentially
|
|
||||||
// delivering only to those that have this site url in their abook_instance
|
|
||||||
// and only from within a sync operation. This means if you post from a clone,
|
|
||||||
// and a connection is connected to one of your other clones; assuming that hub
|
|
||||||
// is running it will receive a sync packet. On receipt of this sync packet it
|
|
||||||
// will invoke a delivery to those connections which are connected to just that
|
|
||||||
// hub instance.
|
|
||||||
|
|
||||||
if($cmd === 'single_mail' || $cmd === 'single_activity') {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// default: zot protocol
|
|
||||||
|
|
||||||
$hash = random_string();
|
$hash = random_string();
|
||||||
$packet = null;
|
$packet = null;
|
||||||
|
|
||||||
|
@ -631,12 +631,6 @@ function import_items($channel, $items, $sync = false, $relocate = null) {
|
|||||||
|
|
||||||
fix_attached_file_permissions($channel,$item['author_xchan'],$item['body'],$item['allow_cid'],$item['allow_gid'],$item['deny_cid'],$item['deny_gid']);
|
fix_attached_file_permissions($channel,$item['author_xchan'],$item['body'],$item['allow_cid'],$item['allow_gid'],$item['deny_cid'],$item['deny_gid']);
|
||||||
|
|
||||||
if($sync && $item['item_wall']) {
|
|
||||||
// deliver singletons if we have any
|
|
||||||
if($item_result && $item_result['success']) {
|
|
||||||
Zotlabs\Daemon\Master::Summon( [ 'Notifier','single_activity',$item_result['item_id'] ]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1005,9 +999,6 @@ function import_mail($channel, $mails, $sync = false) {
|
|||||||
$m['aid'] = $channel['channel_account_id'];
|
$m['aid'] = $channel['channel_account_id'];
|
||||||
$m['uid'] = $channel['channel_id'];
|
$m['uid'] = $channel['channel_id'];
|
||||||
$mail_id = mail_store($m);
|
$mail_id = mail_store($m);
|
||||||
if($sync && $mail_id) {
|
|
||||||
Zotlabs\Daemon\Master::Summon(array('Notifier','single_mail',$mail_id));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user