A platform for community discussion. Free, open, simple.
FIX: ensures topic info is dynamic with scroll (#27082)
Joffrey JAFFEUX9302187ca453
diff --git a/plugins/chat/assets/javascripts/discourse/lib/extract-current-topic-info.js b/plugins/chat/assets/javascripts/discourse/lib/extract-current-topic-info.jsindex f8b57e5c27e..4c8952ec8d1 100644--- a/plugins/chat/assets/javascripts/discourse/lib/extract-current-topic-info.js+++ b/plugins/chat/assets/javascripts/discourse/lib/extract-current-topic-info.js@@ -1,14 +1,14 @@import { getOwner } from "@ember/application";export function extractCurrentTopicInfo(context) {- const topic = getOwner(context).lookup("controller:topic")?.get("model");+ const topic = getOwner(context).lookup("controller:topic")?.model;if (!topic) {return;}const info = { context_topic_id: topic.id };- const currentPostNumber = parseInt(topic.current_post_number, 10);+ const currentPostNumber = topic.currentPost;const posts = topic.postStream.posts;const currentPost = posts.find(