Show embedded objects after editing comments
authorMatthias Schmidt <gravatronics@live.com>
Thu, 10 Jun 2021 05:52:01 +0000 (07:52 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Thu, 10 Jun 2021 05:52:01 +0000 (07:52 +0200)
wcfsetup/install/files/lib/data/comment/CommentAction.class.php

index fc731c03b24659d3aaa16cd183dfd8da8a0d2d18..0c46b9fe9e79a5f826e3c8c2cae14e8aff351566 100644 (file)
@@ -1041,9 +1041,18 @@ class CommentAction extends AbstractDatabaseObjectAction implements IMessageInli
         ]);
         $action->executeAction();
 
+        $comment = new Comment($this->comment->getObjectID());
+
+        if ($comment->hasEmbeddedObjects) {
+            MessageEmbeddedObjectManager::getInstance()->loadObjects(
+                'com.woltlab.wcf.comment',
+                [$comment->getObjectID()]
+            );
+        }
+
         return [
             'actionName' => 'save',
-            'message' => (new Comment($this->comment->commentID))->getFormattedMessage(),
+            'message' => $comment->getFormattedMessage(),
         ];
     }