diff --git a/irc/irc.php b/irc/irc.php index a0cb899e..db808a99 100644 --- a/irc/irc.php +++ b/irc/irc.php @@ -74,7 +74,6 @@ function irc_content() { $baseurl = DI::baseUrl() . '/addon/irc'; $o = ''; - $usernick = ''; /* set the list of popular channels */ if (DI::userSession()->getLocalUserId()) { @@ -82,7 +81,6 @@ function irc_content() if (!$sitechats) { $sitechats = DI::config()->get('irc', 'sitechats'); } - $usernick = "nick=" . DI::userSession()->getLocalUserNickname() . "&"; } else { $sitechats = DI::config()->get('irc','sitechats'); } @@ -119,7 +117,7 @@ function irc_content() $o .= <<< EOT
A beginner's guide to using IRC. [en]
- + EOT; return $o; diff --git a/mailstream/mailstream.php b/mailstream/mailstream.php index 7f68b7cc..a5aafdc7 100644 --- a/mailstream/mailstream.php +++ b/mailstream/mailstream.php @@ -166,35 +166,7 @@ function mailstream_send_hook(array $data) return; } - $author = DBA::selectFirst('contact', ['nick', 'blocked', 'uri-id'], ['id' => $data['author-id'], 'self' => false]); - if (!DBA::isResult($author)) { - DI::logger()->error('could not find author', ['guid' => $item['guid'], 'author-id' => $data['author-id']]); - return; - } - if ($author['blocked']) { - DI::logger()->info('author is blocked', ['guid' => $item['guid'], 'author-id' => $data['author-id']]); - return; - } - $collapsed = false; - $user_contact = DBA::selectFirst('user-contact', ['cid', 'blocked', 'ignored', 'collapsed'], ['uid' => $item['uid'], 'uri-id' => $item['author-uri-id']]); - if (!DBA::isResult($user_contact)) { - $user_contact = DBA::selectFirst('user-contact', ['cid', 'blocked', 'ignored', 'collapsed'], ['uid' => $item['uid'], 'cid' => $item['author-id']]); - } - if (DBA::isResult($user_contact)) { - if ($user_contact['blocked']) { - DI::logger()->info('author is blocked', ['guid' => $item['guid'], 'cid' => $user_contact['cid']]); - return; - } - if ($user_contact['ignored']) { - DI::logger()->info('author is ignored', ['guid' => $item['guid'], 'cid' => $user_contact['cid']]); - return; - } - if ($user_contact['collapsed']) { - $collapsed = true; - } - } - - if (!mailstream_send($data['message_id'], $item, $user, $collapsed)) { + if (!mailstream_send($data['message_id'], $item, $user)) { DI::logger()->debug('send failed, will retry', $data); if (!Worker::defer()) { DI::logger()->error('failed and could not defer', $data); @@ -248,7 +220,6 @@ function mailstream_post_hook(array &$item) $send_hook_data = [ 'uid' => $item['uid'], 'contact-id' => $item['contact-id'], - 'author-id' => $item['author-id'], 'uri' => $item['uri'], 'message_id' => $message_id, 'tries' => 0, @@ -435,11 +406,10 @@ function mailstream_subject(array $item): string * @param string $message_id ID of the message (RFC 1036) * @param array $item content of the item * @param array $user results from the user table - * @param bool $collapsed true if the content should be hidden * * @return bool True if this message has been completed. False if it should be retried. */ -function mailstream_send(string $message_id, array $item, array $user, bool $collapsed): bool +function mailstream_send(string $message_id, array $item, array $user): bool { if (!is_array($item)) { DI::logger()->error('item is empty', ['message_id' => $message_id]); @@ -457,16 +427,10 @@ function mailstream_send(string $message_id, array $item, array $user, bool $col require_once(dirname(__file__) . '/phpmailer/class.phpmailer.php'); - if ($collapsed) { - $item['body'] = DI::l10n()->t('Content from %s is collapsed', $item['author-name']); - } else { - $item['body'] = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']); - } + $item['body'] = Post\Media::addAttachmentsToBody($item['uri-id'], $item['body']); $attachments = []; - if (!$collapsed) { - mailstream_do_images($item, $attachments); - } + mailstream_do_images($item, $attachments); $frommail = DI::config()->get('mailstream', 'frommail'); if ($frommail == '') { $frommail = 'friendica@localhost.local'; diff --git a/quickphoto/README.md b/quickphoto/README.md deleted file mode 100644 index 34af0e71..00000000 --- a/quickphoto/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# QuickPhoto Addon for Friendica - -QuickPhoto is a Friendica addon that simplifies working with images in the editor. It automatically replaces long, cumbersome BBCode structures with a compact shorthand notation, without affecting functionality or compatibility. - ---- - -## Features - -- **Automatic Simplification:** Converts "monster BBCodes" like `[url=...][img=...]...[/img][/url]` instantly into the handy format `[img]|filename description[/img]`. -- **Intelligent Reconstruction:** Before submitting or previewing, the shorthand code is quickly converted back into the original, valid Friendica BBCode. -- **Real-Time Processing:** Responds immediately to drag & drop, copy & paste, and inserting images via editor buttons. -- **Focus Safety:** Cursor management ensures the focus remains stable during automatic conversion while typing. -- **Maximum Compatibility:** Supports both the standard Jot editor and the Compose module, as well as reply fields. -- **Local Cache:** Image data is securely stored in the browser's localStorage and automatically cleared after 12 hours. - ---- - -## How It Works - -The addon operates in a hybrid manner: - -- **Frontend:** A JavaScript watcher scans textareas and simplifies complex image links for better readability while writing. -- **Interface:** It integrates deeply with Friendica's jQuery functions to ensure that preview and save functions always receive the correct original data. -- **Events:** By intercepting submit and preview clicks, it guarantees that shorthand codes are never sent to the server in a format it cannot interpret. - ---- - -## Installation - -1. Create a folder named `quickphoto` in the `addon/` directory of your Friendica installation. -2. Place the file `quickphoto.php` in this folder. -3. Place the file `quickphoto.js` in the same folder. -4. Enable the addon in the Friendica administration area under **Addons**. - - --- - -MIT License - -Copyright (c) 2024-2026 Friendica Project & Contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/quickphoto/lang/C/messages.po b/quickphoto/lang/C/messages.po deleted file mode 100644 index 75476018..00000000 --- a/quickphoto/lang/C/messages.po +++ /dev/null @@ -1,22 +0,0 @@ -# ADDON quickphoto -# Copyright (C) -# This file is distributed under the same license as the Friendica quickphoto addon package. -# -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: \n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2026-03-07 10:18+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME