Return ChatFullInfo from getChat instead of Chat

This commit is contained in:
Andrey Brusnik 2024-08-27 00:47:54 +04:00
parent dcb350413a
commit 8ce91a1363
No known key found for this signature in database
GPG key ID: D33232F28CFF442C
2 changed files with 7 additions and 7 deletions

View file

@ -2626,10 +2626,10 @@ Schema(
),
Method(
names: ("getChat", "GetChat", "get_chat"),
return_ty: RawTy("Chat"),
return_ty: RawTy("ChatFullInfo"),
doc: Doc(
md: "Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a [Chat] object on success.",
md_links: {"Chat": "https://core.telegram.org/bots/api#chat"},
md: "Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a [ChatFullInfo] object on success.",
md_links: {"ChatFullInfo": "https://core.telegram.org/bots/api#chatfullinfo"},
),
tg_doc: "https://core.telegram.org/bots/api#getchat",
tg_category: "Available methods",

View file

@ -2,14 +2,14 @@
use serde::Serialize;
use crate::types::{Chat, Recipient};
use crate::types::{ChatFullInfo, Recipient};
impl_payload! {
/// Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a [`Chat`] object on success.
/// Use this method to get up to date information about the chat (current name of the user for one-on-one conversations, current username of a user, group or channel, etc.). Returns a [`ChatFullInfo`] object on success.
///
/// [`Chat`]: crate::types::Chat
/// [`ChatFullInfo`]: crate::types::ChatFullInfo
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
pub GetChat (GetChatSetters) => Chat {
pub GetChat (GetChatSetters) => ChatFullInfo {
required {
/// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
pub chat_id: Recipient [into],