mirror of
https://github.com/danog/telegram-tt.git
synced 2025-01-21 21:01:29 +01:00
[Dev] GramJs: Properly check app credentials (#1357)
This commit is contained in:
parent
30c27182e2
commit
3b01b58b60
@ -69,7 +69,7 @@ class TelegramClient {
|
||||
* @param opts
|
||||
*/
|
||||
constructor(session, apiId, apiHash, opts = TelegramClient.DEFAULT_OPTIONS) {
|
||||
if (apiId === undefined || apiHash === undefined) {
|
||||
if (!apiId || !apiHash) {
|
||||
throw Error('Your API ID or Hash are invalid. Please read "Requirements" on README.md');
|
||||
}
|
||||
const args = { ...TelegramClient.DEFAULT_OPTIONS, ...opts };
|
||||
|
@ -59,7 +59,9 @@ addReducer('apiUpdate', (global, actions, update: ApiUpdate) => {
|
||||
actions.signOut();
|
||||
}
|
||||
|
||||
actions.showDialog({ data: { ...update.error, hasErrorKey: true } });
|
||||
if (actions.showDialog) {
|
||||
actions.showDialog({ data: { ...update.error, hasErrorKey: true } });
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user