From 2856b1126c79b29cd48b4254bbb840ff840785bd Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 17 Dec 2024 04:46:55 +0000 Subject: [PATCH 01/12] Fix some notices / reduce the number of warnings --- src/Protocol/ATProtocol/Processor.php | 8 ++++---- src/Protocol/ActivityPub/Delivery.php | 2 +- src/Util/JsonLD.php | 1 - src/Worker/Notifier.php | 8 ++++++-- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/Protocol/ATProtocol/Processor.php b/src/Protocol/ATProtocol/Processor.php index 737112ec4c..852d21919d 100755 --- a/src/Protocol/ATProtocol/Processor.php +++ b/src/Protocol/ATProtocol/Processor.php @@ -176,7 +176,7 @@ class Processor if ($id) { $this->logger->info('Post inserted', ['id' => $id, 'guid' => $item['guid']]); } elseif (Post::exists(['uid' => $uid, 'uri-id' => $item['uri-id']])) { - $this->logger->warning('Post was found', ['guid' => $item['guid'], 'uri' => $item['uri']]); + $this->logger->notice('Post was found', ['guid' => $item['guid'], 'uri' => $item['uri']]); } else { $this->logger->warning('Post was not inserted', ['guid' => $item['guid'], 'uri' => $item['uri']]); } @@ -206,7 +206,7 @@ class Processor if ($id) { $this->logger->info('Repost inserted', ['id' => $id]); } elseif (Post::exists(['uid' => $uid, 'uri-id' => $item['uri-id']])) { - $this->logger->warning('Repost was found', ['uri' => $item['uri']]); + $this->logger->notice('Repost was found', ['uri' => $item['uri']]); } else { $this->logger->warning('Repost was not inserted', ['uri' => $item['uri']]); } @@ -235,7 +235,7 @@ class Processor if ($id) { $this->logger->info('Like inserted', ['id' => $id]); } elseif (Post::exists(['uid' => $uid, 'uri-id' => $item['uri-id']])) { - $this->logger->warning('Like was found', ['uri' => $item['uri']]); + $this->logger->notice('Like was found', ['uri' => $item['uri']]); } else { $this->logger->warning('Like was not inserted', ['uri' => $item['uri']]); } @@ -315,7 +315,7 @@ class Processor if ($id) { $this->logger->info('Fetched post inserted', ['id' => $id, 'guid' => $item['guid']]); } elseif (Post::exists(['uid' => $uid, 'uri-id' => $item['uri-id']])) { - $this->logger->warning('Fetched post was found', ['guid' => $item['guid'], 'uri' => $item['uri']]); + $this->logger->notice('Fetched post was found', ['guid' => $item['guid'], 'uri' => $item['uri']]); } else { $this->logger->warning('Fetched post was not inserted', ['guid' => $item['guid'], 'uri' => $item['uri']]); } diff --git a/src/Protocol/ActivityPub/Delivery.php b/src/Protocol/ActivityPub/Delivery.php index 7a7d484b8d..d49e31de25 100644 --- a/src/Protocol/ActivityPub/Delivery.php +++ b/src/Protocol/ActivityPub/Delivery.php @@ -161,7 +161,7 @@ class Delivery } - Logger::notice('Delivery failed', ['retcode' => $response->getReturnCode(), 'serverfailure' => $serverfail, 'drop' => $drop, 'runtime' => round($runtime, 3), 'uri-id' => $uri_id, 'uid' => $uid, 'item_id' => $item_id, 'cmd' => $cmd, 'inbox' => $inbox]); + Logger::notice('Delivery failed', ['retcode' => $response->getReturnCode() ?? 0, 'serverfailure' => $serverfail, 'drop' => $drop, 'runtime' => round($runtime, 3), 'uri-id' => $uri_id, 'uid' => $uid, 'item_id' => $item_id, 'cmd' => $cmd, 'inbox' => $inbox]); } if ($uri_id) { if ($success) { diff --git a/src/Util/JsonLD.php b/src/Util/JsonLD.php index 1ee5c0920e..74f6e4baca 100644 --- a/src/Util/JsonLD.php +++ b/src/Util/JsonLD.php @@ -127,7 +127,6 @@ class JsonLD $messages[] = $currentException->getMessage(); } while ($currentException = $currentException->getPrevious()); - Logger::warning('JsonLD normalize error'); Logger::notice('JsonLD normalize error', ['messages' => $messages]); Logger::info('JsonLD normalize error', ['trace' => $e->getTraceAsString()]); Logger::debug('JsonLD normalize error', ['jsonobj' => $jsonobj]); diff --git a/src/Worker/Notifier.php b/src/Worker/Notifier.php index 438c0e5e77..e32df57106 100644 --- a/src/Worker/Notifier.php +++ b/src/Worker/Notifier.php @@ -451,6 +451,10 @@ class Notifier } $cdata = Contact::getPublicAndUserContactID($contact['id'], $sender_uid); + if (empty($cdata)) { + Logger::info('No contact entry found', ['id' => $contact['id'], 'uid' => $sender_uid]); + continue; + } if (in_array($cdata['public'] ?: $contact['id'], $ap_contacts)) { Logger::info('The public contact is already delivered via AP, so skip delivery via legacy DFRN/Diaspora', ['batch' => $in_batch, 'target' => $post_uriid, 'uid' => $sender_uid, 'contact' => $contact['url']]); continue; @@ -637,8 +641,8 @@ class Notifier private static function activityPubDelivery($cmd, array $target_item, array $parent, array $thr_parent, int $priority, string $created, array $recipients): array { // Don't deliver via AP when the starting post isn't from a federated network - if (!in_array($parent['network'], Protocol::FEDERATED)) { - Logger::info('Parent network is no federated network, so no AP delivery', ['network' => $parent['network']]); + if (!in_array($parent['network'] ?? '', Protocol::FEDERATED)) { + Logger::info('Parent network is no federated network, so no AP delivery', ['network' => $parent['network'] ?? '']); return ['count' => 0, 'contacts' => []]; } From ea5417a6a3287577688b74554c52a2eb453339e1 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 20 Dec 2024 08:22:56 +0000 Subject: [PATCH 02/12] Issue 14344: Contact import is relocated to a dedicated place --- src/Module/BaseSettings.php | 7 ++ src/Module/Settings/Account.php | 43 ------- src/Module/Settings/Connectors.php | 7 -- src/Module/Settings/ContactImport.php | 118 ++++++++++++++++++ static/routes.config.php | 1 + view/templates/settings/account.tpl | 12 -- view/templates/settings/connectors.tpl | 1 - view/templates/settings/contactimport.tpl | 23 ++++ .../theme/frio/templates/settings/account.tpl | 22 ---- .../frio/templates/settings/connectors.tpl | 2 - .../frio/templates/settings/contactimport.tpl | 28 +++++ 11 files changed, 177 insertions(+), 87 deletions(-) create mode 100644 src/Module/Settings/ContactImport.php create mode 100644 view/templates/settings/contactimport.tpl create mode 100644 view/theme/frio/templates/settings/contactimport.tpl diff --git a/src/Module/BaseSettings.php b/src/Module/BaseSettings.php index 693554f493..49e75ebaff 100644 --- a/src/Module/BaseSettings.php +++ b/src/Module/BaseSettings.php @@ -149,6 +149,13 @@ class BaseSettings extends BaseModule 'accesskey' => 's', ]; + $tabs[] = [ + 'label' => $this->t('Import Contacts'), + 'url' => 'settings/importcontacts', + 'selected' => static::class == Settings\UserExport::class ? 'active' : '', + 'accesskey' => '', + ]; + $tabs[] = [ 'label' => $this->t('Export personal data'), 'url' => 'settings/userexport', diff --git a/src/Module/Settings/Account.php b/src/Module/Settings/Account.php index 8e8bd5a909..567ac41fd6 100644 --- a/src/Module/Settings/Account.php +++ b/src/Module/Settings/Account.php @@ -9,7 +9,6 @@ namespace Friendica\Module\Settings; use Exception; use Friendica\Core\ACL; -use Friendica\Core\Logger; use Friendica\Core\Renderer; use Friendica\Core\Search; use Friendica\Core\Worker; @@ -25,7 +24,6 @@ use Friendica\Module\BaseSettings; use Friendica\Network\HTTPException; use Friendica\Protocol\Activity; use Friendica\Protocol\Delivery; -use Friendica\Util\Network; use Friendica\Util\Temporal; class Account extends BaseSettings @@ -324,42 +322,6 @@ class Account extends BaseSettings DI::baseUrl()->redirect($redirectUrl); } - // Import Contacts from CSV file - if (!empty($request['importcontact-submit'])) { - if (isset($_FILES['importcontact-filename'])) { - // was there an error - if ($_FILES['importcontact-filename']['error'] > 0) { - Logger::notice('Contact CSV file upload error', ['error' => $_FILES['importcontact-filename']['error']]); - DI::sysmsg()->addNotice(DI::l10n()->t('Contact CSV file upload error')); - } else { - $csvArray = array_map('str_getcsv', file($_FILES['importcontact-filename']['tmp_name'])); - Logger::notice('Import started', ['lines' => count($csvArray)]); - // import contacts - foreach ($csvArray as $csvRow) { - // The 1st row may, or may not contain the headers of the table - // We expect the 1st field of the row to contain either the URL - // or the handle of the account, therefore we check for either - // "http" or "@" to be present in the string. - // All other fields from the row will be ignored - if ((strpos($csvRow[0], '@') !== false) || Network::isValidHttpUrl($csvRow[0])) { - Worker::add(Worker::PRIORITY_MEDIUM, 'AddContact', DI::userSession()->getLocalUserId(), trim($csvRow[0], '@')); - } else { - Logger::notice('Invalid account', ['url' => $csvRow[0]]); - } - } - Logger::notice('Import done'); - - DI::sysmsg()->addInfo(DI::l10n()->t('Importing Contacts done')); - // delete temp file - unlink($_FILES['importcontact-filename']['tmp_name']); - } - } else { - Logger::notice('Import triggered, but no import file was found.'); - } - - DI::baseUrl()->redirect($redirectUrl); - } - if (!empty($request['relocate-submit'])) { Worker::add(Worker::PRIORITY_HIGH, 'Notifier', Delivery::RELOCATION, DI::userSession()->getLocalUserId()); DI::sysmsg()->addInfo(DI::l10n()->t("Relocate message has been send to your contacts")); @@ -637,11 +599,6 @@ class Account extends BaseSettings '$h_descadvn' => DI::l10n()->t('Change the behaviour of this account for special situations'), '$pagetype' => $pagetype, - '$importcontact' => DI::l10n()->t('Import Contacts'), - '$importcontact_text' => DI::l10n()->t('Upload a CSV file that contains the handle of your followed accounts in the first column you exported from the old account.'), - '$importcontact_button' => DI::l10n()->t('Upload File'), - '$importcontact_maxsize' => DI::config()->get('system', 'max_csv_file_size', 30720), - '$relocate' => DI::l10n()->t('Relocate'), '$relocate_text' => DI::l10n()->t("If you have moved this profile from another server, and some of your contacts don't receive your updates, try pushing this button."), '$relocate_button' => DI::l10n()->t("Resend relocate message to contacts"), diff --git a/src/Module/Settings/Connectors.php b/src/Module/Settings/Connectors.php index 3e6829a0d6..7e5b57a783 100644 --- a/src/Module/Settings/Connectors.php +++ b/src/Module/Settings/Connectors.php @@ -62,7 +62,6 @@ class Connectors extends BaseSettings $this->pconfig->set($this->session->getLocalUserId(), 'system', 'api_spoiler_title', intval($request['api_spoiler_title'])); $this->pconfig->set($this->session->getLocalUserId(), 'system', 'api_auto_attach', intval($request['api_auto_attach'])); $this->pconfig->set($this->session->getLocalUserId(), 'system', 'article_mode', intval($request['article_mode'])); - $this->pconfig->set($this->session->getLocalUserId(), 'ostatus', 'legacy_contact', $request['legacy_contact']); } elseif (!empty($request['mail-submit']) && function_exists('imap_open') && !$this->config->get('system', 'imap_disabled')) { $mail_server = $request['mail_server'] ?? ''; $mail_port = $request['mail_port'] ?? ''; @@ -127,11 +126,6 @@ class Connectors extends BaseSettings $api_spoiler_title = intval($this->pconfig->get($this->session->getLocalUserId(), 'system', 'api_spoiler_title', true)); $api_auto_attach = intval($this->pconfig->get($this->session->getLocalUserId(), 'system', 'api_auto_attach', false)); $article_mode = intval($this->pconfig->get($this->session->getLocalUserId(), 'system', 'article_mode')); - $legacy_contact = $this->pconfig->get($this->session->getLocalUserId(), 'ostatus', 'legacy_contact'); - - if (!empty($legacy_contact)) { - $this->baseUrl->redirect('ostatus/subscribe?url=' . urlencode($legacy_contact)); - } $connector_settings_forms = []; foreach ($this->database->selectToArray('hook', ['file', 'function'], ['hook' => 'connector_settings']) as $hook) { @@ -215,7 +209,6 @@ class Connectors extends BaseSettings '$api_spoiler_title' => ['api_spoiler_title', $this->t('API: Use spoiler field as title'), $api_spoiler_title, $this->t('When activated, the "spoiler_text" field in the API will be used for the title on standalone posts. When deactivated it will be used for spoiler text. For comments it will always be used for spoiler text.')], '$api_auto_attach' => ['api_auto_attach', $this->t('API: Automatically links at the end of the post as attached posts'), $api_auto_attach, $this->t('When activated, added links at the end of the post react the same way as added links in the web interface.')], '$article_mode' => ['article_mode', $this->t('Article Mode'), $article_mode, $this->t("Controls how posts with titles are transmitted. Mastodon and its forks don't display the content of these posts if the post is created in the correct (default) way."), $article_modes], - '$legacy_contact' => ['legacy_contact', $this->t('Your legacy ActivityPub/GNU Social account'), $legacy_contact, $this->t('If you enter your old account name from an ActivityPub based system or your GNU Social/Statusnet account name here (in the format user@domain.tld), your contacts will be added automatically. The field will be emptied when done.')], '$connector_settings_forms' => $connector_settings_forms, diff --git a/src/Module/Settings/ContactImport.php b/src/Module/Settings/ContactImport.php new file mode 100644 index 0000000000..991b447548 --- /dev/null +++ b/src/Module/Settings/ContactImport.php @@ -0,0 +1,118 @@ +config = $config; + $this->pconfig = $pconfig; + $this->systemMessages = $systemMessages; + } + + protected function post(array $request = []) + { + if (!$this->session->getLocalUserId()) { + throw new HTTPException\ForbiddenException($this->l10n->t('Permission denied.')); + } + + self::checkFormSecurityTokenRedirectOnError($this->args->getQueryString(), 'contactimport'); + + parent::post(); + + // Import Contacts from CSV file + if (!empty($request['importcontact-submit'])) { + $this->pconfig->set($this->session->getLocalUserId(), 'ostatus', 'legacy_contact', $request['legacy_contact']); + if (isset($_FILES['importcontact-filename']) && !empty($_FILES['importcontact-filename']['tmp_name'])) { + // was there an error + if ($_FILES['importcontact-filename']['error'] > 0) { + $this->logger->notice('Contact CSV file upload error', ['error' => $_FILES['importcontact-filename']['error']]); + $this->systemMessages->addNotice($this->l10n->t('Contact CSV file upload error')); + } else { + $csvArray = array_map('str_getcsv', file($_FILES['importcontact-filename']['tmp_name'])); + $this->logger->notice('Import started', ['lines' => count($csvArray)]); + // import contacts + foreach ($csvArray as $csvRow) { + // The 1st row may, or may not contain the headers of the table + // We expect the 1st field of the row to contain either the URL + // or the handle of the account, therefore we check for either + // "http" or "@" to be present in the string. + // All other fields from the row will be ignored + if ((strpos($csvRow[0], '@') !== false) || Network::isValidHttpUrl($csvRow[0])) { + Worker::add(Worker::PRIORITY_MEDIUM, 'AddContact', $this->session->getLocalUserId(), trim($csvRow[0], '@')); + } else { + $this->logger->notice('Invalid account', ['url' => $csvRow[0]]); + } + } + $this->logger->notice('Import done'); + + $this->systemMessages->addInfo($this->l10n->t('Importing Contacts done')); + // delete temp file + unlink($_FILES['importcontact-filename']['tmp_name']); + } + } else { + $this->logger->notice('Import triggered, but no import file was found.'); + } + } + $this->baseUrl->redirect($this->args->getQueryString()); + } + + protected function content(array $request = []): string + { + if (!$this->session->getLocalUserId()) { + throw new HTTPException\ForbiddenException($this->l10n->t('Permission denied.')); + } + + parent::content(); + + $legacy_contact = $this->pconfig->get($this->session->getLocalUserId(), 'ostatus', 'legacy_contact'); + + if (!empty($legacy_contact)) { + $this->baseUrl->redirect('ostatus/subscribe?url=' . urlencode($legacy_contact)); + } + + $tpl = Renderer::getMarkupTemplate('settings/contactimport.tpl'); + return Renderer::replaceMacros($tpl, [ + '$title' => $this->l10n->t('Import Contacts'), + '$submit' => $this->l10n->t('Save Settings'), + '$form_security_token' => self::getFormSecurityToken('contactimport'), + '$importcontact_text' => $this->l10n->t('Upload a CSV file that contains the handle of your followed accounts in the first column you exported from the old account.'), + '$importcontact_button' => $this->l10n->t('Upload File'), + '$importcontact_maxsize' => $this->config->get('system', 'max_csv_file_size', 30720), + '$legacy_contact' => ['legacy_contact', $this->t('Your legacy ActivityPub/GNU Social account'), $legacy_contact, $this->t('If you enter your old account name from an ActivityPub based system or your GNU Social/Statusnet account name here (in the format user@domain.tld), your contacts will be added automatically. The field will be emptied when done.')], + ]); + } +} diff --git a/static/routes.config.php b/static/routes.config.php index f9680216e2..5ebce2738b 100644 --- a/static/routes.config.php +++ b/static/routes.config.php @@ -622,6 +622,7 @@ return [ '/delegation[/{action}/{user_id}]' => [Module\Settings\Delegation::class, [R::GET, R::POST]], '/display' => [Module\Settings\Display::class, [R::GET, R::POST]], '/features' => [Module\Settings\Features::class, [R::GET, R::POST]], + '/importcontacts' => [Module\Settings\ContactImport::class, [R::GET, R::POST]], '/oauth' => [Module\Settings\OAuth::class, [R::GET, R::POST]], '/profile' => [ '[/]' => [Module\Settings\Profile\Index::class, [R::GET, R::POST]], diff --git a/view/templates/settings/account.tpl b/view/templates/settings/account.tpl index eb7b9c7dc7..daaa6c178a 100644 --- a/view/templates/settings/account.tpl +++ b/view/templates/settings/account.tpl @@ -178,18 +178,6 @@ -

{{$importcontact}}

-
- - -

{{$importcontact_text}}

-

- -
- -
-
-

{{$relocate}}

diff --git a/view/templates/settings/connectors.tpl b/view/templates/settings/connectors.tpl index 7c92f54b41..a62da74c0d 100644 --- a/view/templates/settings/connectors.tpl +++ b/view/templates/settings/connectors.tpl @@ -25,7 +25,6 @@ {{include file="field_checkbox.tpl" field=$api_spoiler_title}} {{include file="field_checkbox.tpl" field=$api_auto_attach}} {{include file="field_select.tpl" field=$article_mode}} - {{include file="field_input.tpl" field=$legacy_contact}}
diff --git a/view/templates/settings/contactimport.tpl b/view/templates/settings/contactimport.tpl new file mode 100644 index 0000000000..d132b26b25 --- /dev/null +++ b/view/templates/settings/contactimport.tpl @@ -0,0 +1,23 @@ +{{* + * Copyright (C) 2010-2024, the Friendica project + * SPDX-FileCopyrightText: 2010-2024 the Friendica project + * + * SPDX-License-Identifier: AGPL-3.0-or-later + *}} +

{{$title}}

+ +
+ + + + {{include file="field_input.tpl" field=$legacy_contact}} +
+

{{$importcontact_text}}

+

+ +
+ +
+ +
\ No newline at end of file diff --git a/view/theme/frio/templates/settings/account.tpl b/view/theme/frio/templates/settings/account.tpl index 22a77d0226..2a8fd1e1bc 100644 --- a/view/theme/frio/templates/settings/account.tpl +++ b/view/theme/frio/templates/settings/account.tpl @@ -246,28 +246,6 @@
- {{* Import contacts CSV *}} -
- - -
-
-
{{$importcontact_text}}
- - -
- -
-
- {{* The relocate setting section *}}
diff --git a/view/theme/frio/templates/settings/connectors.tpl b/view/theme/frio/templates/settings/connectors.tpl index aa1e0e7dbd..31f5e7b0dd 100644 --- a/view/theme/frio/templates/settings/connectors.tpl +++ b/view/theme/frio/templates/settings/connectors.tpl @@ -39,8 +39,6 @@ {{include file="field_checkbox.tpl" field=$api_auto_attach}} {{include file="field_select.tpl" field=$article_mode}} - - {{include file="field_input.tpl" field=$legacy_contact}}
\ No newline at end of file From 794bfcff1db0d5dac4c08f788c1aae25a2965295 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 21 Dec 2024 08:26:56 +0000 Subject: [PATCH 03/12] Unneeded line removed / improved status handling --- src/Protocol/ATProtocol.php | 32 ++++++++++++++++++++++----- src/Protocol/ATProtocol/Actor.php | 2 +- src/Protocol/ATProtocol/Jetstream.php | 2 +- src/Protocol/ATProtocol/Processor.php | 2 +- 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/src/Protocol/ATProtocol.php b/src/Protocol/ATProtocol.php index c4088624ea..3ab613e4f8 100644 --- a/src/Protocol/ATProtocol.php +++ b/src/Protocol/ATProtocol.php @@ -129,7 +129,17 @@ final class ATProtocol } $data = $this->get($pds . '/xrpc/' . $url, [HttpClientOptions::HEADERS => $headers]); - $this->pConfig->set($uid, 'bluesky', 'status', is_null($data) ? self::STATUS_API_FAIL : self::STATUS_SUCCESS); + if (empty($data) || (!empty($data->code) && ($data->code < 200 || $data->code >= 400))) { + $this->pConfig->set($uid, 'bluesky', 'status', self::STATUS_API_FAIL); + if (!empty($data->message)) { + $this->pConfig->set($uid, 'bluesky', 'status-message', $data->message); + } elseif (!empty($data->code)) { + $this->pConfig->set($uid, 'bluesky', 'status-message', 'Error Code: ' . $data->code); + } + } elseif (!empty($data)) { + $this->pConfig->set($uid, 'bluesky', 'status', self::STATUS_SUCCESS); + $this->pConfig->set($uid, 'bluesky', 'status-message', ''); + } return $data; } @@ -156,6 +166,9 @@ final class ATProtocol return null; } $data->code = $curlResult->getReturnCode(); + } elseif (($curlResult->getReturnCode() < 200) || ($curlResult->getReturnCode() >= 400)) { + $this->logger->notice('Unexpected return code', ['url' => $url, 'code' => $curlResult->getReturnCode(), 'error' => $data ?: $curlResult->getBodyString()]); + $data->code = $curlResult->getReturnCode(); } Item::incrementInbound(Protocol::BLUESKY); @@ -198,6 +211,7 @@ final class ATProtocol } catch (\Exception $e) { $this->logger->notice('Exception on post', ['exception' => $e]); $this->pConfig->set($uid, 'bluesky', 'status', self::STATUS_API_FAIL); + $this->pConfig->set($uid, 'bluesky', 'status-message', $e->getMessage()); return null; } @@ -206,6 +220,11 @@ final class ATProtocol $this->logger->notice('API Error', ['url' => $url, 'code' => $curlResult->getReturnCode(), 'error' => $data ?: $curlResult->getBodyString()]); if (!$data) { $this->pConfig->set($uid, 'bluesky', 'status', self::STATUS_API_FAIL); + if (!empty($data->message)) { + $this->pConfig->set($uid, 'bluesky', 'status-message', $data->message); + } elseif (!empty($data->code)) { + $this->pConfig->set($uid, 'bluesky', 'status-message', 'Error Code: ' . $data->code); + } return null; } $data->code = $curlResult->getReturnCode(); @@ -213,8 +232,14 @@ final class ATProtocol if (!empty($data->code) && ($data->code >= 200) && ($data->code < 400)) { $this->pConfig->set($uid, 'bluesky', 'status', self::STATUS_SUCCESS); + $this->pConfig->set($uid, 'bluesky', 'status-message', ''); } else { $this->pConfig->set($uid, 'bluesky', 'status', self::STATUS_API_FAIL); + if (!empty($data->message)) { + $this->pConfig->set($uid, 'bluesky', 'status-message', $data->message); + } elseif (!empty($data->code)) { + $this->pConfig->set($uid, 'bluesky', 'status-message', 'Error Code: ' . $data->code); + } } return $data; } @@ -502,10 +527,6 @@ final class ATProtocol $data = $this->post($uid, '/xrpc/com.atproto.server.refreshSession', '', ['Authorization' => ['Bearer ' . $token]]); if (empty($data) || empty($data->accessJwt)) { $this->logger->debug('Refresh failed', ['return' => $data]); - $password = $this->pConfig->get($uid, 'bluesky', 'password'); - if (!empty($password)) { - return $this->createUserToken($uid, $password); - } $this->pConfig->set($uid, 'bluesky', 'status', self::STATUS_TOKEN_FAIL); return ''; } @@ -542,6 +563,7 @@ final class ATProtocol $this->pConfig->set($uid, 'bluesky', 'refresh_token', $data->refreshJwt); $this->pConfig->set($uid, 'bluesky', 'token_created', time()); $this->pConfig->set($uid, 'bluesky', 'status', self::STATUS_TOKEN_OK); + $this->pConfig->set($uid, 'bluesky', 'status-message', ''); return $data->accessJwt; } } diff --git a/src/Protocol/ATProtocol/Actor.php b/src/Protocol/ATProtocol/Actor.php index a45bdd2978..882f40eab9 100755 --- a/src/Protocol/ATProtocol/Actor.php +++ b/src/Protocol/ATProtocol/Actor.php @@ -1,5 +1,5 @@ -#!/usr/bin/env php Date: Sat, 21 Dec 2024 15:25:24 +0000 Subject: [PATCH 04/12] Improved check for attached Fediverse posts --- src/Model/Post/Media.php | 18 +++++++++++++++++- src/Util/Network.php | 15 +++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/Model/Post/Media.php b/src/Model/Post/Media.php index fb363dd57a..50710041c0 100644 --- a/src/Model/Post/Media.php +++ b/src/Model/Post/Media.php @@ -24,11 +24,13 @@ use Friendica\Network\HTTPClient\Client\HttpClientAccept; use Friendica\Network\HTTPClient\Client\HttpClientOptions; use Friendica\Network\HTTPClient\Client\HttpClientRequest; use Friendica\Protocol\ActivityPub; +use Friendica\Protocol\ATProtocol; use Friendica\Util\Images; use Friendica\Util\Network; use Friendica\Util\ParseUrl; use Friendica\Util\Proxy; use Friendica\Util\Strings; +use GuzzleHttp\Psr7\Uri; /** * Class Media @@ -237,7 +239,7 @@ class Media $media = self::addAccount($media); } - if (in_array($media['type'], [self::ACTIVITY, self::LD, self::JSON])) { + if (in_array($media['type'], [self::ACTIVITY, self::LD, self::JSON]) || self::isFederatedServer($media['url'])) { $media = self::addActivity($media); } @@ -248,6 +250,20 @@ class Media return $media; } + private static function isFederatedServer(string $url): bool + { + $baseurl = Network::getBaseUrl(new Uri($url)); + if (empty($baseurl)) { + return false; + } + + if (Strings::compareLink($baseurl, ATProtocol::WEB)) { + return true; + } + + return DBA::exists('gserver', ['nurl' => Strings::normaliseLink($baseurl), 'network' => Protocol::FEDERATED]); + } + private static function addPreviewData(array $media): array { if (!empty($media['preview-width']) && !empty($media['preview-height'])) { diff --git a/src/Util/Network.php b/src/Util/Network.php index a7e2fa536a..60f4bbab23 100644 --- a/src/Util/Network.php +++ b/src/Util/Network.php @@ -682,4 +682,19 @@ class Network return (string)Uri::fromParts($parts); } + + /** + * Get base url without a path, fragment or query + * + * @param UriInterface $uri + * @return string baseurl + */ + public static function getBaseUrl(UriInterface $uri): string + { + return $uri + ->withUserInfo('') + ->withQuery('') + ->withFragment('') + ->withPath(''); + } } From 322b24ea05c832d0f9f992b963f93f54fc685749 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 21 Dec 2024 21:46:23 +0000 Subject: [PATCH 05/12] Issue 14609: Avoid endless worker repetition in case of an execution error --- src/Core/Worker.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/Core/Worker.php b/src/Core/Worker.php index 8a8270bdb9..e9a91b973c 100644 --- a/src/Core/Worker.php +++ b/src/Core/Worker.php @@ -558,15 +558,17 @@ class Worker if ($method_call) { try { call_user_func_array(sprintf('Friendica\Worker\%s::execute', $funcname), $argv); - } catch (\TypeError $e) { - // No need to defer a worker queue entry if the arguments are invalid - Logger::notice('Wrong worker arguments', ['class' => $funcname, 'argv' => $argv, 'queue' => $queue, 'message' => $e->getMessage()]); } catch (\Throwable $e) { - Logger::error('Uncaught exception in worker execution', ['class' => get_class($e), 'message' => $e->getMessage(), 'code' => $e->getCode(), 'file' => $e->getFile() . ':' . $e->getLine(), 'trace' => $e->getTraceAsString(), 'previous' => $e->getPrevious()]); + Logger::error('Uncaught exception in worker method execution', ['class' => get_class($e), 'message' => $e->getMessage(), 'code' => $e->getCode(), 'file' => $e->getFile() . ':' . $e->getLine(), 'trace' => $e->getTraceAsString(), 'previous' => $e->getPrevious()]); Worker::defer(); } } else { - $funcname($argv, count($argv)); + try { + $funcname($argv, count($argv)); + } catch (\Throwable $e) { + Logger::error('Uncaught exception in worker execution', ['message' => $e->getMessage(), 'code' => $e->getCode(), 'file' => $e->getFile() . ':' . $e->getLine(), 'trace' => $e->getTraceAsString(), 'previous' => $e->getPrevious()]); + Worker::defer(); + } } Logger::disableWorker(); From 2ea1576f0f46ebbd36dfaf93185617cfaf3eeb90 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 22 Dec 2024 08:37:49 +0100 Subject: [PATCH 06/12] [CI] Fix codecov --- .woodpecker/.phpunit.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.woodpecker/.phpunit.yml b/.woodpecker/.phpunit.yml index 86abe6326d..4998d5ff1f 100644 --- a/.woodpecker/.phpunit.yml +++ b/.woodpecker/.phpunit.yml @@ -86,9 +86,9 @@ steps: - friendica/friendica commands: - codecov -R '.' -Z -f 'clover.xml' - secrets: - - source: codecov-token - target: codecov_token + environment: + codecov_token: + from_secret: codecov-token services: mariadb: From cf59c64489c00b248f867a5d44288c6d312c8728 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 22 Dec 2024 08:45:30 +0100 Subject: [PATCH 07/12] Update messages.po --- view/lang/C/messages.po | 671 ++++++++++++++++++++-------------------- 1 file changed, 337 insertions(+), 334 deletions(-) diff --git a/view/lang/C/messages.po b/view/lang/C/messages.po index 33e225886a..abb5d717c5 100644 --- a/view/lang/C/messages.po +++ b/view/lang/C/messages.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: 2024.09-rc\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-15 06:54+0000\n" +"POT-Creation-Date: 2024-12-22 07:45+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -65,8 +65,10 @@ msgstr "" #: src/Module/Profile/Schedule.php:42 src/Module/Register.php:70 #: src/Module/Register.php:83 src/Module/Register.php:199 #: src/Module/Register.php:238 src/Module/Search/Directory.php:23 -#: src/Module/Settings/Account.php:36 src/Module/Settings/Account.php:377 +#: src/Module/Settings/Account.php:34 src/Module/Settings/Account.php:339 #: src/Module/Settings/Channels.php:52 src/Module/Settings/Channels.php:127 +#: src/Module/Settings/ContactImport.php:49 +#: src/Module/Settings/ContactImport.php:96 #: src/Module/Settings/Delegation.php:76 src/Module/Settings/Display.php:77 #: src/Module/Settings/Display.php:191 #: src/Module/Settings/Profile/Photo/Crop.php:151 @@ -283,7 +285,7 @@ msgstr "" #: mod/message.php:188 mod/message.php:344 mod/photos.php:1255 #: src/Content/Conversation.php:386 src/Content/Conversation.php:1562 #: src/Module/Item/Compose.php:199 src/Module/Post/Edit.php:131 -#: src/Object/Post.php:604 +#: src/Object/Post.php:605 msgid "Please wait" msgstr "" @@ -305,7 +307,7 @@ msgstr "" #: src/Module/Moderation/Report/Create.php:249 #: src/Module/Profile/Profile.php:262 src/Module/Settings/Profile/Index.php:248 #: src/Module/Settings/Server/Action.php:65 src/Module/User/Delegation.php:175 -#: src/Object/Post.php:1145 view/theme/duepuntozero/config.php:73 +#: src/Object/Post.php:1146 view/theme/duepuntozero/config.php:73 #: view/theme/frio/config.php:155 view/theme/quattro/config.php:75 #: view/theme/vier/config.php:123 msgid "Submit" @@ -588,30 +590,30 @@ msgstr "" #: mod/photos.php:1093 mod/photos.php:1149 mod/photos.php:1229 #: src/Module/Contact.php:600 src/Module/Item/Compose.php:181 -#: src/Object/Post.php:1142 +#: src/Object/Post.php:1143 msgid "This is you" msgstr "" #: mod/photos.php:1095 mod/photos.php:1151 mod/photos.php:1231 -#: src/Module/Moderation/Reports.php:102 src/Object/Post.php:598 -#: src/Object/Post.php:1144 +#: src/Module/Moderation/Reports.php:102 src/Object/Post.php:599 +#: src/Object/Post.php:1145 msgid "Comment" msgstr "" #: mod/photos.php:1097 mod/photos.php:1153 mod/photos.php:1233 #: src/Content/Conversation.php:400 src/Module/Calendar/Event/Form.php:234 #: src/Module/Item/Compose.php:194 src/Module/Post/Edit.php:151 -#: src/Object/Post.php:1158 +#: src/Object/Post.php:1159 msgid "Preview" msgstr "" #: mod/photos.php:1098 src/Content/Conversation.php:354 -#: src/Module/Post/Edit.php:116 src/Object/Post.php:1146 +#: src/Module/Post/Edit.php:116 src/Object/Post.php:1147 msgid "Loading..." msgstr "" #: mod/photos.php:1190 src/Content/Conversation.php:1484 -#: src/Object/Post.php:260 +#: src/Object/Post.php:261 msgid "Select" msgstr "" @@ -619,24 +621,24 @@ msgstr "" #: src/Module/Moderation/Users/Active.php:122 #: src/Module/Moderation/Users/Blocked.php:122 #: src/Module/Moderation/Users/Index.php:137 -#: src/Module/Settings/Connectors.php:233 +#: src/Module/Settings/Connectors.php:226 #: src/Module/Settings/Server/Index.php:95 msgid "Delete" msgstr "" -#: mod/photos.php:1252 src/Object/Post.php:426 +#: mod/photos.php:1252 src/Object/Post.php:427 msgid "Like" msgstr "" -#: mod/photos.php:1253 src/Object/Post.php:426 +#: mod/photos.php:1253 src/Object/Post.php:427 msgid "I like this (toggle)" msgstr "" -#: mod/photos.php:1254 src/Object/Post.php:427 +#: mod/photos.php:1254 src/Object/Post.php:428 msgid "Dislike" msgstr "" -#: mod/photos.php:1256 src/Object/Post.php:427 +#: mod/photos.php:1256 src/Object/Post.php:428 msgid "I don't like this (toggle)" msgstr "" @@ -956,12 +958,12 @@ msgid "Enter new password: " msgstr "" #: src/Console/User.php:196 src/Module/Security/PasswordTooLong.php:55 -#: src/Module/Settings/Account.php:61 +#: src/Module/Settings/Account.php:59 msgid "Password update failed. Please try again." msgstr "" #: src/Console/User.php:199 src/Module/Security/PasswordTooLong.php:58 -#: src/Module/Settings/Account.php:64 +#: src/Module/Settings/Account.php:62 msgid "Password changed." msgstr "" @@ -1228,7 +1230,7 @@ msgid "Visible to everybody" msgstr "" #: src/Content/Conversation.php:324 src/Module/Item/Compose.php:193 -#: src/Object/Post.php:1157 +#: src/Object/Post.php:1158 msgid "Please enter a image/video/audio/webpage URL:" msgstr "" @@ -1273,52 +1275,52 @@ msgid "attach file" msgstr "" #: src/Content/Conversation.php:359 src/Module/Item/Compose.php:183 -#: src/Module/Post/Edit.php:157 src/Object/Post.php:1147 +#: src/Module/Post/Edit.php:157 src/Object/Post.php:1148 msgid "Bold" msgstr "" #: src/Content/Conversation.php:360 src/Module/Item/Compose.php:184 -#: src/Module/Post/Edit.php:158 src/Object/Post.php:1148 +#: src/Module/Post/Edit.php:158 src/Object/Post.php:1149 msgid "Italic" msgstr "" #: src/Content/Conversation.php:361 src/Module/Item/Compose.php:185 -#: src/Module/Post/Edit.php:159 src/Object/Post.php:1149 +#: src/Module/Post/Edit.php:159 src/Object/Post.php:1150 msgid "Underline" msgstr "" #: src/Content/Conversation.php:362 src/Module/Item/Compose.php:186 -#: src/Module/Post/Edit.php:160 src/Object/Post.php:1151 +#: src/Module/Post/Edit.php:160 src/Object/Post.php:1152 msgid "Quote" msgstr "" #: src/Content/Conversation.php:363 src/Module/Item/Compose.php:187 -#: src/Module/Post/Edit.php:161 src/Object/Post.php:1152 +#: src/Module/Post/Edit.php:161 src/Object/Post.php:1153 msgid "Add emojis" msgstr "" #: src/Content/Conversation.php:364 src/Module/Item/Compose.php:188 -#: src/Object/Post.php:1150 +#: src/Object/Post.php:1151 msgid "Content Warning" msgstr "" #: src/Content/Conversation.php:365 src/Module/Item/Compose.php:189 -#: src/Module/Post/Edit.php:162 src/Object/Post.php:1153 +#: src/Module/Post/Edit.php:162 src/Object/Post.php:1154 msgid "Code" msgstr "" #: src/Content/Conversation.php:366 src/Module/Item/Compose.php:190 -#: src/Object/Post.php:1154 +#: src/Object/Post.php:1155 msgid "Image" msgstr "" #: src/Content/Conversation.php:367 src/Module/Item/Compose.php:191 -#: src/Module/Post/Edit.php:163 src/Object/Post.php:1155 +#: src/Module/Post/Edit.php:163 src/Object/Post.php:1156 msgid "Link" msgstr "" #: src/Content/Conversation.php:368 src/Module/Item/Compose.php:192 -#: src/Module/Post/Edit.php:164 src/Object/Post.php:1156 +#: src/Module/Post/Edit.php:164 src/Object/Post.php:1157 msgid "Link or Media" msgstr "" @@ -1474,25 +1476,25 @@ msgstr "" msgid "Pushed to us" msgstr "" -#: src/Content/Conversation.php:1504 src/Object/Post.php:247 +#: src/Content/Conversation.php:1504 src/Object/Post.php:248 msgid "Pinned item" msgstr "" -#: src/Content/Conversation.php:1521 src/Object/Post.php:541 -#: src/Object/Post.php:542 +#: src/Content/Conversation.php:1521 src/Object/Post.php:542 +#: src/Object/Post.php:543 #, php-format msgid "View %s's profile @ %s" msgstr "" -#: src/Content/Conversation.php:1535 src/Object/Post.php:529 +#: src/Content/Conversation.php:1535 src/Object/Post.php:530 msgid "Categories:" msgstr "" -#: src/Content/Conversation.php:1536 src/Object/Post.php:530 +#: src/Content/Conversation.php:1536 src/Object/Post.php:531 msgid "Filed under:" msgstr "" -#: src/Content/Conversation.php:1544 src/Object/Post.php:556 +#: src/Content/Conversation.php:1544 src/Object/Post.php:557 #, php-format msgid "%s from %s" msgstr "" @@ -1630,7 +1632,7 @@ msgstr "" msgid "Posts that mention or involve you" msgstr "" -#: src/Content/Conversation/Factory/Network.php:28 src/Object/Post.php:397 +#: src/Content/Conversation/Factory/Network.php:28 src/Object/Post.php:398 msgid "Starred" msgstr "" @@ -1731,7 +1733,7 @@ msgid "Display posts with the selected protocols." msgstr "" #: src/Content/Feature.php:119 src/Content/Widget.php:558 -#: src/Module/Settings/Account.php:433 +#: src/Module/Settings/Account.php:395 msgid "Account Types" msgstr "" @@ -1830,7 +1832,7 @@ msgstr "" msgid "Create new group" msgstr "" -#: src/Content/Item.php:317 src/Model/Item.php:3273 +#: src/Content/Item.php:317 src/Model/Item.php:3279 msgid "event" msgstr "" @@ -1838,7 +1840,7 @@ msgstr "" msgid "status" msgstr "" -#: src/Content/Item.php:326 src/Model/Item.php:3275 +#: src/Content/Item.php:326 src/Model/Item.php:3281 #: src/Module/Post/Tag/Add.php:109 msgid "photo" msgstr "" @@ -1901,17 +1903,17 @@ msgstr "" msgid "Collapse" msgstr "" -#: src/Content/Item.php:424 src/Object/Post.php:288 +#: src/Content/Item.php:424 src/Object/Post.php:289 #, php-format msgid "Ignore %s server" msgstr "" #: src/Content/Item.php:428 src/Module/Settings/Channels.php:188 -#: src/Module/Settings/Channels.php:209 src/Object/Post.php:502 +#: src/Module/Settings/Channels.php:209 src/Object/Post.php:503 msgid "Languages" msgstr "" -#: src/Content/Item.php:431 src/Object/Post.php:582 +#: src/Content/Item.php:431 src/Object/Post.php:583 msgid "Search Text" msgstr "" @@ -2143,7 +2145,7 @@ msgstr "" msgid "See all notifications" msgstr "" -#: src/Content/Nav.php:301 src/Module/Settings/Connectors.php:233 +#: src/Content/Nav.php:301 src/Module/Settings/Connectors.php:226 msgid "Mark as seen" msgstr "" @@ -2172,7 +2174,7 @@ msgid "Manage other pages" msgstr "" #: src/Content/Nav.php:313 src/Module/Admin/Addons/Details.php:100 -#: src/Module/Admin/Themes/Details.php:85 src/Module/BaseSettings.php:168 +#: src/Module/Admin/Themes/Details.php:85 src/Module/BaseSettings.php:175 #: src/Module/Welcome.php:38 view/theme/frio/theme.php:233 msgid "Settings" msgstr "" @@ -2240,8 +2242,8 @@ msgstr "" msgid "%2$s %3$s" msgstr "" -#: src/Content/Text/BBCode.php:931 src/Model/Item.php:4069 -#: src/Model/Item.php:4075 src/Model/Item.php:4076 +#: src/Content/Text/BBCode.php:931 src/Model/Item.php:4075 +#: src/Model/Item.php:4081 src/Model/Item.php:4082 msgid "Link to source" msgstr "" @@ -2829,7 +2831,7 @@ msgstr "" msgid "Could not connect to database." msgstr "" -#: src/Core/L10n.php:430 src/Model/Item.php:2316 +#: src/Core/L10n.php:430 src/Model/Item.php:2322 msgid "Undetermined" msgstr "" @@ -3371,92 +3373,92 @@ msgstr "" msgid "Happy Birthday %s" msgstr "" -#: src/Model/Item.php:2323 +#: src/Model/Item.php:2329 #, php-format msgid "%s (%s - %s): %s" msgstr "" -#: src/Model/Item.php:2325 +#: src/Model/Item.php:2331 #, php-format msgid "%s (%s): %s" msgstr "" -#: src/Model/Item.php:2328 +#: src/Model/Item.php:2334 #, php-format msgid "" "Detected languages in this post:\n" "%s" msgstr "" -#: src/Model/Item.php:3277 +#: src/Model/Item.php:3283 msgid "activity" msgstr "" -#: src/Model/Item.php:3279 +#: src/Model/Item.php:3285 msgid "comment" msgstr "" -#: src/Model/Item.php:3282 src/Module/Post/Tag/Add.php:109 +#: src/Model/Item.php:3288 src/Module/Post/Tag/Add.php:109 msgid "post" msgstr "" -#: src/Model/Item.php:3452 +#: src/Model/Item.php:3458 #, php-format msgid "%s is blocked" msgstr "" -#: src/Model/Item.php:3454 +#: src/Model/Item.php:3460 #, php-format msgid "%s is ignored" msgstr "" -#: src/Model/Item.php:3456 +#: src/Model/Item.php:3462 #, php-format msgid "Content from %s is collapsed" msgstr "" -#: src/Model/Item.php:3460 +#: src/Model/Item.php:3466 msgid "Sensitive content" msgstr "" -#: src/Model/Item.php:3969 +#: src/Model/Item.php:3975 msgid "bytes" msgstr "" -#: src/Model/Item.php:4000 +#: src/Model/Item.php:4006 #, php-format msgid "%2$s (%3$d%%, %1$d vote)" msgid_plural "%2$s (%3$d%%, %1$d votes)" msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:4002 +#: src/Model/Item.php:4008 #, php-format msgid "%2$s (%1$d vote)" msgid_plural "%2$s (%1$d votes)" msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:4007 +#: src/Model/Item.php:4013 #, php-format msgid "%d voter. Poll end: %s" msgid_plural "%d voters. Poll end: %s" msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:4009 +#: src/Model/Item.php:4015 #, php-format msgid "%d voter." msgid_plural "%d voters." msgstr[0] "" msgstr[1] "" -#: src/Model/Item.php:4011 +#: src/Model/Item.php:4017 #, php-format msgid "Poll end: %s" msgstr "" -#: src/Model/Item.php:4052 src/Model/Item.php:4053 +#: src/Model/Item.php:4058 src/Model/Item.php:4059 msgid "View on separate page" msgstr "" @@ -3464,7 +3466,7 @@ msgstr "" msgid "[no subject]" msgstr "" -#: src/Model/Photo.php:1194 src/Module/Media/Photo/Upload.php:154 +#: src/Model/Photo.php:1195 src/Module/Media/Photo/Upload.php:154 msgid "Wall Photos" msgstr "" @@ -3920,9 +3922,10 @@ msgstr "" #: src/Module/Admin/Addons/Index.php:61 src/Module/Admin/Features.php:69 #: src/Module/Admin/Logs/Settings.php:76 src/Module/Admin/Site.php:450 #: src/Module/Admin/Themes/Index.php:105 src/Module/Admin/Tos.php:72 -#: src/Module/Settings/Account.php:549 src/Module/Settings/Addons.php:64 -#: src/Module/Settings/Connectors.php:149 -#: src/Module/Settings/Connectors.php:235 +#: src/Module/Settings/Account.php:511 src/Module/Settings/Addons.php:64 +#: src/Module/Settings/Connectors.php:143 +#: src/Module/Settings/Connectors.php:228 +#: src/Module/Settings/ContactImport.php:110 #: src/Module/Settings/Delegation.php:179 src/Module/Settings/Display.php:314 #: src/Module/Settings/Features.php:61 msgid "Save Settings" @@ -5763,7 +5766,7 @@ msgstr "" msgid "Display" msgstr "" -#: src/Module/BaseSettings.php:118 src/Module/Settings/Connectors.php:195 +#: src/Module/BaseSettings.php:118 src/Module/Settings/Connectors.php:189 msgid "Social Networks" msgstr "" @@ -5779,11 +5782,15 @@ msgstr "" msgid "Remote servers" msgstr "" -#: src/Module/BaseSettings.php:153 src/Module/Settings/UserExport.php:84 +#: src/Module/BaseSettings.php:153 src/Module/Settings/ContactImport.php:109 +msgid "Import Contacts" +msgstr "" + +#: src/Module/BaseSettings.php:160 src/Module/Settings/UserExport.php:84 msgid "Export personal data" msgstr "" -#: src/Module/BaseSettings.php:160 +#: src/Module/BaseSettings.php:167 msgid "Remove account" msgstr "" @@ -6039,7 +6046,7 @@ msgid "Only show blocked contacts" msgstr "" #: src/Module/Contact.php:349 src/Module/Contact.php:421 -#: src/Module/Settings/Server/Index.php:93 src/Object/Post.php:385 +#: src/Module/Settings/Server/Index.php:93 src/Object/Post.php:386 msgid "Ignored" msgstr "" @@ -7441,23 +7448,23 @@ msgstr "" msgid "List of pending user deletions" msgstr "" -#: src/Module/Moderation/BaseUsers.php:108 src/Module/Settings/Account.php:473 +#: src/Module/Moderation/BaseUsers.php:108 src/Module/Settings/Account.php:435 msgid "Normal Account Page" msgstr "" -#: src/Module/Moderation/BaseUsers.php:109 src/Module/Settings/Account.php:480 +#: src/Module/Moderation/BaseUsers.php:109 src/Module/Settings/Account.php:442 msgid "Soapbox Page" msgstr "" -#: src/Module/Moderation/BaseUsers.php:110 src/Module/Settings/Account.php:487 +#: src/Module/Moderation/BaseUsers.php:110 src/Module/Settings/Account.php:449 msgid "Public Group" msgstr "" -#: src/Module/Moderation/BaseUsers.php:111 src/Module/Settings/Account.php:494 +#: src/Module/Moderation/BaseUsers.php:111 src/Module/Settings/Account.php:456 msgid "Public Group - Restricted" msgstr "" -#: src/Module/Moderation/BaseUsers.php:112 src/Module/Settings/Account.php:501 +#: src/Module/Moderation/BaseUsers.php:112 src/Module/Settings/Account.php:463 msgid "Automatic Friend Page" msgstr "" @@ -7466,22 +7473,22 @@ msgid "Private Group" msgstr "" #: src/Module/Moderation/BaseUsers.php:116 src/Module/Moderation/Summary.php:39 -#: src/Module/Settings/Account.php:444 +#: src/Module/Settings/Account.php:406 msgid "Personal Page" msgstr "" #: src/Module/Moderation/BaseUsers.php:117 src/Module/Moderation/Summary.php:40 -#: src/Module/Settings/Account.php:451 +#: src/Module/Settings/Account.php:413 msgid "Organisation Page" msgstr "" #: src/Module/Moderation/BaseUsers.php:118 src/Module/Moderation/Summary.php:41 -#: src/Module/Settings/Account.php:458 +#: src/Module/Settings/Account.php:420 msgid "News Page" msgstr "" #: src/Module/Moderation/BaseUsers.php:119 src/Module/Moderation/Summary.php:42 -#: src/Module/Settings/Account.php:465 +#: src/Module/Settings/Account.php:427 msgid "Community Group" msgstr "" @@ -8059,7 +8066,7 @@ msgstr[1] "" msgid "URL of the reported contact." msgstr "" -#: src/Module/Moderation/Summary.php:43 src/Module/Settings/Account.php:422 +#: src/Module/Moderation/Summary.php:43 src/Module/Settings/Account.php:384 msgid "Channel Relay" msgstr "" @@ -8433,7 +8440,7 @@ msgstr "" msgid "Keep this window open until done." msgstr "" -#: src/Module/OpenSearch.php:57 +#: src/Module/OpenSearch.php:54 #, php-format msgid "Search in Friendica %s" msgstr "" @@ -8764,7 +8771,7 @@ msgid "Please repeat your e-mail address:" msgstr "" #: src/Module/Register.php:155 src/Module/Security/PasswordTooLong.php:86 -#: src/Module/Settings/Account.php:555 +#: src/Module/Settings/Account.php:517 msgid "New Password:" msgstr "" @@ -8773,7 +8780,7 @@ msgid "Leave empty for an auto generated password." msgstr "" #: src/Module/Register.php:156 src/Module/Security/PasswordTooLong.php:87 -#: src/Module/Settings/Account.php:556 +#: src/Module/Settings/Account.php:518 msgid "Confirm:" msgstr "" @@ -8958,7 +8965,7 @@ msgid "Account not found. Please register a new account or login to your existin msgstr "" #: src/Module/Security/PasswordTooLong.php:43 -#: src/Module/Settings/Account.php:53 +#: src/Module/Settings/Account.php:51 msgid "Passwords do not match." msgstr "" @@ -8967,7 +8974,7 @@ msgid "Password does not need changing." msgstr "" #: src/Module/Security/PasswordTooLong.php:63 -#: src/Module/Settings/Account.php:67 +#: src/Module/Settings/Account.php:65 msgid "Password unchanged." msgstr "" @@ -8984,22 +8991,22 @@ msgid "Update Password" msgstr "" #: src/Module/Security/PasswordTooLong.php:85 -#: src/Module/Settings/Account.php:557 +#: src/Module/Settings/Account.php:519 msgid "Current Password:" msgstr "" #: src/Module/Security/PasswordTooLong.php:85 -#: src/Module/Settings/Account.php:557 +#: src/Module/Settings/Account.php:519 msgid "Your current password to confirm the changes" msgstr "" #: src/Module/Security/PasswordTooLong.php:86 -#: src/Module/Settings/Account.php:541 +#: src/Module/Settings/Account.php:503 msgid "Allowed characters are a-z, A-Z, 0-9 and special characters except white spaces and accentuated letters." msgstr "" #: src/Module/Security/PasswordTooLong.php:86 -#: src/Module/Settings/Account.php:542 +#: src/Module/Settings/Account.php:504 msgid "Password length is limited to 72 characters." msgstr "" @@ -9093,445 +9100,425 @@ msgstr "" msgid "Verify code and complete login" msgstr "" -#: src/Module/Settings/Account.php:82 +#: src/Module/Settings/Account.php:80 msgid "Please use a shorter name." msgstr "" -#: src/Module/Settings/Account.php:85 +#: src/Module/Settings/Account.php:83 msgid "Name too short." msgstr "" -#: src/Module/Settings/Account.php:94 +#: src/Module/Settings/Account.php:92 msgid "Wrong Password." msgstr "" -#: src/Module/Settings/Account.php:99 +#: src/Module/Settings/Account.php:97 msgid "Invalid email." msgstr "" -#: src/Module/Settings/Account.php:103 +#: src/Module/Settings/Account.php:101 msgid "Cannot change to that email." msgstr "" -#: src/Module/Settings/Account.php:132 src/Module/Settings/Account.php:181 -#: src/Module/Settings/Account.php:202 src/Module/Settings/Account.php:286 -#: src/Module/Settings/Account.php:315 +#: src/Module/Settings/Account.php:130 src/Module/Settings/Account.php:179 +#: src/Module/Settings/Account.php:200 src/Module/Settings/Account.php:284 +#: src/Module/Settings/Account.php:313 msgid "Settings were not updated." msgstr "" -#: src/Module/Settings/Account.php:333 -msgid "Contact CSV file upload error" -msgstr "" - -#: src/Module/Settings/Account.php:352 -msgid "Importing Contacts done" -msgstr "" - -#: src/Module/Settings/Account.php:365 +#: src/Module/Settings/Account.php:327 msgid "Relocate message has been send to your contacts" msgstr "" -#: src/Module/Settings/Account.php:382 +#: src/Module/Settings/Account.php:344 msgid "Unable to find your profile. Please contact your admin." msgstr "" -#: src/Module/Settings/Account.php:424 +#: src/Module/Settings/Account.php:386 msgid "Account for a service that automatically shares content based on user defined channels." msgstr "" -#: src/Module/Settings/Account.php:434 +#: src/Module/Settings/Account.php:396 msgid "Personal Page Subtypes" msgstr "" -#: src/Module/Settings/Account.php:435 +#: src/Module/Settings/Account.php:397 msgid "Community Group Subtypes" msgstr "" -#: src/Module/Settings/Account.php:446 +#: src/Module/Settings/Account.php:408 msgid "Account for a personal profile." msgstr "" -#: src/Module/Settings/Account.php:453 +#: src/Module/Settings/Account.php:415 msgid "Account for an organisation that automatically approves contact requests as \"Followers\"." msgstr "" -#: src/Module/Settings/Account.php:460 +#: src/Module/Settings/Account.php:422 msgid "Account for a news reflector that automatically approves contact requests as \"Followers\"." msgstr "" -#: src/Module/Settings/Account.php:467 +#: src/Module/Settings/Account.php:429 msgid "Account for community discussions." msgstr "" -#: src/Module/Settings/Account.php:475 +#: src/Module/Settings/Account.php:437 msgid "Account for a regular personal profile that requires manual approval of \"Friends\" and \"Followers\"." msgstr "" -#: src/Module/Settings/Account.php:482 +#: src/Module/Settings/Account.php:444 msgid "Account for a public profile that automatically approves contact requests as \"Followers\"." msgstr "" -#: src/Module/Settings/Account.php:489 +#: src/Module/Settings/Account.php:451 msgid "Automatically approves all contact requests." msgstr "" -#: src/Module/Settings/Account.php:496 +#: src/Module/Settings/Account.php:458 msgid "Contact requests have to be manually approved." msgstr "" -#: src/Module/Settings/Account.php:503 +#: src/Module/Settings/Account.php:465 msgid "Account for a popular profile that automatically approves contact requests as \"Friends\"." msgstr "" -#: src/Module/Settings/Account.php:508 +#: src/Module/Settings/Account.php:470 msgid "Private Group [Experimental]" msgstr "" -#: src/Module/Settings/Account.php:510 +#: src/Module/Settings/Account.php:472 msgid "Requires manual approval of contact requests." msgstr "" -#: src/Module/Settings/Account.php:519 +#: src/Module/Settings/Account.php:481 msgid "OpenID:" msgstr "" -#: src/Module/Settings/Account.php:519 +#: src/Module/Settings/Account.php:481 msgid "(Optional) Allow this OpenID to login to this account." msgstr "" -#: src/Module/Settings/Account.php:527 +#: src/Module/Settings/Account.php:489 msgid "Publish your profile in your local site directory?" msgstr "" -#: src/Module/Settings/Account.php:527 +#: src/Module/Settings/Account.php:489 #, php-format msgid "Your profile will be published in this node's local directory. Your profile details may be publicly visible depending on the system settings." msgstr "" -#: src/Module/Settings/Account.php:533 +#: src/Module/Settings/Account.php:495 #, php-format msgid "Your profile will also be published in the global friendica directories (e.g. %s)." msgstr "" -#: src/Module/Settings/Account.php:546 +#: src/Module/Settings/Account.php:508 msgid "Account Settings" msgstr "" -#: src/Module/Settings/Account.php:547 +#: src/Module/Settings/Account.php:509 #, php-format msgid "Your Identity Address is '%s' or '%s'." msgstr "" -#: src/Module/Settings/Account.php:554 +#: src/Module/Settings/Account.php:516 msgid "Password Settings" msgstr "" -#: src/Module/Settings/Account.php:556 +#: src/Module/Settings/Account.php:518 msgid "Leave password fields blank unless changing" msgstr "" -#: src/Module/Settings/Account.php:558 +#: src/Module/Settings/Account.php:520 msgid "Password:" msgstr "" -#: src/Module/Settings/Account.php:558 +#: src/Module/Settings/Account.php:520 msgid "Your current password to confirm the changes of the email address" msgstr "" -#: src/Module/Settings/Account.php:561 +#: src/Module/Settings/Account.php:523 msgid "Delete OpenID URL" msgstr "" -#: src/Module/Settings/Account.php:563 +#: src/Module/Settings/Account.php:525 msgid "Basic Settings" msgstr "" -#: src/Module/Settings/Account.php:564 +#: src/Module/Settings/Account.php:526 #: src/Module/Settings/Profile/Index.php:274 msgid "Display name:" msgstr "" -#: src/Module/Settings/Account.php:565 +#: src/Module/Settings/Account.php:527 msgid "Email Address:" msgstr "" -#: src/Module/Settings/Account.php:566 +#: src/Module/Settings/Account.php:528 msgid "Your Timezone:" msgstr "" -#: src/Module/Settings/Account.php:567 +#: src/Module/Settings/Account.php:529 msgid "Your Language:" msgstr "" -#: src/Module/Settings/Account.php:567 +#: src/Module/Settings/Account.php:529 msgid "Set the language we use to show you friendica interface and to send you emails" msgstr "" -#: src/Module/Settings/Account.php:568 +#: src/Module/Settings/Account.php:530 msgid "Default Post Location:" msgstr "" -#: src/Module/Settings/Account.php:569 +#: src/Module/Settings/Account.php:531 msgid "Use Browser Location:" msgstr "" -#: src/Module/Settings/Account.php:571 +#: src/Module/Settings/Account.php:533 msgid "Security and Privacy Settings" msgstr "" -#: src/Module/Settings/Account.php:573 +#: src/Module/Settings/Account.php:535 msgid "Maximum Friend Requests/Day:" msgstr "" -#: src/Module/Settings/Account.php:573 +#: src/Module/Settings/Account.php:535 msgid "(to prevent spam abuse)" msgstr "" -#: src/Module/Settings/Account.php:575 +#: src/Module/Settings/Account.php:537 msgid "Allow your profile to be searchable globally?" msgstr "" -#: src/Module/Settings/Account.php:575 +#: src/Module/Settings/Account.php:537 msgid "Activate this setting if you want others to easily find and follow you. Your profile will be searchable on remote systems. This setting also determines whether Friendica will inform search engines that your profile should be indexed or not." msgstr "" -#: src/Module/Settings/Account.php:576 +#: src/Module/Settings/Account.php:538 msgid "Hide your contact/friend list from viewers of your profile?" msgstr "" -#: src/Module/Settings/Account.php:576 +#: src/Module/Settings/Account.php:538 msgid "A list of your contacts is displayed on your profile page. Activate this option to disable the display of your contact list." msgstr "" -#: src/Module/Settings/Account.php:577 +#: src/Module/Settings/Account.php:539 msgid "Hide your public content from anonymous viewers" msgstr "" -#: src/Module/Settings/Account.php:577 +#: src/Module/Settings/Account.php:539 msgid "Anonymous visitors will only see your basic profile details. Your public posts and replies will still be freely accessible on the remote servers of your followers and through relays." msgstr "" -#: src/Module/Settings/Account.php:578 +#: src/Module/Settings/Account.php:540 msgid "Make public posts unlisted" msgstr "" -#: src/Module/Settings/Account.php:578 +#: src/Module/Settings/Account.php:540 msgid "Your public posts will not appear on the community pages or in search results, nor be sent to relay servers. However they can still appear on public feeds on remote servers." msgstr "" -#: src/Module/Settings/Account.php:579 +#: src/Module/Settings/Account.php:541 msgid "Make all posted pictures accessible" msgstr "" -#: src/Module/Settings/Account.php:579 +#: src/Module/Settings/Account.php:541 msgid "This option makes every posted picture accessible via the direct link. This is a workaround for the problem that most other networks can't handle permissions on pictures. Non public pictures still won't be visible for the public on your photo albums though." msgstr "" -#: src/Module/Settings/Account.php:580 +#: src/Module/Settings/Account.php:542 msgid "Allow friends to post to your profile page?" msgstr "" -#: src/Module/Settings/Account.php:580 +#: src/Module/Settings/Account.php:542 msgid "Your contacts may write posts on your profile wall. These posts will be distributed to your contacts" msgstr "" -#: src/Module/Settings/Account.php:581 +#: src/Module/Settings/Account.php:543 msgid "Allow friends to tag your posts?" msgstr "" -#: src/Module/Settings/Account.php:581 +#: src/Module/Settings/Account.php:543 msgid "Your contacts can add additional tags to your posts." msgstr "" -#: src/Module/Settings/Account.php:582 +#: src/Module/Settings/Account.php:544 msgid "Default privacy circle for new contacts" msgstr "" -#: src/Module/Settings/Account.php:583 +#: src/Module/Settings/Account.php:545 msgid "Default privacy circle for new group contacts" msgstr "" -#: src/Module/Settings/Account.php:584 +#: src/Module/Settings/Account.php:546 msgid "Default Post Permissions" msgstr "" -#: src/Module/Settings/Account.php:588 +#: src/Module/Settings/Account.php:550 msgid "Expiration settings" msgstr "" -#: src/Module/Settings/Account.php:589 +#: src/Module/Settings/Account.php:551 msgid "Automatically expire posts after this many days:" msgstr "" -#: src/Module/Settings/Account.php:589 +#: src/Module/Settings/Account.php:551 msgid "If empty, posts will not expire. Expired posts will be deleted" msgstr "" -#: src/Module/Settings/Account.php:590 +#: src/Module/Settings/Account.php:552 msgid "Expire posts" msgstr "" -#: src/Module/Settings/Account.php:590 +#: src/Module/Settings/Account.php:552 msgid "When activated, posts and comments will be expired." msgstr "" -#: src/Module/Settings/Account.php:591 +#: src/Module/Settings/Account.php:553 msgid "Expire personal notes" msgstr "" -#: src/Module/Settings/Account.php:591 +#: src/Module/Settings/Account.php:553 msgid "When activated, the personal notes on your profile page will be expired." msgstr "" -#: src/Module/Settings/Account.php:592 +#: src/Module/Settings/Account.php:554 msgid "Expire starred posts" msgstr "" -#: src/Module/Settings/Account.php:592 +#: src/Module/Settings/Account.php:554 msgid "Starring posts keeps them from being expired. That behaviour is overwritten by this setting." msgstr "" -#: src/Module/Settings/Account.php:593 +#: src/Module/Settings/Account.php:555 msgid "Only expire posts by others" msgstr "" -#: src/Module/Settings/Account.php:593 +#: src/Module/Settings/Account.php:555 msgid "When activated, your own posts never expire. Then the settings above are only valid for posts you received." msgstr "" -#: src/Module/Settings/Account.php:596 +#: src/Module/Settings/Account.php:558 msgid "Notification Settings" msgstr "" -#: src/Module/Settings/Account.php:597 +#: src/Module/Settings/Account.php:559 msgid "Send a notification email when:" msgstr "" -#: src/Module/Settings/Account.php:598 +#: src/Module/Settings/Account.php:560 msgid "You receive an introduction" msgstr "" -#: src/Module/Settings/Account.php:599 +#: src/Module/Settings/Account.php:561 msgid "Your introductions are confirmed" msgstr "" -#: src/Module/Settings/Account.php:600 +#: src/Module/Settings/Account.php:562 msgid "Someone writes on your profile wall" msgstr "" -#: src/Module/Settings/Account.php:601 +#: src/Module/Settings/Account.php:563 msgid "Someone writes a followup comment" msgstr "" -#: src/Module/Settings/Account.php:602 +#: src/Module/Settings/Account.php:564 msgid "You receive a private message" msgstr "" -#: src/Module/Settings/Account.php:603 +#: src/Module/Settings/Account.php:565 msgid "You receive a friend suggestion" msgstr "" -#: src/Module/Settings/Account.php:604 +#: src/Module/Settings/Account.php:566 msgid "You are tagged in a post" msgstr "" -#: src/Module/Settings/Account.php:606 +#: src/Module/Settings/Account.php:568 msgid "Create a desktop notification when:" msgstr "" -#: src/Module/Settings/Account.php:607 +#: src/Module/Settings/Account.php:569 msgid "Someone tagged you" msgstr "" -#: src/Module/Settings/Account.php:608 +#: src/Module/Settings/Account.php:570 msgid "Someone directly commented on your post" msgstr "" -#: src/Module/Settings/Account.php:609 +#: src/Module/Settings/Account.php:571 msgid "Someone liked your content" msgstr "" -#: src/Module/Settings/Account.php:609 src/Module/Settings/Account.php:610 +#: src/Module/Settings/Account.php:571 src/Module/Settings/Account.php:572 msgid "Can only be enabled, when the direct comment notification is enabled." msgstr "" -#: src/Module/Settings/Account.php:610 +#: src/Module/Settings/Account.php:572 msgid "Someone shared your content" msgstr "" -#: src/Module/Settings/Account.php:611 +#: src/Module/Settings/Account.php:573 msgid "Someone commented in your thread" msgstr "" -#: src/Module/Settings/Account.php:612 +#: src/Module/Settings/Account.php:574 msgid "Someone commented in a thread where you commented" msgstr "" -#: src/Module/Settings/Account.php:613 +#: src/Module/Settings/Account.php:575 msgid "Someone commented in a thread where you interacted" msgstr "" -#: src/Module/Settings/Account.php:615 +#: src/Module/Settings/Account.php:577 msgid "Activate desktop notifications" msgstr "" -#: src/Module/Settings/Account.php:615 +#: src/Module/Settings/Account.php:577 msgid "Show desktop popup on new notifications" msgstr "" -#: src/Module/Settings/Account.php:619 +#: src/Module/Settings/Account.php:581 msgid "Text-only notification emails" msgstr "" -#: src/Module/Settings/Account.php:621 +#: src/Module/Settings/Account.php:583 msgid "Send text only notification emails, without the html part" msgstr "" -#: src/Module/Settings/Account.php:625 +#: src/Module/Settings/Account.php:587 msgid "Show detailled notifications" msgstr "" -#: src/Module/Settings/Account.php:627 +#: src/Module/Settings/Account.php:589 msgid "Per default, notifications are condensed to a single notification per item. When enabled every notification is displayed." msgstr "" -#: src/Module/Settings/Account.php:631 +#: src/Module/Settings/Account.php:593 msgid "Show notifications of ignored contacts" msgstr "" -#: src/Module/Settings/Account.php:633 +#: src/Module/Settings/Account.php:595 msgid "You don't see posts from ignored contacts. But you still see their comments. This setting controls if you want to still receive regular notifications that are caused by ignored contacts or not." msgstr "" -#: src/Module/Settings/Account.php:636 +#: src/Module/Settings/Account.php:598 msgid "Advanced Account/Page Type Settings" msgstr "" -#: src/Module/Settings/Account.php:637 +#: src/Module/Settings/Account.php:599 msgid "Change the behaviour of this account for special situations" msgstr "" -#: src/Module/Settings/Account.php:640 -msgid "Import Contacts" -msgstr "" - -#: src/Module/Settings/Account.php:641 -msgid "Upload a CSV file that contains the handle of your followed accounts in the first column you exported from the old account." -msgstr "" - -#: src/Module/Settings/Account.php:642 -msgid "Upload File" -msgstr "" - -#: src/Module/Settings/Account.php:645 +#: src/Module/Settings/Account.php:602 msgid "Relocate" msgstr "" -#: src/Module/Settings/Account.php:646 +#: src/Module/Settings/Account.php:603 msgid "If you have moved this profile from another server, and some of your contacts don't receive your updates, try pushing this button." msgstr "" -#: src/Module/Settings/Account.php:647 +#: src/Module/Settings/Account.php:604 msgid "Resend relocate message to contacts" msgstr "" @@ -9679,186 +9666,202 @@ msgstr "" msgid "Delete entry from the channel list?" msgstr "" -#: src/Module/Settings/Connectors.php:108 +#: src/Module/Settings/Connectors.php:107 msgid "Failed to connect with email account using the settings provided." msgstr "" -#: src/Module/Settings/Connectors.php:155 -#: src/Module/Settings/Connectors.php:156 +#: src/Module/Settings/Connectors.php:149 +#: src/Module/Settings/Connectors.php:150 msgid "Diaspora (Socialhome, Hubzilla)" msgstr "" -#: src/Module/Settings/Connectors.php:155 +#: src/Module/Settings/Connectors.php:149 #, php-format msgid "Built-in support for %s connectivity is enabled" msgstr "" -#: src/Module/Settings/Connectors.php:156 +#: src/Module/Settings/Connectors.php:150 #, php-format msgid "Built-in support for %s connectivity is disabled" msgstr "" -#: src/Module/Settings/Connectors.php:167 +#: src/Module/Settings/Connectors.php:161 msgid "Email access is disabled on this site." msgstr "" -#: src/Module/Settings/Connectors.php:182 -#: src/Module/Settings/Connectors.php:233 +#: src/Module/Settings/Connectors.php:176 +#: src/Module/Settings/Connectors.php:226 msgid "None" msgstr "" -#: src/Module/Settings/Connectors.php:186 +#: src/Module/Settings/Connectors.php:180 msgid "Default (Mastodon will display the title and a link to the post)" msgstr "" -#: src/Module/Settings/Connectors.php:187 +#: src/Module/Settings/Connectors.php:181 msgid "Use the summary (Mastodon and some others will treat it as content warning)" msgstr "" -#: src/Module/Settings/Connectors.php:188 +#: src/Module/Settings/Connectors.php:182 msgid "Embed the title in the body" msgstr "" -#: src/Module/Settings/Connectors.php:199 +#: src/Module/Settings/Connectors.php:193 msgid "General Social Media Settings" msgstr "" -#: src/Module/Settings/Connectors.php:202 +#: src/Module/Settings/Connectors.php:196 msgid "Followed content scope" msgstr "" -#: src/Module/Settings/Connectors.php:204 +#: src/Module/Settings/Connectors.php:198 msgid "By default, conversations in which your follows participated but didn't start will be shown in your timeline. You can turn this behavior off, or expand it to the conversations in which your follows liked a post." msgstr "" -#: src/Module/Settings/Connectors.php:206 +#: src/Module/Settings/Connectors.php:200 msgid "Only conversations my follows started" msgstr "" -#: src/Module/Settings/Connectors.php:207 +#: src/Module/Settings/Connectors.php:201 msgid "Conversations my follows started or commented on (default)" msgstr "" -#: src/Module/Settings/Connectors.php:208 +#: src/Module/Settings/Connectors.php:202 msgid "Any conversation my follows interacted with, including likes" msgstr "" -#: src/Module/Settings/Connectors.php:211 +#: src/Module/Settings/Connectors.php:205 msgid "Collapse sensitive posts" msgstr "" -#: src/Module/Settings/Connectors.php:211 +#: src/Module/Settings/Connectors.php:205 msgid "If a post is marked as \"sensitive\", it will be displayed in a collapsed state, if this option is enabled." msgstr "" -#: src/Module/Settings/Connectors.php:212 +#: src/Module/Settings/Connectors.php:206 msgid "Enable intelligent shortening" msgstr "" -#: src/Module/Settings/Connectors.php:212 +#: src/Module/Settings/Connectors.php:206 msgid "Normally the system tries to find the best link to add to shortened posts. If disabled, every shortened post will always point to the original friendica post." msgstr "" -#: src/Module/Settings/Connectors.php:213 +#: src/Module/Settings/Connectors.php:207 msgid "Enable simple text shortening" msgstr "" -#: src/Module/Settings/Connectors.php:213 +#: src/Module/Settings/Connectors.php:207 msgid "Normally the system shortens posts at the next line feed. If this option is enabled then the system will shorten the text at the maximum character limit." msgstr "" -#: src/Module/Settings/Connectors.php:214 +#: src/Module/Settings/Connectors.php:208 msgid "Attach the link title" msgstr "" -#: src/Module/Settings/Connectors.php:214 +#: src/Module/Settings/Connectors.php:208 msgid "When activated, the title of the attached link will be added as a title on posts to Diaspora. This is mostly helpful with \"remote-self\" contacts that share feed content." msgstr "" -#: src/Module/Settings/Connectors.php:215 +#: src/Module/Settings/Connectors.php:209 msgid "API: Use spoiler field as title" msgstr "" -#: src/Module/Settings/Connectors.php:215 +#: src/Module/Settings/Connectors.php:209 msgid "When activated, the \"spoiler_text\" field in the API will be used for the title on standalone posts. When deactivated it will be used for spoiler text. For comments it will always be used for spoiler text." msgstr "" -#: src/Module/Settings/Connectors.php:216 +#: src/Module/Settings/Connectors.php:210 msgid "API: Automatically links at the end of the post as attached posts" msgstr "" -#: src/Module/Settings/Connectors.php:216 +#: src/Module/Settings/Connectors.php:210 msgid "When activated, added links at the end of the post react the same way as added links in the web interface." msgstr "" -#: src/Module/Settings/Connectors.php:217 +#: src/Module/Settings/Connectors.php:211 msgid "Article Mode" msgstr "" -#: src/Module/Settings/Connectors.php:217 +#: src/Module/Settings/Connectors.php:211 msgid "Controls how posts with titles are transmitted. Mastodon and its forks don't display the content of these posts if the post is created in the correct (default) way." msgstr "" -#: src/Module/Settings/Connectors.php:218 -msgid "Your legacy ActivityPub/GNU Social account" -msgstr "" - -#: src/Module/Settings/Connectors.php:218 -msgid "If you enter your old account name from an ActivityPub based system or your GNU Social/Statusnet account name here (in the format user@domain.tld), your contacts will be added automatically. The field will be emptied when done." -msgstr "" - -#: src/Module/Settings/Connectors.php:222 +#: src/Module/Settings/Connectors.php:215 msgid "Email/Mailbox Setup" msgstr "" -#: src/Module/Settings/Connectors.php:223 +#: src/Module/Settings/Connectors.php:216 msgid "If you wish to communicate with email contacts using this service (optional), please specify how to connect to your mailbox." msgstr "" -#: src/Module/Settings/Connectors.php:224 +#: src/Module/Settings/Connectors.php:217 msgid "Last successful email check:" msgstr "" -#: src/Module/Settings/Connectors.php:226 +#: src/Module/Settings/Connectors.php:219 msgid "IMAP server name:" msgstr "" -#: src/Module/Settings/Connectors.php:227 +#: src/Module/Settings/Connectors.php:220 msgid "IMAP port:" msgstr "" -#: src/Module/Settings/Connectors.php:228 +#: src/Module/Settings/Connectors.php:221 msgid "Security:" msgstr "" -#: src/Module/Settings/Connectors.php:229 +#: src/Module/Settings/Connectors.php:222 msgid "Email login name:" msgstr "" -#: src/Module/Settings/Connectors.php:230 +#: src/Module/Settings/Connectors.php:223 msgid "Email password:" msgstr "" -#: src/Module/Settings/Connectors.php:231 +#: src/Module/Settings/Connectors.php:224 msgid "Reply-to address:" msgstr "" -#: src/Module/Settings/Connectors.php:232 +#: src/Module/Settings/Connectors.php:225 msgid "Send public posts to all email contacts:" msgstr "" -#: src/Module/Settings/Connectors.php:233 +#: src/Module/Settings/Connectors.php:226 msgid "Action after import:" msgstr "" -#: src/Module/Settings/Connectors.php:233 +#: src/Module/Settings/Connectors.php:226 msgid "Move to folder" msgstr "" -#: src/Module/Settings/Connectors.php:234 +#: src/Module/Settings/Connectors.php:227 msgid "Move to folder:" msgstr "" +#: src/Module/Settings/ContactImport.php:63 +msgid "Contact CSV file upload error" +msgstr "" + +#: src/Module/Settings/ContactImport.php:82 +msgid "Importing Contacts done" +msgstr "" + +#: src/Module/Settings/ContactImport.php:112 +msgid "Upload a CSV file that contains the handle of your followed accounts in the first column you exported from the old account." +msgstr "" + +#: src/Module/Settings/ContactImport.php:113 +msgid "Upload File" +msgstr "" + +#: src/Module/Settings/ContactImport.php:115 +msgid "Your legacy ActivityPub/GNU Social account" +msgstr "" + +#: src/Module/Settings/ContactImport.php:115 +msgid "If you enter your old account name from an ActivityPub based system or your GNU Social/Statusnet account name here (in the format user@domain.tld), your contacts will be added automatically. The field will be emptied when done." +msgstr "" + #: src/Module/Settings/Delegation.php:59 msgid "Delegation successfully granted." msgstr "" @@ -11451,286 +11454,286 @@ msgstr "" msgid "%s posted an update." msgstr "" -#: src/Object/Post.php:124 +#: src/Object/Post.php:125 msgid "Private Message" msgstr "" -#: src/Object/Post.php:128 +#: src/Object/Post.php:129 msgid "Public Message" msgstr "" -#: src/Object/Post.php:132 +#: src/Object/Post.php:133 msgid "Unlisted Message" msgstr "" -#: src/Object/Post.php:168 +#: src/Object/Post.php:169 msgid "This entry was edited" msgstr "" -#: src/Object/Post.php:196 +#: src/Object/Post.php:197 msgid "Connector Message" msgstr "" -#: src/Object/Post.php:225 src/Object/Post.php:227 +#: src/Object/Post.php:226 src/Object/Post.php:228 msgid "Edit" msgstr "" -#: src/Object/Post.php:261 +#: src/Object/Post.php:262 msgid "Delete globally" msgstr "" -#: src/Object/Post.php:261 +#: src/Object/Post.php:262 msgid "Remove locally" msgstr "" -#: src/Object/Post.php:268 +#: src/Object/Post.php:269 #, php-format msgid "Block %s" msgstr "" -#: src/Object/Post.php:273 +#: src/Object/Post.php:274 #, php-format msgid "Ignore %s" msgstr "" -#: src/Object/Post.php:278 +#: src/Object/Post.php:279 #, php-format msgid "Collapse %s" msgstr "" -#: src/Object/Post.php:282 +#: src/Object/Post.php:283 msgid "Report post" msgstr "" -#: src/Object/Post.php:293 +#: src/Object/Post.php:294 msgid "Save to folder" msgstr "" -#: src/Object/Post.php:333 +#: src/Object/Post.php:334 msgid "I will attend" msgstr "" -#: src/Object/Post.php:333 +#: src/Object/Post.php:334 msgid "I will not attend" msgstr "" -#: src/Object/Post.php:333 +#: src/Object/Post.php:334 msgid "I might attend" msgstr "" -#: src/Object/Post.php:380 +#: src/Object/Post.php:381 msgid "Ignore thread" msgstr "" -#: src/Object/Post.php:381 +#: src/Object/Post.php:382 msgid "Unignore thread" msgstr "" -#: src/Object/Post.php:382 +#: src/Object/Post.php:383 msgid "Toggle ignore status" msgstr "" -#: src/Object/Post.php:392 +#: src/Object/Post.php:393 msgid "Add star" msgstr "" -#: src/Object/Post.php:393 +#: src/Object/Post.php:394 msgid "Remove star" msgstr "" -#: src/Object/Post.php:394 +#: src/Object/Post.php:395 msgid "Toggle star status" msgstr "" -#: src/Object/Post.php:405 +#: src/Object/Post.php:406 msgid "Pin" msgstr "" -#: src/Object/Post.php:406 +#: src/Object/Post.php:407 msgid "Unpin" msgstr "" -#: src/Object/Post.php:407 +#: src/Object/Post.php:408 msgid "Toggle pin status" msgstr "" -#: src/Object/Post.php:410 +#: src/Object/Post.php:411 msgid "Pinned" msgstr "" -#: src/Object/Post.php:415 +#: src/Object/Post.php:416 msgid "Add tag" msgstr "" -#: src/Object/Post.php:430 +#: src/Object/Post.php:431 msgid "Quote share this" msgstr "" -#: src/Object/Post.php:430 +#: src/Object/Post.php:431 msgid "Quote Share" msgstr "" -#: src/Object/Post.php:433 +#: src/Object/Post.php:434 msgid "Reshare this" msgstr "" -#: src/Object/Post.php:433 +#: src/Object/Post.php:434 msgid "Reshare" msgstr "" -#: src/Object/Post.php:434 +#: src/Object/Post.php:435 msgid "Cancel your Reshare" msgstr "" -#: src/Object/Post.php:434 +#: src/Object/Post.php:435 msgid "Unshare" msgstr "" -#: src/Object/Post.php:478 +#: src/Object/Post.php:479 #, php-format msgid "%s (Received %s)" msgstr "" -#: src/Object/Post.php:484 +#: src/Object/Post.php:485 msgid "Comment this item on your system" msgstr "" -#: src/Object/Post.php:484 +#: src/Object/Post.php:485 msgid "Remote comment" msgstr "" -#: src/Object/Post.php:506 +#: src/Object/Post.php:507 msgid "Share via ..." msgstr "" -#: src/Object/Post.php:506 +#: src/Object/Post.php:507 msgid "Share via external services" msgstr "" -#: src/Object/Post.php:513 +#: src/Object/Post.php:514 msgid "Unknown parent" msgstr "" -#: src/Object/Post.php:517 +#: src/Object/Post.php:518 #, php-format msgid "in reply to %s" msgstr "" -#: src/Object/Post.php:519 +#: src/Object/Post.php:520 msgid "Parent is probably private or not federated." msgstr "" -#: src/Object/Post.php:543 +#: src/Object/Post.php:544 msgid "to" msgstr "" -#: src/Object/Post.php:544 +#: src/Object/Post.php:545 msgid "via" msgstr "" -#: src/Object/Post.php:545 +#: src/Object/Post.php:546 msgid "Wall-to-Wall" msgstr "" -#: src/Object/Post.php:546 +#: src/Object/Post.php:547 msgid "via Wall-To-Wall:" msgstr "" -#: src/Object/Post.php:599 +#: src/Object/Post.php:600 #, php-format msgid "Reply to %s" msgstr "" -#: src/Object/Post.php:602 +#: src/Object/Post.php:603 msgid "More" msgstr "" -#: src/Object/Post.php:621 +#: src/Object/Post.php:622 msgid "Notifier task is pending" msgstr "" -#: src/Object/Post.php:622 +#: src/Object/Post.php:623 msgid "Delivery to remote servers is pending" msgstr "" -#: src/Object/Post.php:623 +#: src/Object/Post.php:624 msgid "Delivery to remote servers is underway" msgstr "" -#: src/Object/Post.php:624 +#: src/Object/Post.php:625 msgid "Delivery to remote servers is mostly done" msgstr "" -#: src/Object/Post.php:625 +#: src/Object/Post.php:626 msgid "Delivery to remote servers is done" msgstr "" -#: src/Object/Post.php:647 +#: src/Object/Post.php:648 #, php-format msgid "%d comment" msgid_plural "%d comments" msgstr[0] "" msgstr[1] "" -#: src/Object/Post.php:648 +#: src/Object/Post.php:649 msgid "Show more" msgstr "" -#: src/Object/Post.php:649 +#: src/Object/Post.php:650 msgid "Show fewer" msgstr "" -#: src/Object/Post.php:686 +#: src/Object/Post.php:687 #, php-format msgid "Reshared by: %s" msgstr "" -#: src/Object/Post.php:691 +#: src/Object/Post.php:692 #, php-format msgid "Viewed by: %s" msgstr "" -#: src/Object/Post.php:696 +#: src/Object/Post.php:697 #, php-format msgid "Read by: %s" msgstr "" -#: src/Object/Post.php:701 +#: src/Object/Post.php:702 #, php-format msgid "Liked by: %s" msgstr "" -#: src/Object/Post.php:706 +#: src/Object/Post.php:707 #, php-format msgid "Disliked by: %s" msgstr "" -#: src/Object/Post.php:711 +#: src/Object/Post.php:712 #, php-format msgid "Attended by: %s" msgstr "" -#: src/Object/Post.php:716 +#: src/Object/Post.php:717 #, php-format msgid "Maybe attended by: %s" msgstr "" -#: src/Object/Post.php:721 +#: src/Object/Post.php:722 #, php-format msgid "Not attended by: %s" msgstr "" -#: src/Object/Post.php:726 +#: src/Object/Post.php:727 #, php-format msgid "Commented by: %s" msgstr "" -#: src/Object/Post.php:731 +#: src/Object/Post.php:732 #, php-format msgid "Reacted with %s by: %s" msgstr "" -#: src/Object/Post.php:754 +#: src/Object/Post.php:755 #, php-format msgid "Quote shared by: %s" msgstr "" From 071cb70817e1c3d2e4fec011fd9fc422684b9f40 Mon Sep 17 00:00:00 2001 From: Philipp Date: Sun, 22 Dec 2024 08:54:54 +0100 Subject: [PATCH 08/12] Fix codecov token env --- .woodpecker/.phpunit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.woodpecker/.phpunit.yml b/.woodpecker/.phpunit.yml index 4998d5ff1f..58b5723cc6 100644 --- a/.woodpecker/.phpunit.yml +++ b/.woodpecker/.phpunit.yml @@ -87,7 +87,7 @@ steps: commands: - codecov -R '.' -Z -f 'clover.xml' environment: - codecov_token: + CODECOV_TOKEN: from_secret: codecov-token services: From 2cb212ba28e48389b8d0ca5a52193955ea37bcc5 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 22 Dec 2024 08:02:10 +0000 Subject: [PATCH 09/12] Documentation to connectors updated --- doc/Addons.md | 10 ++-- doc/Circles-and-Privacy.md | 8 --- doc/Connectors.md | 17 +----- doc/Export-Import-Contacts.md | 3 +- doc/Home.md | 2 +- doc/Installing-Connectors.md | 93 +++++++------------------------- doc/de/Circles-and-Privacy.md | 7 --- doc/de/Connectors.md | 19 ++----- doc/de/Export-Import-Contacts.md | 3 +- doc/de/Home.md | 2 +- doc/de/Installing-Connectors.md | 90 +++++++------------------------ 11 files changed, 52 insertions(+), 202 deletions(-) diff --git a/doc/Addons.md b/doc/Addons.md index befabfd05a..70b51c3066 100644 --- a/doc/Addons.md +++ b/doc/Addons.md @@ -604,7 +604,7 @@ Hook data: ### follow -Called before adding a new contact for a user to handle non-native network remote contact (like Twitter). +Called before adding a new contact for a user to handle non-native network remote contact (like Bluesky). Hook data: @@ -613,7 +613,7 @@ Hook data: ### unfollow -Called when unfollowing a remote contact on a non-native network (like Twitter) +Called when unfollowing a remote contact on a non-native network (like Bluesky) Hook data: - **contact** (input): the target public contact (uid = 0) array. @@ -622,7 +622,7 @@ Hook data: ### revoke_follow -Called when making a remote contact on a non-native network (like Twitter) unfollow you. +Called when making a remote contact on a non-native network (like Bluesky) unfollow you. Hook data: - **contact** (input): the target public contact (uid = 0) array. @@ -631,7 +631,7 @@ Hook data: ### block -Called when blocking a remote contact on a non-native network (like Twitter). +Called when blocking a remote contact on a non-native network (like Bluesky). Hook data: - **contact** (input): the remote contact (uid = 0) array. @@ -640,7 +640,7 @@ Hook data: ### unblock -Called when unblocking a remote contact on a non-native network (like Twitter). +Called when unblocking a remote contact on a non-native network (like Bluesky). Hook data: - **contact** (input): the remote contact (uid = 0) array. diff --git a/doc/Circles-and-Privacy.md b/doc/Circles-and-Privacy.md index d701173c07..abec72f15a 100644 --- a/doc/Circles-and-Privacy.md +++ b/doc/Circles-and-Privacy.md @@ -95,14 +95,6 @@ However we take privacy seriously and don't behave like some networks that __pre Your profile and "wall" may also be visited by your friends from other networks, and you can block access to these by web visitors that Friendica doesn't know. Be aware that this could include some of your friends on other networks. -This may produce undesired results when posting a long status message to (for instance) Twitter. -When Friendica sends a post to these networks which exceeds the service length limit, we truncate it and provide a link to the original. -The original is a link back to your Friendica profile. -As Friendica cannot prove who they are, it may not be possible for these people to view your post in full. - -For people in this situation we would recommend providing a "Twitter-length" summary, with more detail for friends that can see the post in full. -You can do so by including the BBCode tag *abstract* in your posting. - Blocking your profile or entire Friendica site from unknown web visitors also has serious implications for communicating with GNU Social members. These networks communicate with others via public protocols that are not authenticated. In order to view your posts, these networks have to access them as an "unknown web visitor". diff --git a/doc/Connectors.md b/doc/Connectors.md index b081f5b25c..77d44e909f 100644 --- a/doc/Connectors.md +++ b/doc/Connectors.md @@ -4,15 +4,10 @@ Connectors * [Home](help) Connectors allow you to connect with external social networks and services. -They are only required for posting to existing accounts on Twitter or GNU Social. +They are only required for posting to existing accounts on for example Bluesky, Tumblr or Twitter. +For Bluesky and Tumblr you can also enable a bidirectional synchronisation, so that you can use Friendica to read your timeline from Tumblr or Bluesky. There is also a connector for accessing your email INBOX. -If the following network connectors are installed on your system, select the following links to visit the appropriate settings page and configure them for your account: - -* [Twitter](/settings/addons) -* [GNU Social](/settings/addons) -* [Email](/settings) - Instructions For Connecting To People On Specific Services ========================================================== @@ -37,14 +32,6 @@ PLease note that you will not be able to reply to these contacts. This feed reader feature will allow you to _connect_ with millions of pages on the internet. All that the pages need to have is a discoverable feed using either the RSS or Atom syndication format, and which provides an author name and a site image in a form which we can extract. -Twitter ---- - -To follow a Twitter member, the Twitter-Connector (Addon) needs to be configured on your node. -If this is the case put the URL of the Twitter member's main page into the Connect box on your [Contacts](contacts) page. -To reply, you must have the Twitter connector installed, and reply using your own status editor. -Begin the message with @twitterperson replacing with the Twitter username. - Email --- diff --git a/doc/Export-Import-Contacts.md b/doc/Export-Import-Contacts.md index 95b33f380c..824c9e2ebb 100644 --- a/doc/Export-Import-Contacts.md +++ b/doc/Export-Import-Contacts.md @@ -11,8 +11,7 @@ To export the list of accounts that you follow, go to the [Settings Export perso ## Import of followed Contacts -To import contacts from a CSV file, go to the [Settings page](settings). -At the bottom of the *account settings* page you'll find the *import contacts* section. +To import contacts from a CSV file, go to the [import contacts](settings/importcontacts). Upload the CSV file there. ### Supported File Format diff --git a/doc/Home.md b/doc/Home.md index bb9beea999..b8b3517a45 100644 --- a/doc/Home.md +++ b/doc/Home.md @@ -31,7 +31,7 @@ Help * [Install](help/Install) * [Update](help/Update) * [Settings & Admin Panel](help/Settings) -* [Installing Connectors (Twitter/GNU Social)](help/Installing-Connectors) +* [Installing Connectors](help/Installing-Connectors) * [Install an ejabberd server (XMPP chat) with synchronized credentials](help/install-ejabberd) * [Using SSL with Friendica](help/SSL) * [Config values that can only be set in config/local.config.php](help/Config) diff --git a/doc/Installing-Connectors.md b/doc/Installing-Connectors.md index d63d2c2e1c..48c3c9fb1e 100644 --- a/doc/Installing-Connectors.md +++ b/doc/Installing-Connectors.md @@ -1,89 +1,34 @@ -Installing Connectors (Twitter/GNU Social) +Installing Connectors ================================================== * [Home](help) +Friendica uses add-ons to connect to some networks, such as Tumblr or Bluesky. -Friendica uses addons to provide connectivity to some networks, such as Twitter. +All of these add-ons require an account on the target network. +In addition, you (or usually the server administrator) will need to obtain an API key to allow authenticated access to your Friendica server. -There is also a addon to post through to an existing account on a GNU Social service. -You only need this to post to an already existing GNU Social account, but not to communicate with GNU Social members in general. - -All three addons require an account on the target network. -In addition you (or typically the server administrator) will need to obtain an API key to provide authenticated access to your Friendica server. - -Site Configuration +Site configuration --- -Addons must be installed by the site administrator before they can be used. -This is accomplished through the site administration panel. +Addons need to be installed by the site administrator before they can be used. +This is done through the site administration panel. -Each of the connectors also requires an "API key" from the service you wish to connect with. -Some addons allow you to enter this information in the site administration pages, while others may require you to edit your configuration file (config/local.config.php). -The ways to obtain these keys vary between the services, but they all require an existing account on the target service. -Once installed, these API keys can usually be shared by all site members. +Some of the connectors also require an "API key" from the service you wish to connect to. +For Tumblr, this information can be found in the site administration pages, while for Twitter (X) each user has to create their own API key. +Other connectors, such as Bluesky, don't require an API key at all. -The details of configuring each service follow (much of this information comes directly from the addon source files): +You can find more information about specific requirements on each addon's settings page, either on the admin page or the user page. -Twitter Addon for Friendica +Bluesky Jetstream --- -* Author: Tobias Diekershoff -* tobias.diekershoff@gmx.net -* License: 3-clause BSD license +To further improve connectivity to Bluesky, Admins can choose to enable 'Jetstream' connectivity. +Jetstream is a service that connects to the Bluesky firehose. +With Jetstream, messages arrive in real time rather than having to be polled. +It also enables real-time processing of blocks or tracking activities performed by the user via the Bluesky website or application. -### Configuration -To use this addon you need a OAuth Consumer key pair (key & secret). -You can get it from [Twitter](https://twitter.com/apps). +To enable Jetstream processing, run `bin/jetstream.php' from the command line. +You will need to define the process id file in local.config.php in the 'jetstream' section using the key 'pidfile'. -Register your Friendica site as "Client" application with "Read & Write" access. -We do not need "Twitter as login". -When you've registered the app you get a key pair with an OAuth Consumer key and a secret key for your application/site. -Add this key pair to your config/local.config.php: - - [twitter] - consumerkey = your consumer_key here - consumersecret = your consumer_secret here - -After this, your users can configure their Twitter account settings from "Settings -> Connector Settings". - -### More documentation - -Find the author's documentation here: [http://diekershoff.homeunix.net/redmine/wiki/friendikaplugin/Twitter_Plugin](http://diekershoff.homeunix.net/redmine/wiki/friendikaplugin/Twitter_Plugin) - - -GNU Social Addon for Friendica ---- - -* Author: Tobias Diekershoff -* tobias.diekershoff@gmx.net -* License: 3-clause BSD license - -### Configuration - -When the addon is activated the user has to acquire the following in order to connect to the GNU Social account of choice. - -* The base URL for the GNU Social API, for quitter.se this is https://quitter.se/api/ -* OAuth Consumer key & secret - -To get the OAuth Consumer key pair the user has to - -1 ask her Friendica admin if a pair already exists or -2 has to register the Friendica server as a client application on the GNU Social server. - -This can be done from the account settings under "Settings -> Connections -> Register an OAuth client application -> Register a new application" on the GNU Social server. - -During the registration of the OAuth client remember the following: - -* Application names must be unique on the GNU Social site, so we recommend a Name of 'friendica-nnnn', replace 'nnnn' with a random number or your website name. -* there is no callback url -* register a desktop client -* with read & write access -* the Source URL should be the URL of your Friendica server - -After the required credentials for the application are stored in the configuration you have to actually connect your Friendica account with GNU Social. -This is done from the Settings -> Connector Settings page. -Follow the Sign in with GNU Social button, allow access and then copy the security code into the box provided. -Friendica will then try to acquire the final OAuth credentials from the API. - -If successful, the addon settings will allow you to select to post your public messages to your GNU Social account (have a look behind the little lock symbol beneath the status "editor" on your Home or Network pages). +To keep track of the messages processed and the drift (the time difference between the date of the message and the date the system processed that message), some fields are added to the statistics endpoint. \ No newline at end of file diff --git a/doc/de/Circles-and-Privacy.md b/doc/de/Circles-and-Privacy.md index aebaff8715..dcb5f3259f 100644 --- a/doc/de/Circles-and-Privacy.md +++ b/doc/de/Circles-and-Privacy.md @@ -97,13 +97,6 @@ Wir nehmen hingegen Privatsphäre ernst und agieren nicht wie andere Netzwerke, Dein Profil und deine "Wall" sollen vielleicht auch von Freunden anderer Netzwerke besucht werden können. Wenn du diese Seiten allerdings für Webbesucher sperrst, die Friendica nicht kennt, kann das auch Freunde anderer Netzwerke blockieren. -Das kann möglicherweise ungewollte Ergebnisse produzieren, wenn du lange Statusbeiträge z.B. für Twitter oder Facebook schreibst. -Wenn Friendica einen Beitrag an diese Netzwerke schickt und nur eine bestimmte Nachrichtenlänge erlaubt ist, dann verkürzen wir diesen und erstellen einen Link, der zum Originalbeitrag führt. -Der Originallink führt zurück zu deinem Friendica-Profil. -Da Friendica nicht bestätigen kann, um wen es sich handelt, kann es passieren, dass diese Leute den Beitrag nicht komplett lesen können. - -Für Leute, die davon betroffen sind, schlagen wir vor, eine Zusammenfassung in Twitter-Länge zu erstellen mit mehr Details für Freunde, die den ganzen Beitrag sehen können. - Dein Profil oder deine gesamte Friendica-Seite zu blockieren, hat außerdem ernsthafte Einflüsse auf deine Kommunikation mit GNU Social-Nutzern. Diese Netzwerke kommunizieren mit anderen über öffentliche Protokolle, die nicht authentifiziert werden. Um deine Beiträge zu sehen, müssen diese Netzwerke deine Beiträge als "unbekannte Webbesucher" ansehen. diff --git a/doc/de/Connectors.md b/doc/de/Connectors.md index a4289c3c30..fe2d739fd5 100644 --- a/doc/de/Connectors.md +++ b/doc/de/Connectors.md @@ -4,15 +4,10 @@ Konnektoren (Connectors) * [Zur Startseite der Hilfe](help) Konnektoren erlauben es Dir, Dich mit anderen sozialen Netzwerken zu verbinden. -Konnektoren werden nur bei bestehenden Twitter und GNU Social-Accounts benötigt. +Mit diesen Konnektoren kannst Du z.B. zu Bluesky, Tumblr oder Twitter posten. +Für Bluesky und Tumblr gibt es eine bidirektionale Verbindung, d.h. du kannst Friendica nutzen, um deine Timeline von diesen Diensten zu lesen. Außerdem gibt es einen Konnektor, um Deinen Email-Posteingang zu nutzen. -Wenn Du keinen eigenen Knoten betreibst und wissen willst, ob der server Deiner Wahl diese Konnektoren installiert hat, kannst Du Dich darüber auf der Seite '<domain_des_friendica-servers>/friendica' informieren. - -Sind die Netzwerk-Konnektoren auf Deinem System installiert sind, kannst Du mit den folgenden Links die Einstellungsseiten besuchen und für Deinen Account konfigurieren: - -* [Twitter](/settings/connectors) -* [GNU Social](/settings/connectors) -* [Email](/settings/connectors) +Wenn Du keinen eigenen Knoten betreibst und wissen willst, ob der Server Deiner Wahl diese Konnektoren installiert hat, kannst Du Dich darüber auf der Seite '<domain_des_friendica-servers>/friendica' informieren. Anleitung, um sich mit Personen in bestimmten Netzwerken zu verbinden ========================================================== @@ -35,14 +30,6 @@ Du hast keine Möglichkeit, diesen Kontakten zu antworten. Das erlaubt Dir, Dich mit Millionen von Seiten im Internet zu _verbinden_. Alles, was dafür nötig ist, ist dass die Seite einen Feed im RSS- oder Atom Syndication-Format nutzt und welches einen Autoren und ein Bild zur Seite liefert. - -**Twitter** - -Um einem Twitter-Nutzer zu folgen, trage die URL der Hauptseite des Twitter-Accounts auf Deiner ["Kontakte"-Seite](contacts) in das Feld "Neuen Kontakt hinzufügen" ein. -Um zu antworten, musst Du den Twitter-Konnektor installieren und über Deinen eigenen Status-Editor antworten. -Beginne Deine Nachricht mit @twitternutzer, ersetze das aber durch den richtigen Twitter-Namen. - - **Email** Konfiguriere den Email-Konnektor auf Deiner [Einstellungsseite](settings). diff --git a/doc/de/Export-Import-Contacts.md b/doc/de/Export-Import-Contacts.md index 6d814edcb4..b58752c9be 100644 --- a/doc/de/Export-Import-Contacts.md +++ b/doc/de/Export-Import-Contacts.md @@ -11,8 +11,7 @@ Um die Liste der Kontakte *denen du folgst* zu exportieren, geht die [Einstellun ## Import der gefolgten Kontakte -Um die Kontakt CSV Datei zu importieren, gehe in die [Einstellungen](settings). -Am Ende der Einstellungen zum Nutzerkonto findest du den Abschnitt "Kontakte Importieren". +Um die Kontakt CSV Datei zu importieren, gehe zu [Kontakte Importieren](settings/importcontacts). Hier kannst du die CSV Datei auswählen und hoch laden. ### Unterstütztes Datei Format diff --git a/doc/de/Home.md b/doc/de/Home.md index d5fcb407d3..6ea7937ea3 100644 --- a/doc/de/Home.md +++ b/doc/de/Home.md @@ -32,7 +32,7 @@ Hilfe * [Update](help/Update) (EN) * [Konfigurationen & Admin-Panel](help/Settings) * [Addons](help/Addons) -* [Konnektoren (Connectors) installieren (Twitter/GNU Social)](help/Installing-Connectors) +* [Konnektoren (Connectors) installieren](help/Installing-Connectors) * [Installation eines ejabberd Servers (XMPP-Chat) mit synchronisierten Anmeldedaten](help/install-ejabberd) (EN) * [Betreibe deine Seite mit einem SSL-Zertifikat](help/SSL) * [Konfigurationswerte, die nur in der config/local.config.php gesetzt werden können](help/Config) (EN) diff --git a/doc/de/Installing-Connectors.md b/doc/de/Installing-Connectors.md index 9025d3d73b..1ca152ace9 100644 --- a/doc/de/Installing-Connectors.md +++ b/doc/de/Installing-Connectors.md @@ -1,85 +1,33 @@ -Konnektoren installieren (Twitter/GNU Social) +Konnektoren installieren ================================================== * [Zur Startseite der Hilfe](help) -Friendica nutzt Erweiterung, um die Verbindung zu anderen Netzwerken wie Twitter oder App.net zu gewährleisten. - -Es gibt außerdem ein Erweiterung, um über einen bestehenden GNU Social-Account diesen Service zu nutzen. -Du brauchst dieses Erweiterung aber nicht, um mit GNU Social-Mitgliedern von Friendica aus zu kommunizieren - es sei denn, du wünschst es, über einen existierenden Account einen Beitrag zu schreiben. - -Alle drei Erweiterung benötigen einen Account im gewünschten Netzwerk. -Zusätzlich musst du (bzw. der Administrator der Seite) einen API-Schlüssel holen, um einen authentifizierten Zugriff zu deinem Friendica-Server herstellen zu lassen. +Friendica verwendet Konnektoren, um sich mit einigen Netzwerken zu verbinden, wie Tumblr oder Bluesky. +Alle diese Konnektoren erfordern einen Account im Zielnetzwerk. +Außerdem musst du (oder die Server-Administration) in der Regel einen API-Schlüssel erhalten, um die Verbindung zu ermöglichen. **Seitenkonfiguration** -Erweiterung müssen vom Administrator installiert werden, bevor sie genutzt werden können. -Dieses kann über das Administrationsmenü erstellt werden. +Konnektoren müssen von der Server-Administration installiert werden, bevor sie verwendet werden können. +Dies geschieht über die Server-Verwaltung. -Jeder der Konnektoren benötigt zudem einen API-Schlüssel vom Service, der verbunden werden soll. -Einige Erweiterung erlaube es, diese Informationen auf den Administrationsseiten einzustellen, wohingegen andere eine direkte Bearbeitung der Konfigurationsdatei "config/local.config.php" erfordern. -Der Weg, um diese Schlüssel zu erhalten, variiert stark, jedoch brauchen fast alle einen bestehenden Account im gewünschten Service. -Einmal installiert, können diese Schlüssel von allen Seitennutzern genutzt werden. +Einige der Konnektoren erfordern auch einen „API-Schlüssel“ des Dienstes, mit dem du dich verbinden möchtest. +Für Tumblr findet man diese Informationen auf den Seiten der Server-Verwaltung, während für Twitter (X) jede Person einen eigenen API-Schlüssel erstellen muss. +Andere Konnektoren, wie Bluesky, benötigen überhaupt keinen API-Schlüssel. -Im Folgenden findest du die Einstellungen für die verschiedenen Services (viele dieser Informationen kommen direkt aus den Quelldateien der Erweiterung): +Weitere Informationen zu den spezifischen Anforderungen findest du auf der Einstellungsseite des jeweiligen Addons, entweder auf der Verwaltungsseite oder auf der Benutzerseite. +Bluesky Jetstream +--- -**Twitter Erweiterung für Friendica** +Um die Konnektivität mit Bluesky weiter zu verbessern, kann die „Jetstream“-Konnektivität aktiviert werden. +Jetstream ist ein Dienst, der sich mit dem Bluesky-Firehose verbindet. +Mit Jetstream kommen die Nachrichten in Echtzeit an und müssen nicht erst abgefragt werden. +Es ermöglicht auch die Echtzeitverarbeitung von Blöcken oder Tracking-Aktivitäten, die über die Bluesky-Website oder -Anwendung durchgeführt werden. -* Author: Tobias Diekershoff -* tobias.diekershoff@gmx.net +Um die Jetstream-Verarbeitung zu aktivieren, führe `bin/jetstream.php' über die Befehlszeile aus. +Du musst vorher die Prozess-ID-Datei in local.config.php im Abschnitt „jetstream“ mit dem Schlüssel „pidfile“ definieren. -* License:3-clause BSD license - -Konfiguration: -Um dieses Erweiterung zu nutzen, benötigst du einen OAuth Consumer-Schlüsselpaar (Schlüssel und Geheimnis), das du auf der Seite [https://twitter.com/apps](https://twitter.com/apps) erhalten kannst - -Registriere deine Friendica-Seite als "Client"-Anwendung mit "Read&Write"-Zugriff. Wir benötigen "Twitter als Login" nicht. Sobald du deine Anwendung installiert hast, erhältst du das Schlüsselpaar für deine Seite. - -Trage dieses Schlüsselpaar in deine globale "config/local.config.php"-Datei ein. - -``` -[twitter] -consumerkey = your consumer_key here -consumersecret = your consumer_secret here -``` - -Anschließend kann der Nutzer deiner Seite die Twitter-Einstellungen selbst eintragen: "Einstellungen -> Connector Einstellungen". - - -**GNU Social Erweiterung für Friendica** - -* Author: Tobias Diekershoff -* tobias.diekershoff@gmx.net - -* License:3-clause BSD license - -Konfiguration - -Wenn das Addon aktiv ist, muss der Nutzer die folgenden Einstellungen vornehmen, um sich mit dem GNU Social-Account seiner Wahl zu verbinden. - -* Die Basis-URL des GNU Social-API; für quitter.se ist es https://quitter.se/api/ -* OAuth Consumer key & Geheimnis - -Um das OAuth-Schlüsselpaar zu erhalten, muss der Nutzer - -(a) seinen Friendica-Admin fragen, ob bereits ein Schlüsselpaar existiert oder -(b) einen Friendica-Server als Anwendung auf dem GNU Social-Server anmelden. - -Dies kann über Einstellungen --> Connections --> "Register an OAuth client application" -> "Register a new application" auf dem GNU Social-Server durchgeführt werden. - -Während der Registrierung des OAuth-Clients ist Folgendes zu beachten: - -* Der Anwendungsname muss auf der GNU Social-Seite einzigartig sein, daher empfehlen wir einen Namen wie "friendica-nnnn", ersetze dabei "nnnn" mit einer frei gewählten Nummer oder deinem Webseitennamen. -* es gibt keine Callback-URL -* Registriere einen Desktop-Client -* stelle Lese- und Schreibrechte ein -* die Quell-URL sollte die URL deines Friendica-Servers sein - -Sobald die benötigten Daten gespeichert sind, musst du deinen Friendica-Account mit GNU Social verbinden. -Das kannst du über Einstellungen --> Connector-Einstellungen durchführen. -Folge dem "Einloggen mit GNU Social"-Button, erlaube den Zugriff und kopiere den Sicherheitscode in die entsprechende Box. -Friendica wird dann versuchen, die abschließende OAuth-Einstellungen über die API zu beziehen. - -Wenn es geklappt hat, kannst du in den Einstellungen festlegen, ob deine öffentlichen Nachrichten automatisch in deinem GNU Social-Account erscheinen soll (achte hierbei auf das kleine Schloss-Symbol im Status-Editor) +Um die verarbeiteten Nachrichten und die Drift (die Zeitdifferenz zwischen dem Datum der Nachricht und dem Datum, an dem das System diese Nachricht verarbeitet hat) zu verfolgen, wurden dem Statistik-Endpunkt einige Felder hinzugefügt. From ae2b6e3bb7284189d9d0503448538d557391a247 Mon Sep 17 00:00:00 2001 From: Art4 Date: Mon, 23 Dec 2024 10:45:15 +0000 Subject: [PATCH 10/12] Fix PHPStan errors from upstream --- src/Protocol/ATProtocol.php | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/Protocol/ATProtocol.php b/src/Protocol/ATProtocol.php index cc996b6861..ad3537d377 100644 --- a/src/Protocol/ATProtocol.php +++ b/src/Protocol/ATProtocol.php @@ -129,17 +129,26 @@ final class ATProtocol } $data = $this->get($pds . '/xrpc/' . $url, [HttpClientOptions::HEADERS => $headers]); - if (empty($data) || (!empty($data->code) && ($data->code < 200 || $data->code >= 400))) { + + if ($data === null) { $this->pConfig->set($uid, 'bluesky', 'status', self::STATUS_API_FAIL); + + return null; + } + + if (!empty($data->code) && ($data->code < 200 || $data->code >= 400)) { if (!empty($data->message)) { $this->pConfig->set($uid, 'bluesky', 'status-message', $data->message); } elseif (!empty($data->code)) { $this->pConfig->set($uid, 'bluesky', 'status-message', 'Error Code: ' . $data->code); } - } elseif (!empty($data)) { - $this->pConfig->set($uid, 'bluesky', 'status', self::STATUS_SUCCESS); - $this->pConfig->set($uid, 'bluesky', 'status-message', ''); + + return $data; } + + $this->pConfig->set($uid, 'bluesky', 'status', self::STATUS_SUCCESS); + $this->pConfig->set($uid, 'bluesky', 'status-message', ''); + return $data; } From b1d78e34dbb0c31815b0f38d483285ce3373f968 Mon Sep 17 00:00:00 2001 From: Art4 Date: Mon, 23 Dec 2024 11:37:52 +0000 Subject: [PATCH 11/12] Remove checks if result body is not an object --- src/Protocol/ATProtocol.php | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Protocol/ATProtocol.php b/src/Protocol/ATProtocol.php index ad3537d377..064bb589f4 100644 --- a/src/Protocol/ATProtocol.php +++ b/src/Protocol/ATProtocol.php @@ -223,16 +223,13 @@ final class ATProtocol return null; } - $data = json_decode($curlResult->getBodyString()); + $data = json_decode($curlResult->getBodyString(), false); + if (!$curlResult->isSuccess()) { $this->logger->notice('API Error', ['url' => $url, 'code' => $curlResult->getReturnCode(), 'error' => $data ?: $curlResult->getBodyString()]); if (!$data) { $this->pConfig->set($uid, 'bluesky', 'status', self::STATUS_API_FAIL); - if (!empty($data->message)) { - $this->pConfig->set($uid, 'bluesky', 'status-message', $data->message); - } elseif (!empty($data->code)) { - $this->pConfig->set($uid, 'bluesky', 'status-message', 'Error Code: ' . $data->code); - } + return null; } $data->code = $curlResult->getReturnCode(); From 73fb1f1549315804e2ebb9db4f3c6cbd89488244 Mon Sep 17 00:00:00 2001 From: Art4 Date: Mon, 23 Dec 2024 12:39:11 +0000 Subject: [PATCH 12/12] Remove DI::app() method --- src/DI.php | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/DI.php b/src/DI.php index de80da34d3..18d74dd23a 100644 --- a/src/DI.php +++ b/src/DI.php @@ -71,16 +71,6 @@ abstract class DI // common instances // - /** - * @deprecated 2024.12 use DI::appHelper() instead - * - * @return App - */ - public static function app() - { - return self::$dice->create(App::class); - } - public static function appHelper(): AppHelper { return self::$dice->create(AppHelper::class);