aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-06-09 16:29:51 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-06-09 16:29:51 -0700
commit805e2a28ee81febee2742587a1640b5fae1387a2 (patch)
tree436a3b62b94e47031e27b979c06893f42bf9db4c
parent54b61f817d8911dec26e3aa2aee32fad25f67571 (diff)
downloadvolse-hubzilla-805e2a28ee81febee2742587a1640b5fae1387a2.tar.gz
volse-hubzilla-805e2a28ee81febee2742587a1640b5fae1387a2.tar.bz2
volse-hubzilla-805e2a28ee81febee2742587a1640b5fae1387a2.zip
add nomadic identities as webfinger aliases
-rw-r--r--mod/wfinger.php11
-rw-r--r--version.inc2
2 files changed, 11 insertions, 2 deletions
diff --git a/mod/wfinger.php b/mod/wfinger.php
index eba17de51..1493dd6ba 100644
--- a/mod/wfinger.php
+++ b/mod/wfinger.php
@@ -55,14 +55,23 @@ function wfinger_init(&$a) {
if($resource && $r) {
+ $h = q("select hubloc_addr from hubloc where hubloc_hash = '%s'",
+ dbesc($r[0]['channel_hash'])
+ );
+
$result['subject'] = $resource;
$aliases = array(
- 'acct:' . $r[0]['channel_address'] . '@' . $a->get_hostname(),
z_root() . '/channel/' . $r[0]['channel_address'],
z_root() . '/~' . $r[0]['channel_address']
);
+ if($h) {
+ foreach($h as $hh) {
+ $aliases[] = 'acct:' . $hh['hubloc_addr'];
+ }
+ }
+
$result['aliases'] = array();
$result['properties'] = array('http://webfinger.net/ns/name' => $r[0]['channel_name']);
diff --git a/version.inc b/version.inc
index 669f2bc59..154027d3a 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2015-06-08.1057
+2015-06-09.1058