Grapnel: less lazy urlencode

This commit is contained in:
James Lu 2022-07-25 21:30:03 -07:00
parent 1d21359590
commit 393e7fea01

View File

@ -157,7 +157,10 @@ class Grapnel(callbacks.Plugin):
def _format_url(self, hookID, token):
baseurl = self.registryValue("baseURL")
url = urllib.parse.urljoin(baseurl, f"/{HTTP_ENDPOINT_NAME}/{hookID}?token={token}&sender=change-this")
url = urllib.parse.urljoin(baseurl, f"/{HTTP_ENDPOINT_NAME}/{hookID}?" + urllib.parse.urlencode({
'token': token,
'sender': 'your-cool-app-name'
}))
return url
@wrap(['networkIrc', 'channel', 'admin'])