]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/OStatus/lib/salmon.php
Stronger typing and function access control in OStatus
[quix0rs-gnu-social.git] / plugins / OStatus / lib / salmon.php
index 2f5772a84497eac45d0cf86cdb73faea50899301..244fe4748b5b4aaa59c2d7d21ea926523c66e0da 100644 (file)
@@ -46,7 +46,7 @@ class Salmon
      * @param Profile $actor local user profile whose keys to sign with
      * @return boolean success
      */
-    public function post($endpoint_uri, $xml, $actor)
+    public function post($endpoint_uri, $xml, Profile $actor)
     {
         if (empty($endpoint_uri)) {
             return false;
@@ -59,9 +59,9 @@ class Salmon
                 common_log(LOG_ERR, "Salmon unable to sign: " . $e->getMessage());
                 return false;
             }
-    
+
             $headers = array('Content-Type: application/magic-envelope+xml');
-    
+
             try {
                 $client = new HTTPClient();
                 $client->setBody($envelope);
@@ -112,10 +112,10 @@ class Salmon
     {
         $magic_env = new $class();
 
-        $user = User::staticGet('id', $actor->id);
+        $user = User::getKV('id', $actor->id);
         if ($user->id) {
             // Use local key
-            $magickey = Magicsig::staticGet('user_id', $user->id);
+            $magickey = Magicsig::getKV('user_id', $user->id);
             if (!$magickey) {
                 // No keypair yet, let's generate one.
                 $magickey = new Magicsig();