missing xchan_addr for did: based identifiers

This commit is contained in:
Mike Macgirvin 2024-08-16 20:18:38 +10:00
parent c4313247e9
commit 66adb75da2
2 changed files with 6 additions and 6 deletions

View file

@ -2443,12 +2443,11 @@ class Activity
$name = escape_tags(t('Unknown'));
}
$webfingerAddress = EMPTY_STR;
$username = escape_tags($actorRecord['preferredUsername']);
$h = parse_url($url);
if ($h && $h['host']) {
$webfingerAddress = $username . '@' . $h['host'];
}
$webfingerAddress = escape_tags($actorRecord['webfinger'] ?? $username . '@' . $h['host']);
$icon = self::getIcon($actorRecord['icon']);
@ -2836,6 +2835,7 @@ class Activity
$prefix = $gateway . '/.well-known/apgateway/' . $portableId;
$machineName = $actorRecord['preferredUsername'] ?? 'unknown';
$webfingerAddress = $actorRecord['webfinger'] ?? $machineName . '@' . $parsedUrl['host'];
$existing = q("select * from hubloc where hubloc_hash = '%s' and hubloc_url = '%s' and hubloc_network = '%s'",
dbesc($portableId),
@ -2847,7 +2847,7 @@ class Activity
'hubloc_guid' => $portableId,
'hubloc_hash' => $portableId,
'hubloc_id_url' => $prefix . '/actor',
'hubloc_addr' => $machineName . '@' . $parsedUrl['host'],
'hubloc_addr' => $webfingerAddress,
'hubloc_network' => 'apnomadic',
'hubloc_url' => $gateway,
'hubloc_host' => $parsedUrl['host'],

View file

@ -4,7 +4,7 @@
<hr class="my-4">
<h2><i class="fa fa-heartbeat"></i>&nbsp; {{$pass}}</h2>
</div>
<form action="{{$baseurl}}/index.php?q=setup" method="post">
<form action="{{$baseurl}}/index.php?req=setup" method="post">
<table class="table">
{{foreach $checks as $check}}
<tr><td{{if ! $check.status}} class="text-danger"{{/if}}>{{$check.title}}</td><td><i class="fa {{if $check.status}}fa-check-square-o{{else}}{{if $check.required}}fa-square-o{{else}}fa-exclamation text-danger{{/if}}{{/if}}"></i></td><td>{{if $check.required}}(required){{/if}}</td></tr>