You are reading a single comment by @Velocio and its replies. Click here to read the full conversation.
  • Maybe a slightly niche gripe (two actually) concerning the ignore feature:

    I have a sub-forum on ignore but it still shows up on the front page.
    If the last post in a forum is in the ignored sub-forum, that post shows up on the right on the front page.

    I'm aware this is a bit niche, but it would be wildly appreciated. I currently have all forums except for the Current Projects forum on ignore, it's a great way to pretend this forum is still primarily about bikes. The real estate and car sub-forum of Current Projects kind of ruins that fantasy.

  • I have a sub-forum on ignore but it still shows up on the front page.
    If the last post in a forum is in the ignored sub-forum, that post shows up on the right on the front page.

    This one is fun.

    I think it's this query...
    https://git.dee.kitchen/buro9/microcosm/src/branch/main/models/microcosms.go#L1148-L1157

    SELECT microcosm_id
          ,title
          ,logo_url
      FROM microcosms m
     WHERE parent_id = $1
       AND is_deleted IS NOT TRUE
       AND is_moderated IS NOT TRUE
       AND (get_effective_permissions(site_id,microcosm_id,2,microcosm_id,$2)).can_read IS TRUE
     ORDER BY is_sticky DESC, comment_count DESC, title ASC
    

    And I think this is the solution:

    SELECT microcosm_id
          ,title
          ,logo_url
          ,i.profile_id
      FROM microcosms m
           LEFT JOIN ignores_expanded i ON i.profile_id = 79578
                                       AND i.item_type_id = 2
                                       AND i.item_id = m.microcosm_id
     WHERE parent_id = 807
       AND is_deleted IS NOT TRUE
       AND is_moderated IS NOT TRUE
       AND i.profile_id IS NULL
       AND (get_effective_permissions(site_id,microcosm_id,2,microcosm_id,79578)).can_read IS TRUE
     ORDER BY is_sticky DESC, comment_count DESC, title ASC;
    

    For your set of ignores, this would literally only show the Current Projects forum on the home page, nothing else... and effectively all other threads in all forums become unnavigable.

    I might deploy the fix and see what I blow up.

About

Avatar for Velocio @Velocio started