]> git.mxchange.org Git - friendica.git/commitdiff
Issue 11492: Improvements for contact import
authorMichael <heluecht@pirati.ca>
Sun, 15 May 2022 18:40:46 +0000 (18:40 +0000)
committerMichael <heluecht@pirati.ca>
Sun, 15 May 2022 18:40:46 +0000 (18:40 +0000)
src/Module/Settings/Account.php
src/Worker/AddContact.php

index bba8e19413f91567c612cee46fe46cfc199675f8..43e8c8120c5322631c44ec1f55d56eca4618af98 100644 (file)
@@ -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]]);
                                                }
index ff2240ec1471d3ccd1168480bcbccfcb1abc71c0..0a9a71fb919cdb89647ec52ca9a1b3dcf7a40d57 100644 (file)
@@ -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]);
        }
 }