Skip to content

Commit

Permalink
refactor: simplify cq messages
Browse files Browse the repository at this point in the history
avoid skills needing to check their skill_id, trigger the intended skill directly instead
  • Loading branch information
JarbasAl committed Jan 4, 2025
1 parent 6dc9fd9 commit 187a7d5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ovos_workshop/skills/ovos.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,6 +1058,10 @@ def __handle_query_action(self, message: Message):
self.bus.emit(message)

def __handle_skill_query_action(self, message: Message):
if not self._cq_callback:
LOG.debug(f"no common query callback registered for: {self.skill_id}")
return # nothing to do

LOG.debug(f"common query callback for: {self.skill_id}")
lang = get_message_lang(message)
answer = message.data.get("answer") or message.data.get("callback_data", {}).get("answer")
Expand Down

0 comments on commit 187a7d5

Please sign in to comment.