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:
@@ -319,7 +319,8 @@ def create_note(content: str, base_url: str) -> str:
|
|||||||
ciphertext = aesgcm.encrypt(nonce, content.encode("utf-8"), None)
|
ciphertext = aesgcm.encrypt(nonce, content.encode("utf-8"), None)
|
||||||
|
|
||||||
payload = json.dumps({
|
payload = json.dumps({
|
||||||
"contents": list(nonce + ciphertext),
|
"contents": base64.b64encode(nonce + ciphertext).decode("ascii"),
|
||||||
|
"meta": "",
|
||||||
"views": 1,
|
"views": 1,
|
||||||
"type": "text",
|
"type": "text",
|
||||||
}).encode("utf-8")
|
}).encode("utf-8")
|
||||||
|
|||||||
Reference in New Issue
Block a user