Skip to content

Commit

Permalink
e3cf13a5db5fb9c3ba8994d019a025a444b11cb0
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Apr 4, 2024
1 parent 846c0b3 commit abf37d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions esm/client/4_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,6 @@ export class Client extends Composer {
try {
const exportedAuth = await this.api.auth.exportAuthorization({ dc_id: dcId });
await client.authorize(exportedAuth);
// throw 1;
return true;
}
catch (err) {
Expand Down Expand Up @@ -1074,7 +1073,7 @@ export class Client extends Composer {
inputPeer.access_hash = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getUserAccessHash).call(this, inputPeer.user_id);
}
}
else {
if ((inputPeer instanceof types.InputPeerUser || inputPeer instanceof types.InputPeerChannel && inputPeer.access_hash == 0n) && await this.storage.getAccountType() == "user") {
throw new AccessError(`Cannot access the chat ${id} because there is no access hash for it.`);
}
return inputPeer;
Expand Down
3 changes: 1 addition & 2 deletions script/client/4_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,6 @@ class Client extends Composer {
try {
const exportedAuth = await this.api.auth.exportAuthorization({ dc_id: dcId });
await client.authorize(exportedAuth);
// throw 1;
return true;
}
catch (err) {
Expand Down Expand Up @@ -1078,7 +1077,7 @@ class Client extends Composer {
inputPeer.access_hash = await __classPrivateFieldGet(this, _Client_instances, "m", _Client_getUserAccessHash).call(this, inputPeer.user_id);
}
}
else {
if ((inputPeer instanceof _2_tl_js_1.types.InputPeerUser || inputPeer instanceof _2_tl_js_1.types.InputPeerChannel && inputPeer.access_hash == 0n) && await this.storage.getAccountType() == "user") {
throw new _0_errors_js_1.AccessError(`Cannot access the chat ${id} because there is no access hash for it.`);
}
return inputPeer;
Expand Down

0 comments on commit abf37d9

Please sign in to comment.