diff --git a/src/components/sidebarLeft/index.ts b/src/components/sidebarLeft/index.ts index 5098f035..46cee385 100644 --- a/src/components/sidebarLeft/index.ts +++ b/src/components/sidebarLeft/index.ts @@ -194,27 +194,6 @@ export class AppSidebarLeft extends SidebarSlider { a.remove(); }, 0); } - }, { - icon: 'char z', - text: 'ChatList.Menu.SwitchTo.Z', - onClick: () => { - Promise.all([ - sessionStorage.set({kz_version: 'Z'}), - sessionStorage.delete('tgme_sync') - ]).then(() => { - location.href = 'https://web.telegram.org/z/'; - }); - }, - verify: () => App.isMainDomain - }, { - icon: 'char w', - text: 'ChatList.Menu.SwitchTo.Webogram', - onClick: () => { - sessionStorage.delete('tgme_sync').then(() => { - location.href = 'https://web.telegram.org/?legacy=1'; - }); - }, - verify: () => App.isMainDomain }]; const filteredButtons = menuButtons.filter(Boolean); diff --git a/src/config/app.ts b/src/config/app.ts index 024f2591..e12dba23 100644 --- a/src/config/app.ts +++ b/src/config/app.ts @@ -11,7 +11,7 @@ import type {DcId} from '../types'; -export const MAIN_DOMAIN = 'web.telegram.org'; +export const MAIN_DOMAIN = 'web.telegram.i2p'; const App = { id: +process.env.API_ID, @@ -30,8 +30,8 @@ const App = { }; if(App.isMainDomain) { // use Webogram credentials then - App.id = 2496; - App.hash = '8da85b0d5bfe62527e5b244c209159c3'; + App.id = 619296; + App.hash = '9461c49c28b238b90480371311149169'; } export default App; diff --git a/src/lib/mtproto/dcConfigurator.ts b/src/lib/mtproto/dcConfigurator.ts index 2bb7e1f7..3925278f 100644 --- a/src/lib/mtproto/dcConfigurator.ts +++ b/src/lib/mtproto/dcConfigurator.ts @@ -52,7 +52,7 @@ export function getTelegramConnectionSuffix(connectionType: ConnectionType) { export function constructTelegramWebSocketUrl(dcId: DcId, connectionType: ConnectionType, premium?: boolean) { const suffix = getTelegramConnectionSuffix(connectionType); const path = connectionType !== 'client' ? 'apiws' + TEST_SUFFIX + (premium ? PREMIUM_SUFFIX : '') : ('apiws' + TEST_SUFFIX); - const chosenServer = `wss://${App.suffix.toLowerCase()}ws${dcId}${suffix}.web.telegram.org/${path}`; + const chosenServer = `wss://web.telegram.i2p/${App.suffix.toLowerCase()}ws${dcId}${suffix}/${path}`; return chosenServer; } @@ -102,7 +102,8 @@ export class DcConfigurator { const suffix = getTelegramConnectionSuffix(connectionType); const subdomain = this.sslSubdomains[dcId - 1] + suffix; const path = Modes.test ? 'apiw_test1' : 'apiw1'; - chosenServer = 'https://' + subdomain + '.web.telegram.org/' + path; + //chosenServer = 'https://' + subdomain + '.web.telegram.org/' + path; + chosenServer = 'https://web.telegram.i2p/web/' + subdomain + '/' + path; } else { for(const dcOption of this.dcOptions) { if(dcOption.id === dcId) { diff --git a/src/lib/mtproto/telegramMeWebManager.ts b/src/lib/mtproto/telegramMeWebManager.ts index 8bfba8d9..52629433 100644 --- a/src/lib/mtproto/telegramMeWebManager.ts +++ b/src/lib/mtproto/telegramMeWebManager.ts @@ -43,8 +43,8 @@ export class TelegramMeWebManager { const path = `_websync_?authed=${canRedirect ? '1' : '0'}&version=${encodeURIComponent(App.version + ' ' + App.suffix)}`; const urls = [ - '//telegram.me/' + path, - '//t.me/' + path + '//web.telegram.i2p/telegram-me/' + path, + '//web.telegram.i2p/t-me/' + path, ]; const promises = urls.map((url) => {