Add Arch package and prebuilt TDLib support
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include <curses.h>
|
||||
|
||||
#include "build_config.h"
|
||||
#include "util.h"
|
||||
|
||||
namespace telegram_tui {
|
||||
@@ -19,6 +20,12 @@ App::App() {
|
||||
const StoredConfig config = load_app_config();
|
||||
api_id_ = get_env("TELEGRAM_API_ID");
|
||||
api_hash_ = get_env("TELEGRAM_API_HASH");
|
||||
if (api_id_.empty()) {
|
||||
api_id_ = TELEGRAM_TUI_BUILD_API_ID;
|
||||
}
|
||||
if (api_hash_.empty()) {
|
||||
api_hash_ = TELEGRAM_TUI_BUILD_API_HASH;
|
||||
}
|
||||
if (api_id_.empty()) {
|
||||
api_id_ = config.api_id;
|
||||
}
|
||||
|
||||
4
src/build_config.h.in
Normal file
4
src/build_config.h.in
Normal file
@@ -0,0 +1,4 @@
|
||||
#pragma once
|
||||
|
||||
#define TELEGRAM_TUI_BUILD_API_ID "@TELEGRAM_TUI_BUILD_API_ID@"
|
||||
#define TELEGRAM_TUI_BUILD_API_HASH "@TELEGRAM_TUI_BUILD_API_HASH@"
|
||||
Reference in New Issue
Block a user