diff --git a/model.py b/model.py

index 2ddf23b..ac89e72 100644

--- a/model.py

+++ b/model.py

@@ -1467,12 +1467,16 @@ class Database:

                 (fol.type={FOLLOW_SUBSPACE} AND fol.target=p.subspace) OR

                 (fol.type={FOLLOW_USER} AND fol.target=p.user))

 """

- MUTE_COND_JOIN = f"""

+ MUTE_ALL_COND_JOIN = f"""

     LEFT JOIN mute mt

         ON mt.user=? AND

- ((mt.type={MUTE_POST} AND mt.target=p.id) OR

- (mt.type={MUTE_SUBSPACE} AND mt.target=p.subspace) OR

- (mt.type={MUTE_USER} AND mt.target=p.user))

+ ((mt.type={MUTE_SUBSPACE} AND mt.target=p.subspace) OR

+ (mt.type={MUTE_USER} AND mt.target=p.user))

+ """

+ MUTE_SUBSPACE_COND_JOIN = f"""

+ LEFT JOIN mute mt

+ ON mt.user=? AND

+ (mt.type={MUTE_USER} AND mt.target=p.user)

 """

 TAG_FILTER_JOIN = "JOIN tags tg ON tg.post=p.id"



@@ -1489,7 +1493,8 @@ class Database:

         filter = Database.FOLLOW_FILTER_JOIN

         values.append(filter_by_followed.id)

     if muted_by_user_id:

- filter += Database.MUTE_COND_JOIN

+ filter += Database.MUTE_ALL_COND_JOIN if subspace is None \

+ else Database.MUTE_SUBSPACE_COND_JOIN

         values.append(muted_by_user_id)

     if filter_tag:

         filter += Database.TAG_FILTER_JOIN

@@ -1632,7 +1637,8 @@ class Database:

         filter = Database.FOLLOW_FILTER_JOIN

         values.append(filter_by_followed.id)

     if muted_by_user_id:

- filter += Database.MUTE_COND_JOIN

+ filter += Database.MUTE_ALL_COND_JOIN if subspace is None \

+ else Database.MUTE_SUBSPACE_COND_JOIN

         values.append(muted_by_user_id)

         cond.append('mt.user IS NULL')

     if filter_tag:

Proxy Information
Original URL
gemini://git.skyjake.fi/bubble/main/pcdiff/707a4a11cb3695c8ef55b797fbcade84b13764d7
Status Code
Success (20)
Meta
text/plain
Capsule Response Time
29.348098 milliseconds
Gemini-to-HTML Time
1.689985 milliseconds

This content has been proxied by September (ba2dc).