]> git.mxchange.org Git - friendica.git/blobdiff - src/Object/Post.php
Fix typo in "in reply to" base translation string
[friendica.git] / src / Object / Post.php
index dd3074cfa32a0e06d4ac785b35e4b10c5f93cc03..c5a4be9d780bcadca093e4ecdcadfbd74566e8fe 100644 (file)
@@ -164,7 +164,7 @@ class Post
         * @throws \Friendica\Network\HTTPException\InternalServerErrorException
         * @throws \ImagickException
         */
-       public function getTemplateData(array $conv_responses, string $formSecurityToken, int $thread_level = 1)
+       public function getTemplateData(array $conv_responses, string $formSecurityToken, int $thread_level = 1, string $parent_guid = "", string $parent_username = "")
        {
                $item = $this->getData();
                $edited = false;
@@ -497,6 +497,8 @@ class Post
                }
 
                $tmp_item = [
+                       'parentguid'      => $parent_guid,
+                       'isreplyto'       => DI::l10n()->t('in reply to %s', $parent_username),
                        'template'        => $this->getTemplate(),
                        'type'            => implode('', array_slice(explode('/', $item['verb']), -1)),
                        'comment_firstcollapsed' => false,
@@ -610,7 +612,7 @@ class Post
                $nb_children = count($children);
                if ($nb_children > 0) {
                        foreach ($children as $child) {
-                               $result['children'][] = $child->getTemplateData($conv_responses, $formSecurityToken, $thread_level + 1);
+                               $result['children'][] = $child->getTemplateData($conv_responses, $formSecurityToken, $thread_level + 1, $tmp_item['guid'], $tmp_item['name']);
                        }
 
                        // Collapse