jsonrpc: add API to check if the message is sent by a bot

Co-Authored-By: Asiel Díaz Benítez <asieldbenitez@gmail.com>
This commit is contained in:
link2xt
2023-02-12 18:30:13 +00:00
parent 1c875209f7
commit 6c8368fa23
5 changed files with 55 additions and 4 deletions

View File

@@ -48,6 +48,10 @@ pub struct MessageObject {
is_setupmessage: bool,
is_info: bool,
is_forwarded: bool,
/// True if the message was sent by a bot.
is_bot: bool,
/// when is_info is true this describes what type of system message it is
system_message_type: SystemMessageType,
@@ -182,6 +186,7 @@ impl MessageObject {
is_setupmessage: message.is_setupmessage(),
is_info: message.is_info(),
is_forwarded: message.is_forwarded(),
is_bot: message.is_bot(),
system_message_type: message.get_info_type().into(),
duration: message.get_duration(),