diff --git a/mycroft/skills/mycroft_skill/mycroft_skill.py b/mycroft/skills/mycroft_skill/mycroft_skill.py index c75a8a9b5f..5606e7a623 100644 --- a/mycroft/skills/mycroft_skill/mycroft_skill.py +++ b/mycroft/skills/mycroft_skill/mycroft_skill.py @@ -334,7 +334,7 @@ class MycroftSkill: """ return None - def converse(self, utterances, lang=None): + def converse(self, utterances, lang=None, message=None): """Handle conversation. This method gets a peek at utterances before the normal intent @@ -350,6 +350,8 @@ class MycroftSkill: first entry is the user utt and the second is normalized() version of the first utterance lang: language the utterance is in, None for default + message: a message object containing a message type with an + optional JSON data packet Returns: bool: True if an utterance was handled, otherwise False diff --git a/mycroft/skills/skill_manager.py b/mycroft/skills/skill_manager.py index 18055f1f9c..d3eeeb9c79 100644 --- a/mycroft/skills/skill_manager.py +++ b/mycroft/skills/skill_manager.py @@ -447,9 +447,11 @@ class SkillManager(Thread): utterances = message.data['utterances'] lang = message.data['lang'] # check the signature of a converse method to either pass a message or not - if len(signature(skill_loader.instance.converse).parameters) == 3: - result = skill_loader.instance.converse(utterances, lang, message) + if len(signature(skill_loader.instance.converse).parameters) == 1: + result = skill_loader.instance.converse(message) else: + utterances = message.data['utterances'] + lang = message.data['lang'] result = skill_loader.instance.converse(utterances, lang) self._emit_converse_response(result, message, skill_loader) except Exception: