mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-15 14:22:43 +00:00
feat(gateway): add webhook payload filters
This commit is contained in:
parent
75efd73961
commit
0cf2e39c41
11 changed files with 762 additions and 4 deletions
|
|
@ -35,6 +35,7 @@ def _make_args(**kwargs):
|
|||
"deliver_chat_id": "",
|
||||
"secret": "",
|
||||
"payload": "",
|
||||
"script": "",
|
||||
}
|
||||
defaults.update(kwargs)
|
||||
return Namespace(**defaults)
|
||||
|
|
@ -72,6 +73,12 @@ class TestSubscribe:
|
|||
))
|
||||
assert _load_subscriptions()["s"]["secret"] == "my-secret"
|
||||
|
||||
def test_script_option_is_persisted(self):
|
||||
webhook_command(_make_args(
|
||||
webhook_action="subscribe", name="s", script="todoist_filter.py"
|
||||
))
|
||||
assert _load_subscriptions()["s"]["script"] == "todoist_filter.py"
|
||||
|
||||
def test_auto_secret(self):
|
||||
webhook_command(_make_args(webhook_action="subscribe", name="s"))
|
||||
secret = _load_subscriptions()["s"]["secret"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue