]> git.mxchange.org Git - friendica.git/commitdiff
Merge remote-tracking branch 'upstream/2023.09-rc' into smilies
authorMichael <heluecht@pirati.ca>
Thu, 12 Oct 2023 20:49:20 +0000 (20:49 +0000)
committerMichael <heluecht@pirati.ca>
Thu, 12 Oct 2023 20:49:20 +0000 (20:49 +0000)
1  2 
src/Content/Text/BBCode.php
src/Protocol/Relay.php

Simple merge
index 8bcced7567cc163a0acde3238654ef6853703248,c4432e59a3817dbd470c751dd4b72fca7b209f77..bf48352019c947fbcea1440ce0b1747544e2fc94
@@@ -154,17 -166,14 +167,19 @@@ class Rela
         * Detect the language of a post and decide if the post should be accepted
         *
         * @param string $body
+        * @param int    $uri_id
+        * @param int    $author_id
         * @return boolean
         */
-       public static function isWantedLanguage(string $body)
+       public static function isWantedLanguage(string $body, int $uri_id = 0, int $author_id = 0)
        {
 +              if (empty($body) || Smilies::isEmojiPost($body)) {
 +                      Logger::debug('Empty body or only emojis', ['body' => $body]);
 +                      return true;
 +              }
 +
                $languages = [];
-               foreach (Item::getLanguageArray($body, 10) as $language => $reliability) {
+               foreach (Item::getLanguageArray($body, 10, $uri_id, $author_id) as $language => $reliability) {
                        if ($reliability > 0) {
                                $languages[] = $language;
                        }