Bugfix Avatars and simple empty-contact.png

This commit is contained in:
the-djmaze 2022-11-23 10:46:12 +01:00
parent 59cd22625a
commit 77ab2fddf5
2 changed files with 3 additions and 3 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 665 B

View file

@ -25,7 +25,7 @@ class AvatarsPlugin extends \RainLoop\Plugins\AbstractPlugin
{
$bBimi = !empty($this->jsonParam('bimi'));
$sEmail = $this->jsonParam('email');
$aResult = static::getAvatar(\urldecode($sEmail), !empty($sEmail));
$aResult = $this->getAvatar(\urldecode($sEmail), !empty($sEmail));
if ($aResult) {
$aResult = [
'type' => $aResult[0],
@ -38,7 +38,7 @@ class AvatarsPlugin extends \RainLoop\Plugins\AbstractPlugin
// public function ServiceAvatar(...$aParts)
public function ServiceAvatar(string $sServiceName, string $sBimi, string $sEmail)
{
$aResult = static::getAvatar(\urldecode($sEmail), !empty($sEmail));
$aResult = $this->getAvatar(\urldecode($sEmail), !empty($sEmail));
if ($aResult) {
\header('Content-Type: '.$aResult[0]);
echo $aResult[1];
@ -59,7 +59,7 @@ class AvatarsPlugin extends \RainLoop\Plugins\AbstractPlugin
);
}
private static function getAvatar(string $sEmail, bool $bBimi) : ?array
private function getAvatar(string $sEmail, bool $bBimi) : ?array
{
if (!\strpos($sEmail, '@')) {
return null;