diff --git a/crates/ap-proxy/src/notify.rs b/crates/ap-proxy/src/notify.rs index e3898ff..e5f5336 100644 --- a/crates/ap-proxy/src/notify.rs +++ b/crates/ap-proxy/src/notify.rs @@ -226,8 +226,8 @@ impl Notifier for TelegramNotifier { if let Some(b) = buttons { body["reply_markup"] = serde_json::json!({ "inline_keyboard": [[ - { "text": "Approve", "callback_data": b.approve }, { "text": "Deny", "callback_data": b.deny }, + { "text": "Approve", "callback_data": b.approve }, ]], }); } diff --git a/crates/ap-proxy/src/notify/tests.rs b/crates/ap-proxy/src/notify/tests.rs index 1e538d8..a625bfa 100644 --- a/crates/ap-proxy/src/notify/tests.rs +++ b/crates/ap-proxy/src/notify/tests.rs @@ -164,10 +164,10 @@ async fn buttons_message_has_only_fixed_text_id_link_and_buttons() { format!("{TEXT}\nRequest: {HOLD_ID}\n{VIEW_URL}") ); let row = &json["reply_markup"]["inline_keyboard"][0]; - assert_eq!(row[0]["text"], "Approve"); - assert_eq!(row[1]["text"], "Deny"); - assert_eq!(row[0]["callback_data"], buttons.approve); - assert_eq!(row[1]["callback_data"], buttons.deny); + assert_eq!(row[0]["text"], "Deny"); + assert_eq!(row[1]["text"], "Approve"); + assert_eq!(row[0]["callback_data"], buttons.deny); + assert_eq!(row[1]["callback_data"], buttons.approve); assert_eq!(buttons.approve.len(), poll::CALLBACK_DATA_LEN); assert_eq!(buttons.deny.len(), poll::CALLBACK_DATA_LEN); let text = json["text"].as_str().unwrap(); diff --git a/docs/design/muse-gated-passthrough.md b/docs/design/muse-gated-passthrough.md index 759acfc..f3d6a63 100644 --- a/docs/design/muse-gated-passthrough.md +++ b/docs/design/muse-gated-passthrough.md @@ -532,7 +532,7 @@ login. Approve and deny happen in Telegram. Config: `[notify] buttons = true`, w and `view_base_url`. `buttons = false` restores option C (3.6.1) with no code change. - **The message.** Text: the fixed sentence, `Request: `, the link `{view_base_url}/view/`, - and one row of two buttons, `Approve` and `Deny`. Nothing else leaves p1: no body, header, route + and one row of two buttons, `Deny` on the left and `Approve` on the right. Nothing else leaves p1: no body, header, route path, Discord token, digest or fingerprint. The view token is in the link, and it is the one value in the message that reads a request (accepted risk 1). - **Callback data.** `a` or `d`, then the 32-hex request id, then a 24-hex nonce: 57 bytes, under