mirror of
https://git.kiwifarms.net/mint/fedi-block-api.git
synced 2024-10-22 21:49:06 +00:00
Handle it both sides
This commit is contained in:
parent
03aa6e3560
commit
c29326745b
1 changed files with 3 additions and 2 deletions
5
api.py
5
api.py
|
@ -136,13 +136,14 @@ def mutual(domains: list[str] = Query()):
|
|||
c = conn.cursor()
|
||||
c.execute(
|
||||
"SELECT block_level FROM blocks " \
|
||||
"WHERE ((blocker = :a OR blocker = :b) AND (blocked = :b OR blocked = :a OR blocked = :w)) " \
|
||||
"WHERE ((blocker = :a OR blocker = :b) AND (blocked = :b OR blocked = :a OR blocked = :aw OR blocked = :bw)) " \
|
||||
"AND block_level = 'reject' " \
|
||||
"LIMIT 1",
|
||||
{
|
||||
"a": domains[0],
|
||||
"w": "*." + domains[0],
|
||||
"b": domains[1],
|
||||
"aw": "*." + domains[0],
|
||||
"bw": "*." + domains[1],
|
||||
},
|
||||
)
|
||||
res = c.fetchone()
|
||||
|
|
Loading…
Reference in a new issue