X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fsalmon.php;h=1e92980f1ceb123a2ef362e97581fc780be7e816;hb=c41aaf8a17405e4e11366fec14519994612744b1;hp=1932d3ba4175599f990121a0608382562e44b90f;hpb=18745b1723b3f8580704914e8f9df8441c859e70;p=friendica.git diff --git a/mod/salmon.php b/mod/salmon.php index 1932d3ba41..1e92980f1c 100644 --- a/mod/salmon.php +++ b/mod/salmon.php @@ -1,6 +1,6 @@ data[0]->attributes()->type[0]; - $keyhash = $base->sig[0]->attributes()->keyhash[0]; + $keyhash = $base->sig[0]->attributes()->keyhash[0] ?? ''; $encoding = $base->encoding; $alg = $base->alg; @@ -120,7 +122,7 @@ function salmon_post(App $a, $xml = '') { $m = Strings::base64UrlDecode($key_info[1]); $e = Strings::base64UrlDecode($key_info[2]); - Logger::log('key details: ' . print_r($key_info,true), Logger::DEBUG); + Logger::info('key details', ['info' => $key_info]); $pubkey = Crypto::meToPem($m, $e); @@ -185,6 +187,10 @@ function salmon_post(App $a, $xml = '') { } } + if (!empty($r[0]['gsid'])) { + GServer::setProtocol($r[0]['gsid'], Post\DeliveryData::OSTATUS); + } + // Have we ignored the person? // If so we can not accept this post.