]> git.mxchange.org Git - friendica.git/blobdiff - mod/fsuggest.php
Issue 7418: connections to forums should now work again
[friendica.git] / mod / fsuggest.php
index 2cede5685215abe6ad0bbf8bbddaa90b42efd86e..d41363ad7b38d153043b2afa7484bff30fdd8370 100644 (file)
@@ -10,6 +10,7 @@ use Friendica\Core\Worker;
 use Friendica\Database\DBA;
 use Friendica\Util\DateTimeFormat;
 use Friendica\Util\Strings;
+use Friendica\Worker\Delivery;
 
 function fsuggest_post(App $a)
 {
@@ -44,14 +45,14 @@ function fsuggest_post(App $a)
                return;
        }
 
-       $note = Strings::escapeHtml(trim(defaults($_POST, 'note', '')));
+       $note = Strings::escapeHtml(trim($_POST['note'] ?? ''));
 
        $fields = ['uid' => local_user(),'cid' => $contact_id, 'name' => $contact['name'],
                'url' => $contact['url'], 'request' => $contact['request'],
                'photo' => $contact['avatar'], 'note' => $note, 'created' => DateTimeFormat::utcNow()];
        DBA::insert('fsuggest', $fields);
 
-       Worker::add(PRIORITY_HIGH, 'Notifier', 'suggest', DBA::lastInsertId());
+       Worker::add(PRIORITY_HIGH, 'Notifier', Delivery::SUGGESTION, DBA::lastInsertId());
 
        info(L10n::t('Friend suggestion sent.') . EOL);
 }