]> git.mxchange.org Git - friendica.git/commitdiff
Pass correct hook data for support_follow and support_revoke_follow
authorHypolite Petovan <hypolite@mrpetovan.com>
Wed, 6 Oct 2021 16:07:16 +0000 (12:07 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Wed, 6 Oct 2021 16:07:48 +0000 (12:07 -0400)
src/Core/Protocol.php

index a01e632bfacd73a94ffc3578c54e2756b3d694d4..8583ac243c65bcb4ed44bdbdcc36c9e96f8d5305 100644 (file)
@@ -84,10 +84,13 @@ class Protocol
                        return true;
                }
 
-               $result = null;
-               Hook::callAll('support_follow', $result);
+               $hook_data = [
+                       'protocol' => $protocol,
+                       'result' => null
+               ];
+               Hook::callAll('support_follow', $hook_data);
 
-               return $result === true;
+               return $hook_data['result'] === true;
        }
 
        /**
@@ -103,10 +106,13 @@ class Protocol
                        return true;
                }
 
-               $result = null;
-               Hook::callAll('support_revoke_follow', $result);
+               $hook_data = [
+                       'protocol' => $protocol,
+                       'result' => null
+               ];
+               Hook::callAll('support_revoke_follow', $hook_data);
 
-               return $result === true;
+               return $hook_data['result'] === true;
        }
 
        /**