From 8a55ce241558b94d7258aab8b91cbb319dfe80e7 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 24 Mar 2023 20:39:11 +0000 Subject: [PATCH 001/326] Set different permissions for comments via API --- src/Content/Item.php | 2 +- src/Model/Item.php | 8 +++++--- src/Module/Api/Mastodon/Statuses.php | 9 ++++----- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/Content/Item.php b/src/Content/Item.php index 25d27b26df..45890f4047 100644 --- a/src/Content/Item.php +++ b/src/Content/Item.php @@ -548,7 +548,7 @@ class Item $item['allow_cid'] = ''; $item['allow_gid'] = ''; } - } elseif ($setPermissions && ($item['gravity'] == ItemModel::GRAVITY_PARENT)) { + } elseif ($setPermissions) { if (empty($receivers)) { // For security reasons direct posts without any receiver will be posts to yourself $self = Contact::selectFirst(['id'], ['uid' => $item['uid'], 'self' => true]); diff --git a/src/Model/Item.php b/src/Model/Item.php index 5ef488b977..809a70254b 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -892,6 +892,8 @@ class Item $item['post-type'] = empty($item['title']) ? self::PT_NOTE : self::PT_ARTICLE; } + $defined_permissions = isset($item['allow_cid']) && isset($item['allow_gid']) && isset($item['deny_cid']) && isset($item['deny_gid']) && isset($item['private']); + $item['wall'] = intval($item['wall'] ?? 0); $item['extid'] = trim($item['extid'] ?? ''); $item['author-name'] = trim($item['author-name'] ?? ''); @@ -993,7 +995,7 @@ class Item $item['wall'] = $toplevel_parent['wall']; // Reshares have to keep their permissions to allow forums to work - if (!$item['origin'] || ($item['verb'] != Activity::ANNOUNCE)) { + if (!$defined_permissions && (!$item['origin'] || ($item['verb'] != Activity::ANNOUNCE))) { $item['allow_cid'] = $toplevel_parent['allow_cid']; $item['allow_gid'] = $toplevel_parent['allow_gid']; $item['deny_cid'] = $toplevel_parent['deny_cid']; @@ -1016,7 +1018,7 @@ class Item * This differs from the above settings as it subtly allows comments from * email correspondents to be private even if the overall thread is not. */ - if ($toplevel_parent['private']) { + if (!$defined_permissions && $toplevel_parent['private']) { $item['private'] = $toplevel_parent['private']; } @@ -1063,7 +1065,7 @@ class Item } // ACL settings - if (!empty($item['allow_cid'] . $item['allow_gid'] . $item['deny_cid'] . $item['deny_gid'])) { + if (!$defined_permissions && !empty($item['allow_cid'] . $item['allow_gid'] . $item['deny_cid'] . $item['deny_gid'])) { $item['private'] = self::PRIVATE; } diff --git a/src/Module/Api/Mastodon/Statuses.php b/src/Module/Api/Mastodon/Statuses.php index e64d841926..8b72af8eea 100644 --- a/src/Module/Api/Mastodon/Statuses.php +++ b/src/Module/Api/Mastodon/Statuses.php @@ -266,15 +266,14 @@ class Statuses extends BaseApi } if ($request['in_reply_to_id']) { - $parent = Post::selectFirst(['uri', 'private'], ['uri-id' => $request['in_reply_to_id'], 'uid' => [0, $uid]]); + $parent = Post::selectFirst(['uri'], ['uri-id' => $request['in_reply_to_id'], 'uid' => [0, $uid]]); + if (empty($parent)) { + throw new HTTPException\NotFoundException('Item with URI ID ' . $request['in_reply_to_id'] . ' not found for user ' . $uid . '.'); + } $item['thr-parent'] = $parent['uri']; $item['gravity'] = Item::GRAVITY_COMMENT; $item['object-type'] = Activity\ObjectType::COMMENT; - - if (in_array($parent['private'], [Item::UNLISTED, Item::PUBLIC]) && ($item['private'] == Item::PRIVATE)) { - throw new HTTPException\NotImplementedException('Private replies for public posts are not implemented.'); - } } else { self::checkThrottleLimit(); From c10c5495be191fe227e5957db97cb4a66db09fa9 Mon Sep 17 00:00:00 2001 From: bkil Date: Sat, 25 Mar 2023 14:30:29 +0100 Subject: [PATCH 002/326] doc/Improve-Performance.md: replace old links with updated GitHub ones --- doc/Improve-Performance.md | 2 +- doc/de/FAQ-admin.md | 2 +- doc/de/Improve-Performance.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/Improve-Performance.md b/doc/Improve-Performance.md index 79490c2573..1d0a859f1f 100644 --- a/doc/Improve-Performance.md +++ b/doc/Improve-Performance.md @@ -81,6 +81,6 @@ Please refer to external documentation for a more detailed explanation how to se ### Database -There are scripts like [tuning-primer.sh](http://www.day32.com/MySQL/) and [mysqltuner.pl](http://mysqltuner.pl) that analyze your database server and give hints on values that could be changed. +There are scripts like [tuning-primer.sh](https://github.com/BMDan/tuning-primer.sh) and [mysqltuner.pl](https://github.com/major/MySQLTuner-perl/blob/master/mysqltuner.pl) that analyze your database server and give hints on values that could be changed. Please enable the slow query log. This helps to find performance problems. diff --git a/doc/de/FAQ-admin.md b/doc/de/FAQ-admin.md index f9cd14929b..5b355e142f 100644 --- a/doc/de/FAQ-admin.md +++ b/doc/de/FAQ-admin.md @@ -27,7 +27,7 @@ Der Quellcode von Friendica Red ist [hier](https://github.com/friendica/red) zu Addons findest Du auf [dieser Seite](https://github.com/friendica/friendica-addons). -Wenn Du neue Themen suchst, findest Du sie auf [Friendica-Themes.com](http://friendica-themes.com/). +Wenn Du neue Themen suchst, findest Du sie auf [github.com/bkil/friendica-themes](https://github.com/bkil/friendica-themes). ### Ich habe meine E-Mail Adresse geändern und jetzt ist das Admin Panel verschwunden? diff --git a/doc/de/Improve-Performance.md b/doc/de/Improve-Performance.md index d9be4fca6e..df90437e74 100644 --- a/doc/de/Improve-Performance.md +++ b/doc/de/Improve-Performance.md @@ -95,6 +95,6 @@ Nutze externe Dokumente, um eine detailiertere Erklärung für die Einrichtung e ### Database -Es gibt Skripte wie [tuning-primer.sh](http://www.day32.com/MySQL/) und [mysqltuner.pl](http://mysqltuner.pl), die den Datenbankserver analysieren und Hinweise darauf geben, welche Werte verändert werden könnten. +Es gibt Skripte wie [tuning-primer.sh](https://github.com/BMDan/tuning-primer.sh) und [mysqltuner.pl](https://github.com/major/MySQLTuner-perl/blob/master/mysqltuner.pl), die den Datenbankserver analysieren und Hinweise darauf geben, welche Werte verändert werden könnten. Aktivere hierfür die "Slow query" Log-Datei, um Performanceprobleme zu erkennen. From 10687244be96817728b968c1980c84633cdb6cbe Mon Sep 17 00:00:00 2001 From: bkil Date: Sat, 25 Mar 2023 14:31:11 +0100 Subject: [PATCH 003/326] doc/Install.md: link to guides for Ubuntu 22.04, systemd and Unraid --- doc/Install.md | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/Install.md b/doc/Install.md index d0c3576ac8..6b1fff9144 100644 --- a/doc/Install.md +++ b/doc/Install.md @@ -51,10 +51,13 @@ For alternative server configurations (such as Nginx server and MariaDB database ### Alternative Installation Methods This guide will walk you through the manual installation process of Friendica. -If this is nothing for you, you might be interested in +If this is nothing for you, you might be interested in the following: -* the [Friendica Docker image](https://github.com/friendica/docker) or -* how to [install Friendica with YunoHost](https://github.com/YunoHost-Apps/friendica_ynh). +* the [Friendica Docker image](https://github.com/friendica/docker) +* how to [install Friendica with YunoHost](https://github.com/YunoHost-Apps/friendica_ynh) +* [Tutorial: Creating a Friendica Server with Ubuntu 22.04](https://nequalsonelifestyle.com/2022/07/30/creating-friendica-server-ubuntu/) + * [Setting Up Friendica Daemon as a Systemd Service Tutorial](https://nequalsonelifestyle.com/2022/08/04/setting-up-friendica-daemon-systemd-service/) +* [Setting up Friendica on Unraid](https://www.jenovarain.com/2023/03/setting-up-friendica-on-unraid/) (NAS) ### Get Friendica From 60a719cffa9a08a024d075fc4037f986130d7267 Mon Sep 17 00:00:00 2001 From: bkil Date: Sat, 25 Mar 2023 14:34:26 +0100 Subject: [PATCH 004/326] doc/Install.md: more troubleshooting config keys for previous entries --- doc/Install.md | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) diff --git a/doc/Install.md b/doc/Install.md index 6b1fff9144..de4ef1b652 100644 --- a/doc/Install.md +++ b/doc/Install.md @@ -466,9 +466,11 @@ After that, restart mysql and try again. ### Your worker never or rarely runs -Friendica is coded to always play nice. It checks whether the host machine is idle enough and if it _seems_ to be overloaded, it intermittently refuses to process the worker queue. +Friendica is coded to always play nice. +It checks whether the host machine is idle enough and if it _seems_ to be overloaded, it intermittently refuses to process the worker queue. -Such checks originate from the days of single-user single-core machines and involves thresholds that you should adjust based on the number of exclusive CPU cores you have. See this issue for more information: +Such checks originate from the days of single-user single-core machines and involves thresholds that you should adjust based on the number of exclusive CPU cores you have. +See this issue for more information: * https://github.com/friendica/friendica/issues/10131 @@ -485,28 +487,40 @@ You tried to upload an image up to 100kB and it failed. You may not have the ownership or file mode set correctly if you are using the file system storage backend. -Change the backend to database. If this solves it, that is what needs to be fixed. +Change the backend to database. +If this solves it, that is what needs to be fixed. + +Verify in your PHP ini: + +* `file_uploads`: should be `1` +* `upload_tmp_dir`: should be writable (falls back to system default temp) and not blocked by `open_basedir` ### Error uploading large files You may find `413 Request Entity Too Large` or `500 Internal Error` in the network inspector of the browser if the file is too large, for example if it is a video. -First try to upload a very small file, up to 100kB. If that succeeds, you will need to increase limits at multiple places, including on any web proxy that you are using. +First try to upload a very small file, up to 100kB. +If that succeeds, you will need to increase limits at multiple places, including on any web proxy that you are using. +Which one applies to you depends on your installation. In your PHP ini: * `upload_max_filesize`: defaults to 2MB * `post_max_size`: defaults to 8MB, must be greater than `upload_max_filesize` * `memory_limit`: defaults to 128MB, must be greater than `post_max_size` +* `max_input_time`: time limit of an upload, defaults to -1, meaning it uses `max_execution_time` instead +* `max_execution_time`: defaults to 30 seconds, should be enough if you also set `max_input_time` You should verify whether you changed them in the _right file_ by checking the web interface at the end of the overview on the `Admin` panel. -For Apache2: +In your Apache2 config: * `LimitRequestBody`: defaults to unlimited +* `FcgidMaxRequestLen`: defaults to 128kB * `SSLRenegBufferSize`: defaults to 128kB, only if your site uses TLS and perhaps only when using `SSLVerifyClient` or `SSLVerifyDepth` +* Remove `LoadModule reqtimeout_module modules / mod_reqtimeout.so` or adjust `RequestReadTimeout`: defaults to 20 seconds and >= 500 byte/second -For nginx: +In your nginx config: * `client_max_body_size`: defaults to 1MB @@ -514,7 +528,10 @@ If you are using the database backend for storage, increase this in your SQL con * `max_allowed_packet`: defaults to 32MB -If you use the ModSecurity WAF: +In your ModSecurity WAF config: * `SecRequestBodyLimit`: defaults to 12MB * `SecRequestBodyNoFilesLimit`: defaults to 128kB, should not apply to Friendica + +In the end, you will need to restart all services that you have changed configuration for. +If you don't know which ones these are, just reboot. From 0ed26d6258e1b2378e5021709b57fb0a50698d27 Mon Sep 17 00:00:00 2001 From: bkil Date: Sat, 25 Mar 2023 14:37:18 +0100 Subject: [PATCH 005/326] doc/Install.md: troubleshooting: Diaspora support, DB migration timeout --- doc/Install.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/doc/Install.md b/doc/Install.md index de4ef1b652..51cddf4536 100644 --- a/doc/Install.md +++ b/doc/Install.md @@ -535,3 +535,21 @@ In your ModSecurity WAF config: In the end, you will need to restart all services that you have changed configuration for. If you don't know which ones these are, just reboot. + +### Diaspora support is not activated + +You get this error when you try to add a Diaspora contact. + +You can enable it from the web interface in `Admin -> Site -> Policies -> Enable diaspora* support`. +You may also set it manually in the config file or in the database within the `diaspora_enabled` key of the `system` category. + +### Upgrade failed due to DB migration timeout + +Altering of a table may fail if it contains a large number of rows. +First verify the existing timeout (50s by default): + +`show global variables like "innodb_lock_wait_timeout";` + +Then increase it: + +`set global innodb_lock_wait_timeout=600;` From bdafe063d817cc594b7e4ce0ac405f0761ae1fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 26 Mar 2023 09:08:03 +0200 Subject: [PATCH 006/326] Return `disliked` in Mastodon API MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- doc/API-Friendica.md | 16 +++++++++------- doc/API-Mastodon.md | 7 ++++--- src/Factory/Api/Mastodon/Status.php | 12 ++++++++++-- .../Api/Mastodon/Status/FriendicaExtension.php | 6 ++++++ 4 files changed, 29 insertions(+), 12 deletions(-) diff --git a/doc/API-Friendica.md b/doc/API-Friendica.md index a33cd53b86..226b1a11ea 100644 --- a/doc/API-Friendica.md +++ b/doc/API-Friendica.md @@ -135,7 +135,7 @@ Alias of [`api/conversation/show`](#GET+api%2Fconversation%2Fshow). ### GET api/statusnet/config -Returns the public Friendica node configuration. +Returns the public Friendica node configuration. ### GET api/gnusocial/config @@ -604,7 +604,7 @@ Sets item table entries for this photo to deleted = 1. On success: -* JSON return +* JSON return ```json { @@ -633,7 +633,7 @@ Deletes all images with the specified album name, is not reversible -> ensure th On success: -* JSON return +* JSON return ```json { @@ -682,7 +682,7 @@ Get a list of photo albums for the user #### Parameters -None +None #### Return values On success a list of photo album objects: @@ -839,7 +839,8 @@ A Mastodon [Status Entity](https://docs.joinmastodon.org/entities/Status/) "poll": null, "friendica": { "title": "", - "dislikes_count": 1 + "dislikes_count": 1, + "disliked": true } } ``` @@ -886,7 +887,7 @@ Removes the dislike mark (if it exists) on this status for this user A Mastodon [Status Entity](https://docs.joinmastodon.org/entities/Status/) #### Example: -`https:///api/friendica/statuses/341/dislike` +`https:///api/friendica/statuses/341/undislike` ```json { @@ -913,7 +914,8 @@ A Mastodon [Status Entity](https://docs.joinmastodon.org/entities/Status/) "poll": null, "friendica": { "title": "", - "dislikes_count": 0 + "dislikes_count": 0, + "disliked": false } } ``` diff --git a/doc/API-Mastodon.md b/doc/API-Mastodon.md index 5fcb4782c5..12efc2f086 100644 --- a/doc/API-Mastodon.md +++ b/doc/API-Mastodon.md @@ -39,7 +39,7 @@ Extensions to the [Mastodon Instance::V2 Entities](https://docs.joinmastodon.org * `codename`: The Friendica version code name * `db_version`: The database schema version number -Example: +Example: ```json { "domain": "friendicadevtest1.myportal.social", @@ -68,6 +68,7 @@ Extensions to the [Mastodon Status Entities](https://docs.joinmastodon.org/entit * `delivery_queue_done`: Total number of remote servers that have successfully been federated to so far. * `delivery_queue_failed`: Total number of remote servers that have we failed to federate to so far. * `dislikes_count`: The number of dislikes that a status has accumulated according to the server. + * `disliked`: Whethere the user disliked the status. Example: ```json @@ -117,7 +118,7 @@ Example: "title": "", "delivery_data": { "delivery_queue_count": 10, - "delivery_queue_done": 3, + "delivery_queue_done": 3, "delivery_queue_failed": 0 }, "dislikes_count": 0 @@ -213,7 +214,7 @@ Example: - Additionally to the static values `public`, `unlisted` and `private`, the `visibility` parameter can contain a numeric value with a group id. - Additional field `quote_id` for the post that is being quote reshared - Additional fields `friendica` for Friendica specific parameters: - - `title`: Explicitly sets the title for a post status, ignored if used on a comment status. For post statuses the legacy behavior is to use any "spoiler text" as the title if it is provided. If both the title and spoiler text are provided for a post status then they will each be used for their respective roles. If no title is provided then the legacy behavior will persist. If you want to create a post with no title but spoiler text then explicitly set the title but set it to an empty string `""`. + - `title`: Explicitly sets the title for a post status, ignored if used on a comment status. For post statuses the legacy behavior is to use any "spoiler text" as the title if it is provided. If both the title and spoiler text are provided for a post status then they will each be used for their respective roles. If no title is provided then the legacy behavior will persist. If you want to create a post with no title but spoiler text then explicitly set the title but set it to an empty string `""`. - [`GET /api/v1/statuses/:id`](https://docs.joinmastodon.org/methods/statuses/#get) - [`DELETE /api/v1/statuses/:id`](https://docs.joinmastodon.org/methods/statuses/#delete) - [`GET /api/v1/statuses/:id/context`](https://docs.joinmastodon.org/methods/statuses/#context) diff --git a/src/Factory/Api/Mastodon/Status.php b/src/Factory/Api/Mastodon/Status.php index 62941978ec..1199b0495e 100644 --- a/src/Factory/Api/Mastodon/Status.php +++ b/src/Factory/Api/Mastodon/Status.php @@ -177,6 +177,14 @@ class Status extends BaseFactory 'vid' => Verb::getID(Activity::LIKE), 'deleted' => false ]); + $origin_dislike = ($count_like == 0) ? false : Post::exists([ + 'thr-parent-id' => $uriId, + 'uid' => $uid, + 'origin' => true, + 'gravity' => Item::GRAVITY_ACTIVITY, + 'vid' => Verb::getID(Activity::DISLIKE), + 'deleted' => false + ]); $origin_announce = ($count_announce == 0) ? false : Post::exists([ 'thr-parent-id' => $uriId, 'uid' => $uid, @@ -295,7 +303,7 @@ class Status extends BaseFactory $aclFormatter = DI::aclFormatter(); $delivery_data = $uid != $item['uid'] ? null : new FriendicaDeliveryData($item['delivery_queue_count'], $item['delivery_queue_done'], $item['delivery_queue_failed']); $visibility_data = $uid != $item['uid'] ? null : new FriendicaVisibility($aclFormatter->expand($item['allow_cid']), $aclFormatter->expand($item['deny_cid']), $aclFormatter->expand($item['allow_gid']), $aclFormatter->expand($item['deny_gid'])); - $friendica = new FriendicaExtension($item['title'], $item['changed'], $item['commented'], $item['received'], $counts->dislikes, $delivery_data, $visibility_data); + $friendica = new FriendicaExtension($item['title'], $item['changed'], $item['commented'], $item['received'], $counts->dislikes, $origin_dislike, $delivery_data, $visibility_data); return new \Friendica\Object\Api\Mastodon\Status($item, $account, $counts, $userAttributes, $sensitive, $application, $mentions, $tags, $card, $attachments, $in_reply, $reshare, $friendica, $quote, $poll); } @@ -361,7 +369,7 @@ class Status extends BaseFactory $attachments = []; $in_reply = []; $reshare = []; - $friendica = new FriendicaExtension('', null, null, null, 0, null, null); + $friendica = new FriendicaExtension('', null, null, null, 0, false, null, null); return new \Friendica\Object\Api\Mastodon\Status($item, $account, $counts, $userAttributes, $sensitive, $application, $mentions, $tags, $card, $attachments, $in_reply, $reshare, $friendica); } diff --git a/src/Object/Api/Mastodon/Status/FriendicaExtension.php b/src/Object/Api/Mastodon/Status/FriendicaExtension.php index be49fe3c55..510abdcc0d 100644 --- a/src/Object/Api/Mastodon/Status/FriendicaExtension.php +++ b/src/Object/Api/Mastodon/Status/FriendicaExtension.php @@ -47,6 +47,7 @@ class FriendicaExtension extends BaseDataTransferObject /** @var FriendicaDeliveryData|null */ protected $delivery_data; + /** @var int */ protected $dislikes_count; /** @@ -54,6 +55,8 @@ class FriendicaExtension extends BaseDataTransferObject */ protected $visibility; + /** @var bool */ + protected $disliked = false; /** * Creates a FriendicaExtension object @@ -64,6 +67,7 @@ class FriendicaExtension extends BaseDataTransferObject * @param string|null $edited_at * @param string|null $received_at * @param int $dislikes_count + * @param bool $disliked * @param FriendicaDeliveryData|null $delivery_data * @param FriendicaVisibility|null $visibility */ @@ -73,6 +77,7 @@ class FriendicaExtension extends BaseDataTransferObject ?string $commented_at, ?string $received_at, int $dislikes_count, + bool $disliked, ?FriendicaDeliveryData $delivery_data, ?FriendicaVisibility $visibility ) { @@ -82,6 +87,7 @@ class FriendicaExtension extends BaseDataTransferObject $this->received_at = $received_at ? DateTimeFormat::utc($received_at, DateTimeFormat::JSON) : null; $this->delivery_data = $delivery_data; $this->dislikes_count = $dislikes_count; + $this->disliked = $disliked; $this->visibility = $visibility; } From 154f91c6c168c85d0a51f46b1489421d01941f2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 26 Mar 2023 19:08:38 +0200 Subject: [PATCH 007/326] Apply suggestions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- doc/API-Mastodon.md | 2 +- src/Factory/Api/Mastodon/Status.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/API-Mastodon.md b/doc/API-Mastodon.md index 12efc2f086..05a5af521f 100644 --- a/doc/API-Mastodon.md +++ b/doc/API-Mastodon.md @@ -68,7 +68,7 @@ Extensions to the [Mastodon Status Entities](https://docs.joinmastodon.org/entit * `delivery_queue_done`: Total number of remote servers that have successfully been federated to so far. * `delivery_queue_failed`: Total number of remote servers that have we failed to federate to so far. * `dislikes_count`: The number of dislikes that a status has accumulated according to the server. - * `disliked`: Whethere the user disliked the status. + * `disliked`: Whether the API user disliked the status. Example: ```json diff --git a/src/Factory/Api/Mastodon/Status.php b/src/Factory/Api/Mastodon/Status.php index 1199b0495e..4c9553e65f 100644 --- a/src/Factory/Api/Mastodon/Status.php +++ b/src/Factory/Api/Mastodon/Status.php @@ -175,15 +175,15 @@ class Status extends BaseFactory 'origin' => true, 'gravity' => Item::GRAVITY_ACTIVITY, 'vid' => Verb::getID(Activity::LIKE), - 'deleted' => false + 'deleted' => false ]); - $origin_dislike = ($count_like == 0) ? false : Post::exists([ + $origin_dislike = ($count_dislike == 0) ? false : Post::exists([ 'thr-parent-id' => $uriId, 'uid' => $uid, 'origin' => true, 'gravity' => Item::GRAVITY_ACTIVITY, 'vid' => Verb::getID(Activity::DISLIKE), - 'deleted' => false + 'deleted' => false ]); $origin_announce = ($count_announce == 0) ? false : Post::exists([ 'thr-parent-id' => $uriId, From ddf5e0641a6dcf7f1027f4e90b48722b34ece445 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 26 Mar 2023 21:54:05 +0200 Subject: [PATCH 008/326] Move MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- src/Object/Api/Mastodon/Status/FriendicaExtension.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Object/Api/Mastodon/Status/FriendicaExtension.php b/src/Object/Api/Mastodon/Status/FriendicaExtension.php index 510abdcc0d..e00399a9b7 100644 --- a/src/Object/Api/Mastodon/Status/FriendicaExtension.php +++ b/src/Object/Api/Mastodon/Status/FriendicaExtension.php @@ -50,14 +50,15 @@ class FriendicaExtension extends BaseDataTransferObject /** @var int */ protected $dislikes_count; + + /** @var bool */ + protected $disliked = false; + /** * @var FriendicaVisibility|null */ protected $visibility; - /** @var bool */ - protected $disliked = false; - /** * Creates a FriendicaExtension object * From c65e8d03b5c0a627a8fc137b11288763f147f8b2 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 21 Mar 2023 23:16:37 -0400 Subject: [PATCH 009/326] spelling: abandoned Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- static/settings.config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/settings.config.php b/static/settings.config.php index 04994bc73e..2ee58e051b 100644 --- a/static/settings.config.php +++ b/static/settings.config.php @@ -48,7 +48,7 @@ return [ ], 'system' => [ // account_abandon_days (Integer) - // Will not waste system resources polling external sites for abandonded accounts. + // Will not waste system resources polling external sites for abandoned accounts. // Enter 0 for no time limit. 'account_abandon_days' => 0, From 1ac0b8762e576ebe26a59452fdcb1d3bbe0b0578 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 21 Mar 2023 23:16:49 -0400 Subject: [PATCH 010/326] spelling: acquire Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/App/Router.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App/Router.php b/src/App/Router.php index 0bd66d40f9..6d90fb0138 100644 --- a/src/App/Router.php +++ b/src/App/Router.php @@ -412,7 +412,7 @@ class Router } if (!$this->lock->acquire('getCachedDispatchData', 0)) { - // Immediately return uncached data when we can't aquire a lock + // Immediately return uncached data when we can't acquire a lock return $this->getDispatchData(); } From 07862b8a8840e2e7f833cd7ef670fb442d865860 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 21 Mar 2023 23:16:39 -0400 Subject: [PATCH 011/326] spelling: activity Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- spec/zot.txt | 2 +- src/Model/Nodeinfo.php | 2 +- src/Model/User.php | 2 +- view/theme/vier/mobile.css | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/zot.txt b/spec/zot.txt index 2c3bbb1800..e1e4640c90 100644 --- a/spec/zot.txt +++ b/spec/zot.txt @@ -353,7 +353,7 @@ Salmon Magic Envelope Atom Activity Stream Draft http://activitystrea.ms/specs/atom/1.0/ -Activty Stream Base Schema +Activity Stream Base Schema http://activitystrea.ms/head/activity-schema.html WebFinger Protocol diff --git a/src/Model/Nodeinfo.php b/src/Model/Nodeinfo.php index 51692f0163..4dbe06c9b3 100644 --- a/src/Model/Nodeinfo.php +++ b/src/Model/Nodeinfo.php @@ -67,7 +67,7 @@ class Nodeinfo DI::keyValue()->set('nodeinfo_local_posts', $posts); DI::keyValue()->set('nodeinfo_local_comments', $comments); - $logger->info('User actitivy', ['posts' => $posts, 'comments' => $comments]); + $logger->info('User activity', ['posts' => $posts, 'comments' => $comments]); } /** diff --git a/src/Model/User.php b/src/Model/User.php index 50586183a3..80c8f60b89 100644 --- a/src/Model/User.php +++ b/src/Model/User.php @@ -684,7 +684,7 @@ class User if ($user['last-activity'] != $current_day) { User::update(['last-activity' => $current_day], $uid); - // Set the last actitivy for all identities of the user + // Set the last activity for all identities of the user DBA::update('user', ['last-activity' => $current_day], ['parent-uid' => $uid, 'account_removed' => false]); } } diff --git a/view/theme/vier/mobile.css b/view/theme/vier/mobile.css index 6a70d55b14..e49cff9ee4 100644 --- a/view/theme/vier/mobile.css +++ b/view/theme/vier/mobile.css @@ -1,4 +1,4 @@ -aside, header, #nav-search-box, #nav-admin-link, #nav-messages-linkmenu, #activitiy-by-date-tab, #shared-links-tab, #nav-logout-link, +aside, header, #nav-search-box, #nav-admin-link, #nav-messages-linkmenu, #activity-by-date-tab, #shared-links-tab, #nav-logout-link, .wall-item-location { display: none; } From 29e74b3061af1374dce2e697aa0ebaf0e053e3e1 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 21 Mar 2023 23:16:41 -0400 Subject: [PATCH 012/326] spelling: actor Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/Protocol/ActivityPub/Transmitter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Protocol/ActivityPub/Transmitter.php b/src/Protocol/ActivityPub/Transmitter.php index fb4ed0b4c0..5498f162e8 100644 --- a/src/Protocol/ActivityPub/Transmitter.php +++ b/src/Protocol/ActivityPub/Transmitter.php @@ -444,7 +444,7 @@ class Transmitter } /** - * Get a minimal actror array for the C2S API + * Get a minimal actor array for the C2S API * * @param integer $cid * @return array From 01e1e9b67642267c70291860afbdc48fd9858f77 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 21 Mar 2023 23:16:43 -0400 Subject: [PATCH 013/326] spelling: additional Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/Module/Delegation.php | 2 +- view/theme/frio/css/style.css | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Module/Delegation.php b/src/Module/Delegation.php index 0003ae08be..3595ff7f30 100644 --- a/src/Module/Delegation.php +++ b/src/Module/Delegation.php @@ -120,7 +120,7 @@ class Delegation extends BaseModule $identities = User::identities(DI::userSession()->getSubManagedUserId() ?: DI::userSession()->getLocalUserId()); - //getting additinal information for each identity + //getting additional information for each identity foreach ($identities as $key => $identity) { $identities[$key]['thumb'] = User::getAvatarUrl($identity, Proxy::SIZE_THUMB); diff --git a/view/theme/frio/css/style.css b/view/theme/frio/css/style.css index a12c2ae6a8..69ac73e467 100644 --- a/view/theme/frio/css/style.css +++ b/view/theme/frio/css/style.css @@ -1790,7 +1790,7 @@ blockquote.shared_content { font-weight: 500; color: $font_color_darker; } -.media .media-body .addional-info a { +.media .media-body .additional-info a { display: block; } .media .contact-info-comment { From f83fb1deb7c93c2271707d727be46aee7601e979 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 21 Mar 2023 23:16:42 -0400 Subject: [PATCH 014/326] spelling: addresses Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/smarty3-templates.md | 2 +- spec/zot.txt | 2 +- src/Protocol/Relay.php | 2 +- static/defaults.config.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/smarty3-templates.md b/doc/smarty3-templates.md index f3f7c3e608..4d50eb7d45 100644 --- a/doc/smarty3-templates.md +++ b/doc/smarty3-templates.md @@ -37,7 +37,7 @@ Form Templates To guarantee a consistent look and feel for input forms, i.e. in the settings sections, there are templates for the basic form fields. They are initialized with an array of data, depending on the tyle of the field. -All of these take an array holding the values, e.g. for a one line text input field, which is required and should be used to type email addesses use something along the lines of: +All of these take an array holding the values, e.g. for a one line text input field, which is required and should be used to type email addresses use something along the lines of: '$adminmail' => array('adminmail', DI::l10n()->t('Site administrator email address'), $adminmail, DI::l10n()->t('Your account email address must match this in order to use the web admin panel.'), 'required', '', 'email'), diff --git a/spec/zot.txt b/spec/zot.txt index e1e4640c90..af82b0b36a 100644 --- a/spec/zot.txt +++ b/spec/zot.txt @@ -127,7 +127,7 @@ MUST be present. Z-To: zot:bob@example.com, zot:alice@example.com, mailto:dave@example.com Z-Bcc: zot:https://example.com/profile/richard -are valid entries. Adresses are comma separated and individual entries MUST NOT +are valid entries. Addresses are comma separated and individual entries MUST NOT contain commas. There MAY be any number of ASCII space characters between entries for legibility. Header lines are terminated with a linefeed character (ASCII 0x0A). diff --git a/src/Protocol/Relay.php b/src/Protocol/Relay.php index 028a7885bb..dda7ddbdcd 100644 --- a/src/Protocol/Relay.php +++ b/src/Protocol/Relay.php @@ -302,7 +302,7 @@ class Relay DBA::close($tagserver); } - // All adresses with the given id + // All addresses with the given id if (!empty($tagserverlist)) { $servers = DBA::select('gserver', ['id', 'url', 'network'], ['relay-subscribe' => true, 'relay-scope' => 'tags', 'id' => $tagserverlist]); while ($server = DBA::fetch($servers)) { diff --git a/static/defaults.config.php b/static/defaults.config.php index 4fb96cfce2..0b8ed0a6f3 100644 --- a/static/defaults.config.php +++ b/static/defaults.config.php @@ -106,7 +106,7 @@ return [ 'always_show_preview' => false, // ap_always_bcc (Boolean) - // Adresses non-mentioned ActivityPub receivers by BCC instead of CC. Increases privacy, decreases performance. + // Addresses non-mentioned ActivityPub receivers by BCC instead of CC. Increases privacy, decreases performance. 'ap_always_bcc' => false, // archival_days (Integer) From 6e105fbec1fd415ca9ced0b41f1343fa538f93de Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 21 Mar 2023 23:07:09 -0400 Subject: [PATCH 015/326] spelling: advanced Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- view/theme/frio/templates/admin/site.tpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/theme/frio/templates/admin/site.tpl b/view/theme/frio/templates/admin/site.tpl index 95eba383ac..4d0553b0c6 100644 --- a/view/theme/frio/templates/admin/site.tpl +++ b/view/theme/frio/templates/admin/site.tpl @@ -177,7 +177,7 @@ * Corporate */ -->
-