fix(bot): 🚑 Decode orjson bytes.

This commit is contained in:
Nyeki.py
2024-11-03 23:19:07 -03:00
parent 4701e8194c
commit eaaea73ab1
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -778,7 +778,7 @@ class Calls(base.Cog):
"replying_to_id": replying_to_id, "replying_to_id": replying_to_id,
"created_at": datetime.now(timezone.utc), "created_at": datetime.now(timezone.utc),
} }
), ).decode(),
) )
pipe.hset( pipe.hset(
constants.CALL_MESSAGE_CONTENTS_TEMPLATE % call.id, constants.CALL_MESSAGE_CONTENTS_TEMPLATE % call.id,
@@ -790,7 +790,7 @@ class Calls(base.Cog):
"was_propagated": not bool(blocked_word), "was_propagated": not bool(blocked_word),
"created_at": datetime.now(timezone.utc), "created_at": datetime.now(timezone.utc),
} }
), ).decode(),
) )
pipe.hset( pipe.hset(
constants.CALL_MESSAGE_CONTENT_ITERATIONS_TEMPLATE % call.id, message.id, 1 constants.CALL_MESSAGE_CONTENT_ITERATIONS_TEMPLATE % call.id, message.id, 1
@@ -863,7 +863,7 @@ class Calls(base.Cog):
await self.bot.redis.hset( await self.bot.redis.hset(
constants.CALL_MESSAGES_TEMPLATE % channel.call_id, constants.CALL_MESSAGES_TEMPLATE % channel.call_id,
message.id, message.id,
orjson.dumps(message_dict), orjson.dumps(message_dict).decode(),
) )
other_channel = await models.Channel.get_or_none( other_channel = await models.Channel.get_or_none(
@@ -983,7 +983,7 @@ class Calls(base.Cog):
"was_propagated": not bool(blocked_word), "was_propagated": not bool(blocked_word),
"created_at": datetime.now(timezone.utc), "created_at": datetime.now(timezone.utc),
} }
), ).decode(),
) )
await pipe.exec() await pipe.exec()
+1 -1
View File
@@ -1,6 +1,6 @@
[project] [project]
name = "payphone" name = "payphone"
version = "0.11.0" version = "0.12.0"
description = "Add your description here" description = "Add your description here"
readme = "README.md" readme = "README.md"
requires-python = ">=3.12" requires-python = ">=3.12"