File tree 3 files changed +3
-1
lines changed
app/services/discourse_rewind
3 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ def call
23
23
. joins ( "INNER JOIN categories ON categories.id = topics.category_id" )
24
24
. where ( user : user )
25
25
. where ( viewed_at : date )
26
+ . where ( categories : { id : user . guardian . allowed_category_ids } )
26
27
. group ( "categories.id, categories.name" )
27
28
. order ( "COUNT(*) DESC" )
28
29
. limit ( 5 )
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ def call
25
25
. joins ( "INNER JOIN tags ON tags.id = topic_tags.tag_id" )
26
26
. where ( user : user )
27
27
. where ( viewed_at : date )
28
+ . where ( tags : { id : Tag . visible ( user . guardian ) . pluck ( :id ) } )
28
29
. group ( "tags.id, tags.name" )
29
30
. order ( "COUNT(DISTINCT topic_views.topic_id) DESC" )
30
31
. limit ( 5 )
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ class FetchReports
26
26
Action ::ReadingTime ,
27
27
Action ::Reactions ,
28
28
Action ::Fbff ,
29
- # Action::FavoriteTags,
29
+ Action ::FavoriteTags ,
30
30
Action ::FavoriteCategories ,
31
31
Action ::BestTopics ,
32
32
Action ::BestPosts ,
You can’t perform that action at this time.
0 commit comments