From 094d597ec84d192510a7334ee0c09be13b766c39 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Tue, 5 Dec 2023 12:34:19 +0100 Subject: [PATCH] FIX: increments message version when processed (#24713) Incrementing version, ensures the message will re-play decorators. Also removes a debugging line which had been forgotten. --- .../discourse/lib/chat-channel-subscription-manager.js | 3 +-- .../discourse/lib/chat-channel-thread-subscription-manager.js | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/chat/assets/javascripts/discourse/lib/chat-channel-subscription-manager.js b/plugins/chat/assets/javascripts/discourse/lib/chat-channel-subscription-manager.js index 985fc40676f..ac4c9d38e78 100644 --- a/plugins/chat/assets/javascripts/discourse/lib/chat-channel-subscription-manager.js +++ b/plugins/chat/assets/javascripts/discourse/lib/chat-channel-subscription-manager.js @@ -127,6 +127,7 @@ export default class ChatChannelSubscriptionManager { if (message) { message.cooked = data.chat_message.cooked; message.processed = true; + message.incrementVersion(); } } @@ -234,7 +235,5 @@ export default class ChatChannelSubscriptionManager { if (message?.thread) { message.thread.preview = ChatThreadPreview.create(data.preview); } - - message.thread.preview.yolo = 1; } } diff --git a/plugins/chat/assets/javascripts/discourse/lib/chat-channel-thread-subscription-manager.js b/plugins/chat/assets/javascripts/discourse/lib/chat-channel-thread-subscription-manager.js index 4a329c88bba..a774dc52b3a 100644 --- a/plugins/chat/assets/javascripts/discourse/lib/chat-channel-thread-subscription-manager.js +++ b/plugins/chat/assets/javascripts/discourse/lib/chat-channel-thread-subscription-manager.js @@ -117,6 +117,7 @@ export default class ChatChannelThreadSubscriptionManager { if (message) { message.cooked = data.chat_message.cooked; message.processed = true; + message.incrementVersion(); } }