aboutsummaryrefslogtreecommitdiffstats
path: root/mod/zfinger.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/zfinger.php')
-rw-r--r--mod/zfinger.php16
1 files changed, 13 insertions, 3 deletions
diff --git a/mod/zfinger.php b/mod/zfinger.php
index 5b02d4695..550d613b5 100644
--- a/mod/zfinger.php
+++ b/mod/zfinger.php
@@ -33,6 +33,17 @@ function zfinger_init(&$a) {
$e = $r[0];
+ $id = $e['entity_id'];
+ $r = q("select contact.*, profile.*
+ from contact left join profile on contact.uid = profile.uid
+ where contact.uid = %d && contact.self = 1 and profile.is_default = 1 limit 1",
+ intval($id)
+ );
+ if($r && count($r)) {
+ $profile = $r[0];
+ }
+
+
$ret['success'] = true;
// Communication details
@@ -43,6 +54,8 @@ function zfinger_init(&$a) {
$ret['name'] = $e['entity_name'];
$ret['address'] = $e['entity_address'];
+ $ret['profile'] = $profile;
+
// array of (verified) hubs this entity uses
$ret['hubs'] = array();
@@ -61,9 +74,6 @@ function zfinger_init(&$a) {
}
}
-
- // more stuff, e.g. the basic public profile
-
json_return_and_die($ret);
} \ No newline at end of file