Skip to content

Commit

Permalink
ret type
Browse files Browse the repository at this point in the history
  • Loading branch information
JarbasAl committed Jan 8, 2024
1 parent a951239 commit 65f73a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ovos_bus_client/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ def serialize(self) -> str:
data = self._json_dump(self.data)
ctxt = self._json_dump(self.context)

msg = orjson.dumps({'type': self.msg_type, 'data': data, 'context': ctxt})
msg = orjson.dumps({'type': self.msg_type, 'data': data, 'context': ctxt}).decode("utf-8")
if self._secret_key:
payload = encrypt_as_dict(self._secret_key, msg)
return orjson.dumps(payload)
return orjson.dumps(payload).decode("utf-8")
return msg

@property
Expand Down Expand Up @@ -446,10 +446,10 @@ def serialize(self) -> str:
str: a json string representation of the message.
"""
data = self._json_dump(self.data)
msg = orjson.dumps({'type': self.msg_type, **data})
msg = orjson.dumps({'type': self.msg_type, **data}).decode("utf-8")
if self._secret_key:
payload = encrypt_as_dict(self._secret_key, msg)
return orjson.dumps(payload)
return orjson.dumps(payload).decode("utf-8")
return msg

@staticmethod
Expand Down

0 comments on commit 65f73a9

Please sign in to comment.