From 123d0ff06a96c1093bfffffae0849536cfb9ef1f Mon Sep 17 00:00:00 2001 From: Yuriy Bakhtin Date: Tue, 8 Oct 2024 15:48:23 +0200 Subject: [PATCH] Fix rendering of attached files on new reply by PushService --- docs/CHANGELOG.md | 1 + models/forms/ReplyForm.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 71ad38f..f41176c 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -10,6 +10,7 @@ Changelog - Enh #417: Replace theme variables with CSS variables - Enh #418: Update Active Form for Bootstrap 5 - Enh #422: Changed deprecated `DOMSubtreeModified` to `MutationObserver` +- Fix #423: Fix rendering of attached files on new reply by PushService 3.2.2 (July 9, 2024) -------------------- diff --git a/models/forms/ReplyForm.php b/models/forms/ReplyForm.php index e78c2b5..d0af389 100644 --- a/models/forms/ReplyForm.php +++ b/models/forms/ReplyForm.php @@ -80,8 +80,8 @@ public function save() if ($this->reply->save()) { $this->reply->refresh(); // Update created_by date, otherwise db expression is set... - $this->reply->notify(); $this->reply->fileManager->attach(Yii::$app->request->post('fileList')); + $this->reply->notify(); // Update last viewed date to avoid marking the conversation as unread $userMessage = $this->model->getUserMessage($this->reply->user_id);