updateRaw method
Future<Map?>
updateRaw({
- required bool is_lite,
- required UpdataOptionTelegramClient updataOptionTelegramClient,
Implementation
Future<Map?> updateRaw({
required bool is_lite,
required UpdataOptionTelegramClient updataOptionTelegramClient,
}) async {
if (telegramClientData.telegramClientType ==
TelegramClientType.telegam_bot_api) {
return rawData;
}
if (rawData["@type"] == "updateAuthorizationState") {
return rawData;
}
if (rawData["@type"] == "updateNewCallbackQuery" ||
rawData["@type"] == "updateNewInlineCallbackQuery") {
return await tg.callbackQuery_toJson(
update: rawData,
telegramClientData: telegramClientData,
is_lite: is_lite,
);
}
if (rawData["@type"] == "updateNewInlineQuery") {
return await tg.inlineQuery_toJson(
update: rawData,
telegramClientData: telegramClientData,
is_lite: is_lite,
);
}
if (rawData["@type"] == "updateNewMessage") {
return await tg.message_toJson(
update: rawData,
telegramClientData: telegramClientData,
is_lite: is_lite,
updataOptionTelegramClient: updataOptionTelegramClient,
);
}
return null;
}