Merge pull request #9989 from annando/issue-9912
authorTobias Diekershoff <tobias.diekershoff@gmx.net>
Sat, 6 Mar 2021 13:04:28 +0000 (14:04 +0100)
committerGitHub <noreply@github.com>
Sat, 6 Mar 2021 13:04:28 +0000 (14:04 +0100)
Issue 9912: Process Markdown content from Peertube

1  2 
src/Model/Item.php

diff --combined src/Model/Item.php
@@@ -94,9 -94,9 +94,9 @@@ class Ite
                        'private', 'title', 'body', 'raw-body', 'location', 'coord', 'app',
                        'inform', 'deleted', 'extid', 'post-type', 'gravity',
                        'allow_cid', 'allow_gid', 'deny_cid', 'deny_gid',
 -                      'author-id', 'author-link', 'owner-id', 'owner-link', 'contact-uid',
 +                      'author-id', 'author-link', 'author-name', 'author-avatar', 'owner-id', 'owner-link', 'contact-uid',
                        'signed_text', 'network', 'wall', 'contact-id', 'plink', 'forum_mode', 'origin',
 -                      'thr-parent-id', 'parent-uri-id', 'postopts', 'pubmail', 
 +                      'thr-parent-id', 'parent-uri-id', 'postopts', 'pubmail',
                        'event-created', 'event-edited', 'event-start', 'event-finish',
                        'event-summary', 'event-desc', 'event-location', 'event-type',
                        'event-nofinish', 'event-adjust', 'event-ignore', 'event-id'];
         */
        private static function getLanguage(array $item)
        {
+               if (!empty($item['language'])) {
+                       return $item['language'];
+               }
                if (!in_array($item['gravity'], [GRAVITY_PARENT, GRAVITY_COMMENT]) || empty($item['body'])) {
                        return '';
                }