mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
This commit is contained in:
parent
b4c1af8cea
commit
6b6bb81b23
1
changelog.d/10845.doc
Normal file
1
changelog.d/10845.doc
Normal file
@ -0,0 +1 @@
|
||||
Fix some crashes in the Module API example code, by adding JSON encoding/decoding.
|
@ -136,9 +136,9 @@ class IsUserEvilResource(Resource):
|
||||
self.evil_users = config.get("evil_users") or []
|
||||
|
||||
def render_GET(self, request: Request):
|
||||
user = request.args.get(b"user")[0]
|
||||
user = request.args.get(b"user")[0].decode()
|
||||
request.setHeader(b"Content-Type", b"application/json")
|
||||
return json.dumps({"evil": user in self.evil_users})
|
||||
return json.dumps({"evil": user in self.evil_users}).encode()
|
||||
|
||||
|
||||
class ListSpamChecker:
|
||||
|
Loading…
Reference in New Issue
Block a user