mirror of
https://github.com/teloxide/teloxide.git
synced 2025-01-08 19:33:53 +01:00
Return ChatFullInfo
from getChat
instead of Chat
This commit is contained in:
parent
dcb350413a
commit
8ce91a1363
2 changed files with 7 additions and 7 deletions
|
@ -2626,10 +2626,10 @@ Schema(
|
||||||
),
|
),
|
||||||
Method(
|
Method(
|
||||||
names: ("getChat", "GetChat", "get_chat"),
|
names: ("getChat", "GetChat", "get_chat"),
|
||||||
return_ty: RawTy("Chat"),
|
return_ty: RawTy("ChatFullInfo"),
|
||||||
doc: Doc(
|
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: "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: {"Chat": "https://core.telegram.org/bots/api#chat"},
|
md_links: {"ChatFullInfo": "https://core.telegram.org/bots/api#chatfullinfo"},
|
||||||
),
|
),
|
||||||
tg_doc: "https://core.telegram.org/bots/api#getchat",
|
tg_doc: "https://core.telegram.org/bots/api#getchat",
|
||||||
tg_category: "Available methods",
|
tg_category: "Available methods",
|
||||||
|
|
|
@ -2,14 +2,14 @@
|
||||||
|
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
|
|
||||||
use crate::types::{Chat, Recipient};
|
use crate::types::{ChatFullInfo, Recipient};
|
||||||
|
|
||||||
impl_payload! {
|
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)]
|
#[derive(Debug, PartialEq, Eq, Hash, Clone, Serialize)]
|
||||||
pub GetChat (GetChatSetters) => Chat {
|
pub GetChat (GetChatSetters) => ChatFullInfo {
|
||||||
required {
|
required {
|
||||||
/// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
|
/// Unique identifier for the target chat or username of the target channel (in the format `@channelusername`)
|
||||||
pub chat_id: Recipient [into],
|
pub chat_id: Recipient [into],
|
||||||
|
|
Loading…
Reference in a new issue