From: Hypolite Petovan Date: Mon, 25 Jul 2022 13:09:11 +0000 (-0400) Subject: Fix wrong type-hint in Module/DFRN/Notify X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=65cd0def22df079b16bb9262e41dcf9febf616ba;p=friendica.git Fix wrong type-hint in Module/DFRN/Notify - Address https://github.com/friendica/friendica/issues/11630#issuecomment-1193958648 --- diff --git a/src/Module/DFRN/Notify.php b/src/Module/DFRN/Notify.php index 2dae0da0ad..090ed34926 100644 --- a/src/Module/DFRN/Notify.php +++ b/src/Module/DFRN/Notify.php @@ -59,13 +59,13 @@ class Notify extends BaseModule } } - private static function dispatchPublic(array $postdata) + private static function dispatchPublic(string $postdata): bool { $msg = Diaspora::decodeRaw($postdata, '', true); if (!is_array($msg)) { // We have to fail silently to be able to hand it over to the salmon parser Logger::warning('Diaspora::decodeRaw() has failed for some reason.'); - return; + return false; } // Fetch the corresponding public contact @@ -87,6 +87,8 @@ class Notify extends BaseModule // Now we should be able to import it $ret = DFRN::import($msg['message'], $importer, Conversation::PARCEL_DIASPORA_DFRN, Conversation::RELAY); System::xmlExit($ret, 'Done'); + + return true; } private static function dispatchPrivate(array $user, string $postdata)