fix: preserve NUL characters in persisted messages
Store message text as UTF-8 bytes and migrate existing rows without loss. Cover HTTP round trips, restart persistence, Unicode limits and idempotent retries. Adapt direct database tools to the binary storage format. (cherry picked from commit 386276532730b8758298080b49db63738ca300a4)
This commit is contained in:
@@ -76,7 +76,7 @@ class ReconcileTests(unittest.TestCase):
|
||||
message_id = uuid4()
|
||||
conn.execute(
|
||||
"INSERT INTO messages (id,chat_id,sender_id,text) VALUES (%s,%s,%s,%s)",
|
||||
(message_id, UUID(chat["id"]), UUID(owner["id"]), ""),
|
||||
(message_id, UUID(chat["id"]), UUID(owner["id"]), b""),
|
||||
)
|
||||
conn.execute(
|
||||
"INSERT INTO message_attachments (message_id,chat_id,attachment_id,position) VALUES (%s,%s,%s,0)",
|
||||
|
||||
Reference in New Issue
Block a user