aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2019-11-20 14:42:34 +0000
committerGravatar jesopo2019-11-20 14:42:34 +0000
commit4d30263315d7b585e4c51b664e1ace2f13195456 (patch)
tree4cbeb5ca2555104ce42cccfbcda536784f52896e /modules
parentmove things like IRCBot.VERSION to before imports (for utils.http) (diff)
signature
give bitbot a unique User-Agent
closes #206
Diffstat (limited to 'modules')
-rw-r--r--modules/fediverse/ap_utils.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/modules/fediverse/ap_utils.py b/modules/fediverse/ap_utils.py
index bd0cacf4..a2191014 100644
--- a/modules/fediverse/ap_utils.py
+++ b/modules/fediverse/ap_utils.py
@@ -7,7 +7,6 @@ LD_TYPE = ("application/ld+json; "
"profile=\"https://www.w3.org/ns/activitystreams\"")
JRD_TYPE = "application/jrd+json"
ACTIVITY_TYPE = "application/activity+json"
-USERAGENT = "BitBot (%s) Fediverse" % IRCBot.VERSION
def split_username(s):
if s[0] == "@":
@@ -26,7 +25,7 @@ def activity_request(url, data=None, method="GET", type=ACTIVITY_TYPE,
else:
headers = {"Accept": type}
- request = utils.http.Request(url, headers=headers, useragent=USERAGENT,
+ request = utils.http.Request(url, headers=headers,
content_type=content_type, post_data=data, method=method, json=True,
json_body=True, fallback_encoding="utf8")
return utils.http.request(request)