From 539ac4f2b82e661d63b17c5276550ba6120806fe Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 10 Dec 2022 21:23:21 +0000 Subject: [PATCH 1/2] Fix "part" calculation for splitted posts --- src/Content/Text/Plaintext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Content/Text/Plaintext.php b/src/Content/Text/Plaintext.php index ef2337faf4..af8e9c00fe 100644 --- a/src/Content/Text/Plaintext.php +++ b/src/Content/Text/Plaintext.php @@ -303,7 +303,7 @@ class Plaintext $limit += mb_strlen(trim($word)) - self::URL_LENGTH; } - if ((mb_strlen($part . $word) > $limit - 8) && (mb_strlen($part . $word . $message) > $limit)) { + if ((mb_strlen($part . $word) > $limit - 8) && ($parts || (mb_strlen($part . $word . $message) > $limit))) { $parts[] = trim($part); $part = ''; $limit = $baselimit; From 1a1e452faec7b06bc2be49289620cd59ac210c67 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 10 Dec 2022 21:48:00 +0000 Subject: [PATCH 2/2] Issue 11875: Fetch post on activity --- src/Model/Item.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Item.php b/src/Model/Item.php index 8b9909f8bf..d9bd72d7c7 100644 --- a/src/Model/Item.php +++ b/src/Model/Item.php @@ -1629,7 +1629,7 @@ class Item if (($uid != 0) && (($item['gravity'] == self::GRAVITY_PARENT) || $is_reshare) && DI::pConfig()->get($uid, 'system', 'accept_only_sharer') == self::COMPLETION_NONE && - !in_array($item['post-reason'], [self::PR_FOLLOWER, self::PR_TAG, self::PR_TO, self::PR_CC])) { + !in_array($item['post-reason'], [self::PR_FOLLOWER, self::PR_TAG, self::PR_TO, self::PR_CC, self::PR_ACTIVITY])) { Logger::info('Contact is not a follower, thread will not be stored', ['author' => $item['author-link'], 'uid' => $uid, 'uri-id' => $uri_id, 'post-reason' => $item['post-reason']]); return 0; }