From 65cd0def22df079b16bb9262e41dcf9febf616ba Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 25 Jul 2022 09:09:11 -0400 Subject: [PATCH] Fix wrong type-hint in Module/DFRN/Notify - Address https://github.com/friendica/friendica/issues/11630#issuecomment-1193958648 --- src/Module/DFRN/Notify.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) -- 2.39.5