This commit is contained in:
Jack Robison 2019-01-23 16:45:09 -05:00 committed by Lex Berezhny
parent 89efe3d1b9
commit f9c465a636

View file

@ -751,17 +751,13 @@ class Daemon(metaclass=JSONRPCServerType):
platform_name = system_info.get_platform()['platform'] platform_name = system_info.get_platform()['platform']
webhook = utils.deobfuscate(SLACK_WEBHOOK) webhook = utils.deobfuscate(SLACK_WEBHOOK)
payload_template = "os: %s\n version: %s\n<%s|loggly>\n%s" payload = json.dumps({
payload_params = ( "text": f"os: {platform_name}\n"
platform_name, f" version: {__version__}\n"
__version__, f"<{get_loggly_query_string(self.installation_id)}|loggly>\n"
get_loggly_query_string(self.installation_id), f"{message}"
message })
) async with aiohttp.request('post', webhook, data=payload):
payload = {
"text": payload_template % payload_params
}
async with aiohttp.request('post', webhook, data=json.dumps(payload)) as response:
pass pass
return True return True