Skip to content

Commit

Permalink
hotfix/site_id_seriallization (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl authored Sep 14, 2023
1 parent 26806ed commit b585d2c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ovos_bus_client/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,8 @@ def serialize(self) -> dict:
"history": self.history,
"lang": self.lang,
"valid_languages": self.valid_languages,
"context": self.context.serialize()
"context": self.context.serialize(),
"site_id": self.site_id
}

def update_history(self, message: Message = None):
Expand Down Expand Up @@ -448,6 +449,7 @@ def deserialize(data: dict):
lang = data.get("lang")
valid_langs = data.get("valid_languages") or _get_valid_langs()
context = IntentContextManager.deserialize(data.get("context", {}))
site_id = data.get("site_id", "unknown")
return Session(uid,
active_skills=active,
utterance_states=states,
Expand All @@ -456,7 +458,8 @@ def deserialize(data: dict):
lang=lang,
valid_langs=valid_langs,
max_messages=max_messages,
context=context)
context=context,
site_id=site_id)

@staticmethod
def from_message(message: Message = None):
Expand Down

0 comments on commit b585d2c

Please sign in to comment.