aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-03-02 20:25:17 +0100
committerMario Vavti <mario@mariovavti.com>2018-03-02 20:25:17 +0100
commit7c5f1e814bd60b326ede8d2511089d1da66b4854 (patch)
tree07172b5871945e897a5693241c881245d63325ce /Zotlabs
parent5c46e66694ecab4e986cada35527ae4bf599b630 (diff)
parentdcfe9bc64f822af02021767bf8c70fbe9d847bda (diff)
downloadvolse-hubzilla-7c5f1e814bd60b326ede8d2511089d1da66b4854.tar.gz
volse-hubzilla-7c5f1e814bd60b326ede8d2511089d1da66b4854.tar.bz2
volse-hubzilla-7c5f1e814bd60b326ede8d2511089d1da66b4854.zip
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Follow.php18
-rw-r--r--Zotlabs/Module/Wfinger.php3
-rw-r--r--Zotlabs/Widget/Newmember.php4
3 files changed, 18 insertions, 7 deletions
diff --git a/Zotlabs/Module/Follow.php b/Zotlabs/Module/Follow.php
index d8a86d0ce..04ac746cb 100644
--- a/Zotlabs/Module/Follow.php
+++ b/Zotlabs/Module/Follow.php
@@ -17,15 +17,20 @@ class Follow extends \Zotlabs\Web\Controller {
$url = notags(trim($_REQUEST['url']));
$return_url = $_SESSION['return_url'];
$confirm = intval($_REQUEST['confirm']);
-
+ $interactive = (($_REQUEST['interactive']) ? intval($_REQUEST['interactive']) : 1);
$channel = \App::get_channel();
- $result = new_contact($uid,$url,$channel,true,$confirm);
+ $result = new_contact($uid,$url,$channel,$interactive,$confirm);
if($result['success'] == false) {
if($result['message'])
notice($result['message']);
- goaway($return_url);
+ if($interactive) {
+ goaway($return_url);
+ }
+ else {
+ json_return_and_die($result);
+ }
}
info( t('Channel added.') . EOL);
@@ -53,7 +58,12 @@ class Follow extends \Zotlabs\Web\Controller {
if(($can_view_stream) || ($result['abook']['xchan_network'] === 'rss'))
\Zotlabs\Daemon\Master::Summon(array('Onepoll',$result['abook']['abook_id']));
- goaway(z_root() . '/connedit/' . $result['abook']['abook_id'] . '?f=&follow=1');
+ if($interactive) {
+ goaway(z_root() . '/connedit/' . $result['abook']['abook_id'] . '?f=&follow=1');
+ }
+ else {
+ json_return_and_die([ 'success' => true ]);
+ }
}
diff --git a/Zotlabs/Module/Wfinger.php b/Zotlabs/Module/Wfinger.php
index 753721d27..81d4beaed 100644
--- a/Zotlabs/Module/Wfinger.php
+++ b/Zotlabs/Module/Wfinger.php
@@ -123,7 +123,8 @@ class Wfinger extends \Zotlabs\Web\Controller {
$result['properties'] = [
'http://webfinger.net/ns/name' => $r[0]['channel_name'],
'http://xmlns.com/foaf/0.1/name' => $r[0]['channel_name'],
- 'https://w3id.org/security/v1#publicKeyPem' => $r[0]['xchan_pubkey']
+ 'https://w3id.org/security/v1#publicKeyPem' => $r[0]['xchan_pubkey'],
+ 'http://purl.org/zot/federation' => 'zot'
];
foreach($aliases as $alias)
diff --git a/Zotlabs/Widget/Newmember.php b/Zotlabs/Widget/Newmember.php
index 898942ccc..0279f339f 100644
--- a/Zotlabs/Widget/Newmember.php
+++ b/Zotlabs/Widget/Newmember.php
@@ -39,7 +39,7 @@ class Newmember {
t('Find and Connect with others'),
[
- 'directory' => t('View the channel directory'),
+ 'directory' => t('View the directory'),
'suggest' => t('View friend suggestions'),
'connections' => t('Manage your connections'),
],
@@ -64,7 +64,7 @@ class Newmember {
// hack to put this in the correct spot of the array
if($site_firehose || $net_firehose) {
- $options[5]['pubstream'] = t('View public stream. Warning: not moderated');
+ $options[5]['pubstream'] = t('View public stream');
}
$o = replace_macros(get_markup_template('new_member.tpl'), [