Skip to content

Commit

Permalink
simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Jun 15, 2022
1 parent 26c66e2 commit a3ebac7
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions mycroft/skills/intent_services/converse_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,21 +133,11 @@ def get_active_skills(self, message=None):
"""Active skill ids ordered by converse priority
this represents the order in which converse will be called
message.context is parsed for requested "active_skills"
if present only skill_ids both in internal active list
and in request will be considered
Returns:
active_skills (list): ordered list of skill_ids
"""
session = self.get_session(message)
all_active = [skill[0] for skill in session.active_skills]
message = message or dig_for_message()
if message:
active = message.context.get("active_skills") or []
if active:
return [s for s in all_active if s in active]
return all_active
return [skill[0] for skill in session.active_skills]

def deactivate_skill(self, skill_id, source_skill=None, message=None):
"""Remove a skill from being targetable by converse.
Expand Down

0 comments on commit a3ebac7

Please sign in to comment.