From 9f69a992c84d3d212cde00ba55e563c691173aa3 Mon Sep 17 00:00:00 2001 From: the-djmaze <> Date: Thu, 22 Dec 2022 10:02:47 +0100 Subject: [PATCH] Convert facebookmail.com to facebook.com --- plugins/avatars/index.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/avatars/index.php b/plugins/avatars/index.php index f14e729a0..1839b08bf 100644 --- a/plugins/avatars/index.php +++ b/plugins/avatars/index.php @@ -268,10 +268,11 @@ class AvatarsPlugin extends \RainLoop\Plugins\AbstractPlugin // Only allow service icon when DKIM is valid. $bBimi is true when DKIM is valid. if ($bBimi && !$aResult) { + $sDomain = \preg_replace('/^(.+\\.)?(paypal\\.[a-z][a-z])$/D', 'paypal.com', $sDomain); + $sDomain = \preg_replace('/^facebookmail.com$/D', '@facebook.com', $sDomain); $aServices = [ "services/{$sDomain}", - 'services/' . \preg_replace('/^.+\\.([^.]+\\.[^.]+)$/D', '$1', $sDomain), - 'services/' . \preg_replace('/^(.+\\.)?(paypal\\.[a-z][a-z])$/D', 'paypal.com', $sDomain) + 'services/' . \preg_replace('/^.+\\.([^.]+\\.[^.]+)$/D', '$1', $sDomain) ]; foreach ($aServices as $service) { $file = __DIR__ . "/images/{$service}.png";