diff --git a/main.py b/main.py index e99df22..4290b7e 100644 --- a/main.py +++ b/main.py @@ -358,10 +358,14 @@ async def send_callback(cq: CallbackQuery): "jsonrpc": "2.0", "id": 0, }) + logging.info(r.text) resp = r.json() - if resp.get('result') == 'duplicate': + result = resp.get('result') + if not result: + raise Exception(f'No result in response: {resp}') + if resp.get('status') == 'duplicate': await cq.answer('Duplicate') - elif resp.get('result'): + elif resp.get('status') == 'ok': await cq.answer('Sent') else: raise Exception(resp)