From e511ea6eca37e8da8655c6deed9534cd5cec68da Mon Sep 17 00:00:00 2001 From: Bogdanova Olga Date: Sun, 6 Dec 2020 20:51:32 +0300 Subject: [PATCH 1/2] FIxed quote rendering --- class.groups.plugin.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/class.groups.plugin.php b/class.groups.plugin.php index 53f54ce..b674a8a 100644 --- a/class.groups.plugin.php +++ b/class.groups.plugin.php @@ -603,8 +603,7 @@ public function discussionModel_beforeRecordAdvancedNotification_handler($sender } $data["HeadlineFormat"] = $headline; // Format to Html - $story = Gdn::formatService()->renderHTML($discussion['Body'], $discussion['Format']); - $message = $story; // htmlspecialchars(Gdn_Format::plainText($story, 'Html')); + $message = Gdn::formatService()->renderQuote($discussion['Body'], $discussion['Format']); // We just converted it to HTML. Make sure everything downstream knows it. // Taking this HTML and feeding it into the Rich Format for example, would be invalid. $data['Format'] = 'Html'; @@ -660,7 +659,7 @@ public function commentModel_beforeRecordAdvancedNotification($sender, $args){ // $data["HeadlineFormat"] = 'The new discussion has been posted in the category ' . $categoryName . '.'; // Format to Html $discussionStory = condense(Gdn_Format::to($discussion['Body'], $discussion['Format'])); - $commentStory = Gdn::formatService()->renderHTML($comment['Body'],$comment['Format']); + $commentStory = Gdn::formatService()->renderQuote($comment['Body'],$comment['Format']); // We just converted it to HTML. Make sure everything downstream knows it. // Taking this HTML and feeding it into the required format for example, would be invalid. $data['Format'] = 'Html'; From 931d6f734a78b3d91e315dc730451093923e3a95 Mon Sep 17 00:00:00 2001 From: Bogdanova Olga Date: Sun, 6 Dec 2020 23:36:26 +0300 Subject: [PATCH 2/2] Fixed hasWatched --- class.groups.plugin.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/class.groups.plugin.php b/class.groups.plugin.php index b674a8a..20c3a57 100644 --- a/class.groups.plugin.php +++ b/class.groups.plugin.php @@ -558,7 +558,7 @@ public function categoryModel_hasWatched_create(CategoryModel $sender) { } } - $metaData= $userMetaModel->getUserMeta(Gdn::session()->UserID, $newCommentKey); + $metaData= $userMetaModel->getUserMeta($userID, $newCommentKey); foreach ($metaData as $key => $value) { if($value != null) { return true;