mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-12 08:51:53 +00:00
fix(slack): ack reaction lifecycle events
Register no-op Slack event handlers for inbound reaction_added and reaction_removed events so Slack Bolt does not log unhandled-request warnings for events Hermes does not consume.
This commit is contained in:
parent
c574170050
commit
82d570165e
2 changed files with 14 additions and 0 deletions
|
|
@ -890,6 +890,18 @@ class SlackAdapter(BasePlatformAdapter):
|
|||
async def handle_file_change(event, say):
|
||||
pass
|
||||
|
||||
# Reactions are useful lightweight acknowledgements in Slack, but
|
||||
# Hermes does not currently need to route them into the agent loop.
|
||||
# Ack the events explicitly so high-traffic channels do not fill
|
||||
# gateway.error.log with Slack Bolt "Unhandled request" warnings.
|
||||
@self._app.event("reaction_added")
|
||||
async def handle_reaction_added(event, say):
|
||||
pass
|
||||
|
||||
@self._app.event("reaction_removed")
|
||||
async def handle_reaction_removed(event, say):
|
||||
pass
|
||||
|
||||
@self._app.event("assistant_thread_started")
|
||||
async def handle_assistant_thread_started(event, say):
|
||||
await self._handle_assistant_thread_lifecycle_event(event)
|
||||
|
|
|
|||
|
|
@ -234,6 +234,8 @@ class TestAppMentionHandler:
|
|||
|
||||
assert "message" in registered_events
|
||||
assert "app_mention" in registered_events
|
||||
assert "reaction_added" in registered_events
|
||||
assert "reaction_removed" in registered_events
|
||||
assert "assistant_thread_started" in registered_events
|
||||
assert "assistant_thread_context_changed" in registered_events
|
||||
# Slack slash commands are registered via a single regex matcher
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue