Skip to content

Commit

Permalink
Fixes a missing option in the handle method of MindmeldAPI (#58)
Browse files Browse the repository at this point in the history
The handle method did not previously allow for specifying a name argument.
This adds an option for name, and passes it along to the `add_rule` method
as it should have initially.
  • Loading branch information
snow0x2d0 committed Mar 16, 2022
1 parent 0a8025f commit 6ed70a2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webex_skills/api/mindmeld.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,10 @@ async def parse(self, request: SkillInvokeRequest):
response = SkillInvokeResponse(**new_state.dict(), challenge=request.challenge)
return response

def handle(self, *, domain=None, intent=None, entities=None, default=False, targeted_only=False):
def handle(self, *, name=None, domain=None, intent=None, entities=None, default=False, targeted_only=False):
"""Wraps a function to behave as a dialogue handler"""
return self.dialogue_manager.add_rule(
name=name,
domain=domain,
intent=intent,
entities=entities,
Expand Down

0 comments on commit 6ed70a2

Please sign in to comment.