Skip to content

Commit

Permalink
fix:cq_speak
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Jan 4, 2025
1 parent 1081fea commit 14bd915
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ovos_workshop/skills/ovos.py
Original file line number Diff line number Diff line change
Expand Up @@ -1058,13 +1058,14 @@ 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")
self.speak(answer)

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

# Inspect the callback signature
callback_signature = signature(self._cq_callback)
Expand Down

0 comments on commit 14bd915

Please sign in to comment.