tgClientData method

Map tgClientData()

Implementation

Map tgClientData() {
  if (telegramClientData.telegramClientType ==
      TelegramClientType.telegam_bot_api) {
    final Map decyprt = json.decode(
        tg.telegramBotApi.telegram_crypto.decrypt(data_base64: query["tg"]));

    if (decyprt["client_tg_user_id"] == null ||
        decyprt["client_tg_user_id"] == 0) {
      decyprt["client_tg_user_id"] =
          TgUtils.parserBotUserIdFromToken(decyprt["client_token"]);
    }
    return decyprt;
  }
  return client_option;
}