Skip to content

Commit 5ec66bf

Browse files
committed
Unify env var names and fix CI
1 parent 38dde4e commit 5ec66bf

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

‎.env.example

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
NODE_ENV=development
22

3-
TELEGRAM_T_API_ID=
4-
TELEGRAM_T_API_HASH=
3+
TELEGRAM_API_ID=
4+
TELEGRAM_API_HASH=
55

66
BASE_URL=https://web.telegram.org/a/

‎.github/workflows/electron-release.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ jobs:
5050
5151
- name: Build and release
5252
env:
53-
TELEGRAM_T_API_ID: ${{ secrets.TELEGRAM_API_ID }}
54-
TELEGRAM_T_API_HASH: ${{ secrets.TELEGRAM_API_HASH }}
53+
TELEGRAM_API_ID: ${{ secrets.TELEGRAM_API_ID }}
54+
TELEGRAM_API_HASH: ${{ secrets.TELEGRAM_API_HASH }}
5555
APPLE_ID: ${{ secrets.APPLE_ID }}
5656
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }}
5757
GH_TOKEN: ${{ secrets.GH_TOKEN }}
@@ -134,6 +134,7 @@ jobs:
134134
env:
135135
KEYPAIR_ALIAS: ${{ secrets.KEYPAIR_ALIAS }}
136136
FILE_PATH: ${{ steps.download-artifact.outputs.download-path }}
137+
shell: cmd
137138
run: smctl.exe sign --keypair-alias=%KEYPAIR_ALIAS% --input "%FILE_PATH%\%FILE_NAME%"
138139

139140
- uses: actions/upload-artifact@v3

‎src/api/gramjs/methods/client.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ export async function init(_onUpdate: OnApiUpdate, initialArgs: ApiInitialArgs)
8181

8282
client = new TelegramClient(
8383
session,
84-
process.env.TELEGRAM_T_API_ID,
85-
process.env.TELEGRAM_T_API_HASH,
84+
process.env.TELEGRAM_API_ID,
85+
process.env.TELEGRAM_API_HASH,
8686
{
8787
deviceModel: navigator.userAgent || userAgent || DEFAULT_USER_AGENT,
8888
systemVersion: platform || DEFAULT_PLATFORM,

‎src/lib/gramjs/client/auth.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ async function signInUserWithQrCode(
231231
}
232232

233233
const result = await client.invoke(new Api.auth.ExportLoginToken({
234-
apiId: Number(process.env.TELEGRAM_T_API_ID),
235-
apiHash: process.env.TELEGRAM_T_API_HASH,
234+
apiId: Number(process.env.TELEGRAM_API_ID),
235+
apiHash: process.env.TELEGRAM_API_HASH,
236236
exceptIds: [],
237237
}));
238238
if (!(result instanceof Api.auth.LoginToken)) {
@@ -272,8 +272,8 @@ async function signInUserWithQrCode(
272272

273273
try {
274274
const result2 = await client.invoke(new Api.auth.ExportLoginToken({
275-
apiId: Number(process.env.TELEGRAM_T_API_ID),
276-
apiHash: process.env.TELEGRAM_T_API_HASH,
275+
apiId: Number(process.env.TELEGRAM_API_ID),
276+
apiHash: process.env.TELEGRAM_API_HASH,
277277
exceptIds: [],
278278
}));
279279

‎webpack.config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ export default function createConfig(
214214
IS_ELECTRON: false,
215215
APP_TITLE,
216216
RELEASE_DATETIME: Date.now(),
217-
TELEGRAM_T_API_ID: undefined,
218-
TELEGRAM_T_API_HASH: undefined,
217+
TELEGRAM_API_ID: undefined,
218+
TELEGRAM_API_HASH: undefined,
219219
// eslint-disable-next-line no-null/no-null
220220
TEST_SESSION: null,
221221
ELECTRON_HOST_URL,

0 commit comments

Comments
 (0)