]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Contact/Poke.php
Merge pull request #9515 from MrPetovan/task/9464-block-replies
[friendica.git] / src / Module / Contact / Poke.php
index a1c2c289fe6b76fbfd1d3ef3f5decdb3569f62a6..d9fab36c02e87a79be771242e72be4554fe0ed66 100644 (file)
@@ -42,7 +42,7 @@ class Poke extends BaseModule
                        return self::postReturn(false);
                }
 
-               Logger::info('poke: verb ' . $verb . ' contact ' . $contact_id);
+               Logger::info('verb ' . $verb . ' contact ' . $contact_id);
 
                $contact = DBA::selectFirst('contact', ['id', 'name'], ['id' => $parameters['id'], 'uid' => local_user()]);
                if (!DBA::isResult($contact)) {
@@ -67,7 +67,6 @@ class Poke extends BaseModule
                $arr['guid']          = System::createUUID();
                $arr['uid']           = $uid;
                $arr['uri']           = $uri;
-               $arr['parent-uri']    = $uri;
                $arr['wall']          = 1;
                $arr['contact-id']    = $actor['id'];
                $arr['owner-name']    = $actor['name'];
@@ -110,9 +109,7 @@ class Poke extends BaseModule
         */
        private static function postReturn(bool $success)
        {
-               if ($success) {
-                       info(DI::l10n()->t('Poke successfully sent.'));
-               } else {
+               if (!$success) {
                        notice(DI::l10n()->t('Error while sending poke, please retry.'));
                }
 
@@ -138,7 +135,7 @@ class Poke extends BaseModule
                        throw new HTTPException\NotFoundException();
                }
 
-               Model\Profile::load(DI::app(), '', Model\Contact::getDetailsByURL($contact["url"]));
+               Model\Profile::load(DI::app(), '', Model\Contact::getByURL($contact["url"], false));
 
                $verbs = [];
                foreach (DI::l10n()->getPokeVerbs() as $verb => $translations) {