Fix active skills for Padatious

pull/1198/head
Matthew D. Scholefield 2017-11-01 16:47:01 -05:00
parent a9d627c979
commit 384c66cbd2
2 changed files with 6 additions and 3 deletions

View File

@ -74,8 +74,8 @@ def _starting_up():
# Create the Intent manager, which converts utterances to intents
# This is the heart of the voice invoked skill system
PadatiousService(ws)
IntentService(ws)
service = IntentService(ws)
PadatiousService(ws, service)
event_scheduler = EventScheduler(ws)
# Create a thread that monitors the loaded skills, looking for updates

View File

@ -29,9 +29,10 @@ PADATIOUS_VERSION = '0.3.6' # Also update in requirements.txt
class PadatiousService(FallbackSkill):
def __init__(self, emitter):
def __init__(self, emitter, service):
FallbackSkill.__init__(self)
self.config = Configuration.get()['padatious']
self.service = service
intent_cache = expanduser(self.config['intent_cache'])
try:
@ -110,5 +111,7 @@ class PadatiousService(FallbackSkill):
data.matches['utterance'] = utt
self.service.add_active_skill(int(data.name.split(':')[0]))
self.emitter.emit(Message(data.name, data=data.matches))
return True