I've added a couple of hooks which add a new node on to topic data, which is either true or false depending on other some logic I've written.
When topics are loaded onto a category page, I want to return only those which have the new node === true
src > categories > topics.js, there's a function
Categories.buildTopicsSortedSet. In it, topics can be ordered by 'most_posts' like so
set = 'cid:' + cid + ':tids:posts'
Is there a way that I can manipulate this to look for my new node condition? (I need to be able to fetch these topics at this point in the query because of pagination. If I fetch 5 topics at a time and filter them after this point, I could end up with 0 matched topics. I always want to fetch the maximum number of matching topics).
Edit: I should also mention I'm using a Postgres DB