mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 09:42:02 +08:00
FIX: category id in filterCategory (#8555)
Small regression was created here: https://github.com/discourse/discourse/commit/374534f00ee#diff-4af46675500edc092f9224ca5835a7ddR106 After that change `listFilter` is including `categoryId` like `c/cat/subcat/6/l/latest` instead of `c/cat/subcat/l/latest` Therefore, `trackIncoming` function in topic-tracking-state couldn't properly filter new messages
This commit is contained in:
parent
998bbdc40f
commit
84ede5867c
|
@ -221,9 +221,9 @@ const TopicTrackingState = EmberObject.extend({
|
|||
|
||||
if (split.length >= 4) {
|
||||
filter = split[split.length - 1];
|
||||
// c/cat/subcat/l/latest
|
||||
// c/cat/subcat/6/l/latest
|
||||
var category = Category.findSingleBySlug(
|
||||
split.splice(1, split.length - 3).join("/")
|
||||
split.splice(1, split.length - 4).join("/")
|
||||
);
|
||||
this.set("filterCategory", category);
|
||||
} else {
|
||||
|
|
|
@ -42,7 +42,7 @@ QUnit.test("subscribe to category", function(assert) {
|
|||
|
||||
const state = TopicTrackingState.create();
|
||||
|
||||
state.trackIncoming("c/darth/l/latest");
|
||||
state.trackIncoming("c/darth/1/l/latest");
|
||||
|
||||
state.notify({
|
||||
message_type: "new_topic",
|
||||
|
@ -67,7 +67,7 @@ QUnit.test("subscribe to category", function(assert) {
|
|||
);
|
||||
|
||||
state.resetTracking();
|
||||
state.trackIncoming("c/darth/luke/l/latest");
|
||||
state.trackIncoming("c/darth/luke/2/l/latest");
|
||||
|
||||
state.notify({
|
||||
message_type: "new_topic",
|
||||
|
|
Loading…
Reference in New Issue
Block a user