From 972f91436cc3c1ebb458ff0c0c676f6f4c8d37a8 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 15 May 2022 18:40:46 +0000 Subject: [PATCH] Issue 11492: Improvements for contact import --- src/Module/Settings/Account.php | 2 +- src/Worker/AddContact.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Module/Settings/Account.php b/src/Module/Settings/Account.php index bba8e19413..43e8c8120c 100644 --- a/src/Module/Settings/Account.php +++ b/src/Module/Settings/Account.php @@ -349,7 +349,7 @@ class Account extends BaseSettings // "http" or "@" to be present in the string. // All other fields from the row will be ignored if ((strpos($csvRow[0], '@') !== false) || in_array(parse_url($csvRow[0], PHP_URL_SCHEME), ['http', 'https'])) { - Worker::add(PRIORITY_LOW, 'AddContact', $_SESSION['uid'], $csvRow[0]); + Worker::add(PRIORITY_MEDIUM, 'AddContact', local_user(), $csvRow[0]); } else { Logger::notice('Invalid account', ['url' => $csvRow[0]]); } diff --git a/src/Worker/AddContact.php b/src/Worker/AddContact.php index ff2240ec14..0a9a71fb91 100644 --- a/src/Worker/AddContact.php +++ b/src/Worker/AddContact.php @@ -41,6 +41,6 @@ class AddContact } $result = Contact::createFromProbeForUser($uid, $url); - Logger::info('Added contact', ['uid' => $uid, 'url' => $url, 'result' => $result]); + Logger::info('Added contact for user', ['uid' => $uid, 'url' => $url, 'result' => $result]); } } -- 2.39.5