aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Activity.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Lib/Activity.php')
-rw-r--r--Zotlabs/Lib/Activity.php12
1 files changed, 5 insertions, 7 deletions
diff --git a/Zotlabs/Lib/Activity.php b/Zotlabs/Lib/Activity.php
index 93f50fc56..6c680c56e 100644
--- a/Zotlabs/Lib/Activity.php
+++ b/Zotlabs/Lib/Activity.php
@@ -1757,14 +1757,12 @@ class Activity {
}
$epubkey = '';
- // TODO: We should probably also deal with arrays here.
- // It is not clear yet which key we want to store if we got more than one though.
- if (isset($person_obj['assertionMethod']['publicKeyMultibase'])) {
- if ($person_obj['id'] === $person_obj['assertionMethod']['controller']) {
+ foreach($person_obj['assertionMethod'] as $am) {
+ if ($person_obj['id'] === $am['controller'] &&
+ $am['type'] === 'Multikey' &&
+ str_starts_with($am['publicKeyMultibase'], 'z6Mk')
+ ) {
$epubkey = $person_obj['assertionMethod']['publicKeyMultibase'];
- if ($person_obj['assertionMethod']['type'] === 'Multikey') {
- $epubkey = $person_obj['assertionMethod']['publicKeyMultibase'];
- }
}
}