Skip to content

Commit

Permalink
fix: active skills in session
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Dec 19, 2024
1 parent 7792511 commit 91da98e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ocp_pipeline/opm.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,6 +581,7 @@ def handle_play_intent(self, message: Message):
query = message.data["query"]
media_type = message.data["media_type"]
skills = message.data.get("skills", [])
sess = SessionManager.get(message)

# search common play skills
lang = standardize_lang_tag(lang)
Expand Down Expand Up @@ -610,6 +611,9 @@ def handle_play_intent(self, message: Message):
player = self.get_player(message)
player.skill_id = best.skill_id
self.update_player_proxy(player)
# add active skill to session
sess.activate_skill(best.skill_id)
message.context["session"] = sess.serialize()
if not player.ocp_available:
self.legacy_play(results, query, message=message)
else:
Expand Down

0 comments on commit 91da98e

Please sign in to comment.