owa: attempt channel discovery if not found

This commit is contained in:
zotlabs 2018-04-22 19:24:15 -07:00
parent 55b7182136
commit 11624cd83e

View File

@ -34,6 +34,15 @@ class Owa extends \Zotlabs\Web\Controller {
where hubloc_addr = '%s' ",
dbesc(str_replace('acct:','',$keyId))
);
if(! $r) {
$found = discover_by_webbie(str_replace('acct:','',$keyId));
if($found) {
$r = q("select * from hubloc left join xchan on hubloc_hash = xchan_hash
where hubloc_addr = '%s' ",
dbesc(str_replace('acct:','',$keyId))
);
}
}
if($r) {
foreach($r as $hubloc) {
$verified = \Zotlabs\Web\HTTPSig::verify('',$hubloc['xchan_pubkey']);