]> git.mxchange.org Git - friendica.git/blobdiff - mod/dfrn_notify.php
Bugfix Diaspora: We exited with the wrong return values and the guid for messages...
[friendica.git] / mod / dfrn_notify.php
index ddbc9219b1d209d14b609a9feb8d38b2b1702c19..44e016599e486862c0d4493499ba10e331838e33 100644 (file)
@@ -5,6 +5,9 @@
  * @brief The dfrn notify endpoint
  * @see PDF with dfrn specs: https://github.com/friendica/friendica/blob/master/spec/dfrn2.pdf
  */
+
+use Friendica\App;
+
 require_once('include/items.php');
 require_once('include/dfrn.php');
 require_once('include/event.php');
@@ -138,10 +141,6 @@ function dfrn_notify_post(App $a) {
 
        $rino = get_config('system', 'rino_encrypt');
        $rino = intval($rino);
-       // use RINO1 if mcrypt isn't installed and RINO2 was selected
-       if ($rino == 2 && !function_exists('mcrypt_create_iv')) {
-               $rino = 1;
-       }
 
        logger("Local rino version: " .  $rino, LOGGER_DEBUG);
 
@@ -178,10 +177,10 @@ function dfrn_notify_post(App $a) {
                        case 0:
                        case 1:
                                /*
-                                * we got a key. old code send only the key, without RINO version.
+                                *we got a key. old code send only the key, without RINO version.
                                 * we assume RINO 1 if key and no RINO version
                                 */
-                               $data = aes_decrypt(hex2bin($data), $final_key);
+                               $data = dfrn::aes_decrypt(hex2bin($data), $final_key);
                                break;
                        case 2:
                                try {
@@ -316,10 +315,6 @@ function dfrn_notify_content(App $a) {
 
                $rino = get_config('system', 'rino_encrypt');
                $rino = intval($rino);
-               // use RINO1 if mcrypt isn't installed and RINO2 was selected
-               if ($rino == 2 && !function_exists('mcrypt_create_iv')) {
-                       $rino = 1;
-               }
 
                logger("Local rino version: ". $rino, LOGGER_DEBUG);