]> git.mxchange.org Git - friendica.git/blobdiff - mod/dfrn_notify.php
Decrease scope of query in Profile::getEventsReminderHTML
[friendica.git] / mod / dfrn_notify.php
index 0743b214358df3dc560e69cd8d8b10cde5dcb001..7eddd4f3d576e05b59b787a2fb4eb05321b14176 100644 (file)
@@ -15,7 +15,6 @@ use Friendica\Protocol\DFRN;
 use Friendica\Protocol\Diaspora;
 
 require_once 'include/items.php';
-require_once 'include/event.php';
 
 function dfrn_notify_post(App $a) {
        logger(__function__, LOGGER_TRACE);
@@ -33,10 +32,10 @@ function dfrn_notify_post(App $a) {
                        $msg = Diaspora::decodeRaw($user, $postdata);
 
                        // Check if the user has got this contact
-                       $cid = getIdForURL($msg['author'], $user['uid']);
+                       $cid = Contact::getIdForURL($msg['author'], $user['uid']);
                        if (!$cid) {
                                // Otherwise there should be a public contact
-                               $cid = getIdForURL($msg['author']);
+                               $cid = Contact::getIdForURL($msg['author']);
                                if (!$cid) {
                                        logger('Contact not found for address ' . $msg['author']);
                                        System::xmlExit(3, 'Contact not found');
@@ -56,12 +55,11 @@ function dfrn_notify_post(App $a) {
                        }
 
                        // Set the user id. This is important if this is a public contact
-                       $importer['uid']  = $user['uid'];
                        $importer['importer_uid']  = $user['uid'];
 
                        // Now we should be able to import it
                        $ret = DFRN::import($msg['message'], $importer);
-                       System::xmlExit($ret, 'Processed');
+                       System::xmlExit($ret, 'Done');
                } else {
                        require_once 'mod/salmon.php';
                        salmon_post($a, $postdata);