refresh packets
This commit is contained in:
parent
3fe2491b73
commit
22b3ddab66
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
namespace Zotlabs\Daemon;
|
namespace Zotlabs\Daemon;
|
||||||
|
|
||||||
|
use Zotlabs\Lib\Libzot;
|
||||||
|
|
||||||
require_once('include/queue_fn.php');
|
require_once('include/queue_fn.php');
|
||||||
require_once('include/html2plain.php');
|
require_once('include/html2plain.php');
|
||||||
require_once('include/conversation.php');
|
require_once('include/conversation.php');
|
||||||
@ -561,7 +563,7 @@ class Notifier {
|
|||||||
|
|
||||||
logger('notifier_hub: ' . $hub['hubloc_url'],LOGGER_DEBUG);
|
logger('notifier_hub: ' . $hub['hubloc_url'],LOGGER_DEBUG);
|
||||||
|
|
||||||
if($hub['hubloc_network'] !== 'zot') {
|
if(! in_array($hub['hubloc_network'], [ 'zot','zot6' ])) {
|
||||||
$narr = [
|
$narr = [
|
||||||
'channel' => $channel,
|
'channel' => $channel,
|
||||||
'upstream' => $upstream,
|
'upstream' => $upstream,
|
||||||
@ -610,14 +612,21 @@ class Notifier {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// default: zot protocol
|
if(! in_array($hub['hubloc_network'], [ 'zot','zot6' ])) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
$hash = random_string();
|
$hash = random_string();
|
||||||
$packet = null;
|
$packet = null;
|
||||||
$pmsg = '';
|
$pmsg = '';
|
||||||
|
|
||||||
if($packet_type === 'refresh' || $packet_type === 'purge') {
|
if($packet_type === 'refresh' || $packet_type === 'purge') {
|
||||||
$packet = zot_build_packet($channel,$packet_type,(($packet_recips) ? $packet_recips : null));
|
if($hub['hubloc_network'] === 'zot6') {
|
||||||
|
$packet = Libzot::build_packet($channel, $packet_type, ids_to_array($packet_recips,'hash'));
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$packet = zot_build_packet($channel,$packet_type,(($packet_recips) ? $packet_recips : null));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if($packet_type === 'keychange') {
|
if($packet_type === 'keychange') {
|
||||||
$pmsg = get_pconfig($channel['channel_id'],'system','keychange');
|
$pmsg = get_pconfig($channel['channel_id'],'system','keychange');
|
||||||
|
@ -204,6 +204,12 @@ class Wfinger extends \Zotlabs\Web\Controller {
|
|||||||
'href' => z_root() . '/.well-known/zot-info' . '?address=' . $r[0]['xchan_addr'],
|
'href' => z_root() . '/.well-known/zot-info' . '?address=' . $r[0]['xchan_addr'],
|
||||||
],
|
],
|
||||||
|
|
||||||
|
[
|
||||||
|
'rel' => 'http://purl.org/zot/protocol/6.0',
|
||||||
|
'type' => 'application/x-zot+json',
|
||||||
|
'href' => channel_url($r[0])
|
||||||
|
],
|
||||||
|
|
||||||
[
|
[
|
||||||
'rel' => 'http://purl.org/openwebauth/v1',
|
'rel' => 'http://purl.org/openwebauth/v1',
|
||||||
'type' => 'application/x-zot+json',
|
'type' => 'application/x-zot+json',
|
||||||
|
Reference in New Issue
Block a user