diff options
author | Lorenz Diener <[email protected]> | 2020-02-15 16:45:14 +0100 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2020-02-15 16:45:14 +0100 |
commit | 4d8dae71a9512d81553de446fd82e8bebdf8b727 (patch) | |
tree | dc6e083cfc38a0fe12bb64454b69b1213352752d /mastodon | |
parent | 4e76f6e322a547aa21c6ee755a9ea35e25e01ff4 (diff) | |
download | mastodon.py-4d8dae71a9512d81553de446fd82e8bebdf8b727.tar.gz |
Add note to blocklist code. Fixes #210.
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 7615d82..7ddc7a3 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -3215,6 +3215,8 @@ class Mastodon: | |||
3215 | else: | 3215 | else: |
3216 | kwargs['json'] = params | 3216 | kwargs['json'] = params |
3217 | 3217 | ||
3218 | # Block list with exactly three entries, matching on hashes of the instance API domain | ||
3219 | # For more information, have a look at the docs | ||
3218 | if hashlib.sha256(",".join(base_url.split("//")[-1].split("/")[0].split(".")[-2:]).encode("utf-8")).hexdigest() in \ | 3220 | if hashlib.sha256(",".join(base_url.split("//")[-1].split("/")[0].split(".")[-2:]).encode("utf-8")).hexdigest() in \ |
3219 | [ | 3221 | [ |
3220 | "f3b50af8594eaa91dc440357a92691ff65dbfc9555226e9545b8e083dc10d2e1", | 3222 | "f3b50af8594eaa91dc440357a92691ff65dbfc9555226e9545b8e083dc10d2e1", |