From 207df132e69bd3e70f28addbd63bd3c638da9b08 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 4 Nov 2020 13:36:52 +0000 Subject: make sure we attach the public key --- Zotlabs/Lib/Activity.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Zotlabs/Lib') diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php index 08e5ffaca..e7fa6352a 100644 --- a/Zotlabs/Lib/Activity.php +++ b/Zotlabs/Lib/Activity.php @@ -1018,6 +1018,7 @@ class Activity { if(! $extended) { return $p['xchan_url']; } + $ret = []; $c = ((array_key_exists('channel_id',$p)) ? $p : channelx_by_hash($p['xchan_hash'])); @@ -1063,10 +1064,16 @@ class Activity { ] ]; + $ret['publicKey'] = [ + 'id' => $p['xchan_url'], + 'owner' => $p['xchan_url'], + 'publicKeyPem' => $p['xchan_pubkey'] + ]; + $arr = [ 'xchan' => $p, 'encoded' => $ret ]; call_hooks('encode_person', $arr); - $ret = $arr['encoded']; + $ret = $arr['encoded']; return $ret; } -- cgit v1.2.3