aboutsummaryrefslogtreecommitdiffstats
path: root/mod/wfinger.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-06-09 16:52:00 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-06-09 16:52:00 -0700
commit03357481f73d506ae36be9858dc757842408c6a9 (patch)
treea69772d6caf71f4986a26eb80d00ac4e8750b995 /mod/wfinger.php
parentec1dcb8f2eccfd1a0dfc9c7eccea788a4b385e41 (diff)
parent805e2a28ee81febee2742587a1640b5fae1387a2 (diff)
downloadvolse-hubzilla-03357481f73d506ae36be9858dc757842408c6a9.tar.gz
volse-hubzilla-03357481f73d506ae36be9858dc757842408c6a9.tar.bz2
volse-hubzilla-03357481f73d506ae36be9858dc757842408c6a9.zip
Merge branch 'master' of https://github.com/redmatrix/redmatrix
Conflicts: install/schema_mysql.sql mod/home.php mod/page.php view/nl/messages.po view/nl/strings.php
Diffstat (limited to 'mod/wfinger.php')
-rw-r--r--mod/wfinger.php11
1 files changed, 10 insertions, 1 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']);