Viktor Shchelochkov

Results 131 comments of Viktor Shchelochkov

> So hello guys who came here, you're the top 0.1% of coders > > I got the solution for that problem you can manually produce. > **How to update...

I resolved this using custom service worker with WASM. First, you need webpack or other bundler to bundle everything into single js file in service worker. Then install argon2-browser and...

Oh and this is the config I used for webpack to correctly bundle wasm: ```js /* eslint-disable @typescript-eslint/no-var-requires */ const path = require('path') const { IgnorePlugin } = require('webpack') /**...

It seems that latest layer is 165 according to https://github.com/telegramdesktop/tdesktop/blob/dev/Telegram/SourceFiles/mtproto/scheme/layer.tl

> can you try using the browser build and see if it works? npm i telegram@browser I tried installing version with `browser` tag, had to restart to see changes. Now...

I found this line of code in node_modules/telegram/client/telegramBaseClient.js:45 ```js useWSS: platform_1.isBrowser ? window.location.protocol == "https:" : false, ``` It may be causing trouble, since `window.location.protocol` is nowhere else to be...

I replaced it with hardcoded "false", and now there is no more import errors. Not sure if it will connect, but I'll try and let you know!

I tried calling "start" method but it throws same error: ``` ReferenceError: Can't find variable: crypto ``` I checked exports from 'telegram/platform.js' hoping they indicate that I incorrectly imported package...

I found [crypto module polyfill for expo](https://docs.expo.dev/versions/latest/sdk/crypto/), but I have no idea how to setup alias for it and make telegram package use it instead of "crypto" import :/ Should...