fix: update Cryptgeon API payload to match newer server schema

Newer Cryptgeon versions expect `contents` as a base64 string (not a byte
array) and require a `meta` string field.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Vlad Doloman
2026-06-24 15:11:40 +03:00
parent 24ee8fc347
commit 90af568755

View File

@@ -319,7 +319,8 @@ def create_note(content: str, base_url: str) -> str:
ciphertext = aesgcm.encrypt(nonce, content.encode("utf-8"), None)
payload = json.dumps({
"contents": list(nonce + ciphertext),
"contents": base64.b64encode(nonce + ciphertext).decode("ascii"),
"meta": "",
"views": 1,
"type": "text",
}).encode("utf-8")