]> git.mxchange.org Git - friendica.git/blobdiff - mod/dfrn_notify.php
Move Module\Profile to Module\Profile\Index
[friendica.git] / mod / dfrn_notify.php
index dee6bad779538e3c540ba856befc2781a6df88e8..a08fe1b48a50d849bec56b4de66dcaa284c0d0b9 100644 (file)
@@ -2,21 +2,21 @@
 
 /**
  * @file mod/dfrn_notify.php
- * @brief The dfrn notify endpoint
+ * The dfrn notify endpoint
  * @see PDF with dfrn specs: https://github.com/friendica/friendica/blob/master/spec/dfrn2.pdf
  */
 
 use Friendica\App;
-use Friendica\Core\Config;
 use Friendica\Core\Logger;
 use Friendica\Core\System;
 use Friendica\Database\DBA;
+use Friendica\DI;
 use Friendica\Model\Contact;
 use Friendica\Model\User;
 use Friendica\Protocol\DFRN;
 use Friendica\Protocol\Diaspora;
-use Friendica\Util\Strings;
 use Friendica\Util\Network;
+use Friendica\Util\Strings;
 
 function dfrn_notify_post(App $a) {
        Logger::log(__function__, Logger::TRACE);
@@ -128,7 +128,7 @@ function dfrn_notify_post(App $a) {
                System::xmlExit(0, 'relationship dissolved');
        }
 
-       $rino = Config::get('system', 'rino_encrypt');
+       $rino = DI::config()->get('system', 'rino_encrypt');
        $rino = intval($rino);
 
        if (strlen($key)) {
@@ -184,7 +184,7 @@ function dfrn_notify_post(App $a) {
 
 function dfrn_dispatch_public($postdata)
 {
-       $msg = Diaspora::decodeRaw([], $postdata, true);
+       $msg = Diaspora::decodeRaw($postdata, '', true);
        if (!$msg) {
                // We have to fail silently to be able to hand it over to the salmon parser
                return false;
@@ -214,7 +214,7 @@ function dfrn_dispatch_public($postdata)
 
 function dfrn_dispatch_private($user, $postdata)
 {
-       $msg = Diaspora::decodeRaw($user, $postdata);
+       $msg = Diaspora::decodeRaw($postdata, $user['prvkey'] ?? '');
        if (!$msg) {
                System::xmlExit(4, 'Unable to parse message');
        }
@@ -343,7 +343,7 @@ function dfrn_notify_content(App $a) {
                $encrypted_id = bin2hex($encrypted_id);
 
 
-               $rino = Config::get('system', 'rino_encrypt');
+               $rino = DI::config()->get('system', 'rino_encrypt');
                $rino = intval($rino);
 
                Logger::log("Local rino version: ". $rino, Logger::DATA);