From bc6f799dbf3392cea121d72dc76bdf73e1a2d01f Mon Sep 17 00:00:00 2001 From: JarbasAI <33701864+JarbasAl@users.noreply.github.com> Date: Thu, 19 Dec 2024 08:38:08 +0000 Subject: [PATCH] fix: active skills in session (#50) --- ocp_pipeline/opm.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ocp_pipeline/opm.py b/ocp_pipeline/opm.py index 91f89ca..771b342 100644 --- a/ocp_pipeline/opm.py +++ b/ocp_pipeline/opm.py @@ -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) @@ -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: