url replaces hotword,context too

This commit is contained in:
bel
2023-04-02 10:48:41 -06:00
parent 63fe8e7e9e
commit 88bf54d022

View File

@@ -319,9 +319,12 @@ class Actor(threading.Thread):
body = self.body body = self.body
body = body.replace("{{hotword}}", hotword) body = body.replace("{{hotword}}", hotword)
body = body.replace("{{context}}", context) body = body.replace("{{context}}", context)
url = self.url
url = url.replace("{{hotword}}", hotword)
url = url.replace("{{context}}", context)
if os.environ.get("DEBUG", "") : if os.environ.get("DEBUG", "") :
log("POST", self.url, headers, body) log("POST", url, headers, body)
requests.post(self.url, headers=headers, data=body) requests.post(url, headers=headers, data=body)
except Exception as e: except Exception as e:
log("Actor.handle_url:", e) log("Actor.handle_url:", e)