From 9d39769445d8a55af1cbec8f11352f955288e9a7 Mon Sep 17 00:00:00 2001 From: link2xt Date: Fri, 3 Oct 2025 17:04:19 +0000 Subject: [PATCH] refactor: return the reason when failing to place calls --- src/calls.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/calls.rs b/src/calls.rs index 95b2f7d7c..4c2ece189 100644 --- a/src/calls.rs +++ b/src/calls.rs @@ -183,7 +183,11 @@ impl Context { place_call_info: String, ) -> Result { let chat = Chat::load_from_db(self, chat_id).await?; - ensure!(chat.typ == Chattype::Single && !chat.is_self_talk()); + ensure!( + chat.typ == Chattype::Single, + "Can only place calls in 1:1 chats" + ); + ensure!(!chat.is_self_talk(), "Cannot call self"); let mut call = Message { viewtype: Viewtype::Call,