pass params as string rather than array so it doesn't
get changed to multipart/forma-data
This commit is contained in:
parent
0d2650b29b
commit
2ae38e3fbf
|
@ -827,17 +827,11 @@ function subscribe_to_hub($url,$importer,$contact) {
|
||||||
if(! count($r))
|
if(! count($r))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
$params = array();
|
|
||||||
|
|
||||||
$push_url = get_config('system','url') . '/pubsub/' . $r[0]['nickname'] . '/' . $contact['id'];
|
$push_url = get_config('system','url') . '/pubsub/' . $r[0]['nickname'] . '/' . $contact['id'];
|
||||||
|
|
||||||
$verify_token = random_string();
|
$verify_token = random_string();
|
||||||
|
|
||||||
$params['hub.mode'] = 'subscribe';
|
$params= 'hub.mode=subscribe&hub.callback=' . urlencode($push_url) . '&hub.topic=' . urlencode($contact['poll']) . '&hub.verify=async&hub.verify_token=' . $verify_token;
|
||||||
$params['hub.callback'] = urlencode($push_url);
|
|
||||||
$params['hub.topic'] = urlencode($contact['poll']);
|
|
||||||
$params['hub.verify'] = 'async';
|
|
||||||
$params['hub.verify_token'] = $verify_token;
|
|
||||||
|
|
||||||
$r = q("UPDATE `contact` SET `hub-verify` = '%s' WHERE `id` = %d LIMIT 1",
|
$r = q("UPDATE `contact` SET `hub-verify` = '%s' WHERE `id` = %d LIMIT 1",
|
||||||
dbesc($verify_token),
|
dbesc($verify_token),
|
||||||
|
|
|
@ -303,7 +303,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if((strlen($hub)) && ($cmd !== 'mail') && (followup == false)) {
|
if((strlen($hub)) && ($cmd !== 'mail') && (followup == false)) {
|
||||||
$params = array('hub.mode' => 'publish', 'hub.url' => urlencode($a->get_baseurl() . '/dfrn_poll/' . $owner['nickname'] ));
|
$params = 'hub.mode=publish&hub.url=' . urlencode($a->get_baseurl() . '/dfrn_poll/' . $owner['nickname'] );
|
||||||
post_url($hub,$params);
|
post_url($hub,$params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue