]> git.mxchange.org Git - friendica.git/commitdiff
Now it could work
authorMichael <heluecht@pirati.ca>
Fri, 13 Oct 2017 09:41:01 +0000 (09:41 +0000)
committerMichael <heluecht@pirati.ca>
Fri, 13 Oct 2017 09:41:01 +0000 (09:41 +0000)
include/delivery.php
include/diaspora.php

index 46ff74a708c8916b7386700da8cc3de62ff70fb8..cddc9cb004006eb15d17c3bc0241734de6e1315a 100644 (file)
@@ -509,7 +509,7 @@ function delivery_run(&$argv, &$argc){
                                        Diaspora::send_retraction($target_item,$owner,$contact,$public_message);
                                        break;
                                } elseif ($relocate) {
-                                       Diaspora::sendAccountMigration($owner, $uid);
+                                       Diaspora::sendAccountMigration($owner, $contact, $uid);
                                        break;
                                } elseif ($followup) {
                                        // send comments and likes to owner to relay
index aad4f5c4405822cb6ae65add3369587d7c76d7c5..2e165a05b5d43038767a3493ab9e27668d3c7635 100644 (file)
@@ -2963,17 +2963,18 @@ class Diaspora {
         * @brief sends an account migration
         *
         * @param array $owner the array of the item owner
+        * @param array $contact Target of the communication
         * @param int $uid User ID
         *
         * @return int The result of the transmission
         */
-       public static function sendAccountMigration($owner, $uid) {
+       public static function sendAccountMigration($owner, $contact, $uid) {
 
                $old_handle = PConfig::get($uid, 'system', 'previous_addr');
                $profile = self::createProfileData($uid);
 
                $signed_text = 'AccountMigration:'.$old_handle.':'.$profile['author'];
-               $signature = rsa_sign($signed_text, $owner["uprvkey"], "sha256");
+               $signature = base64_encode(rsa_sign($signed_text, $owner["uprvkey"], "sha256"));
 
                $message = array("author" => $old_handle,
                                "profile" => $profile,