A platform for community discussion. Free, open, simple.
FEATURE: only scroll to bottom for discobot
Sam Saffron267d129f38d6
diff --git a/app/assets/javascripts/discourse/controllers/topic.js.es6 b/app/assets/javascripts/discourse/controllers/topic.js.es6index e5206b4055a..dcac19a49a0 100644--- a/app/assets/javascripts/discourse/controllers/topic.js.es6+++ b/app/assets/javascripts/discourse/controllers/topic.js.es6@@ -1272,10 +1272,14 @@ export default Ember.Controller.extend(bufferedProperty("model"), {}}+ // scroll to bottom is very specific to new posts from discobot+ // hence the -2 check (dicobot id). We can shift all this code+ // to discobot plugin longer termif (topic.get("isPrivateMessage") &&this.currentUser &&this.currentUser.get("id") !== data.user_id &&+ data.user_id === -2 &&data.type === "created") {const postNumber = data.post_number;