Hi. I am looking for advice on the logic of authorization.
I'm trying to upgrade the ruby gem to a new version of tdlib and I don't understand how to work with authorization.
Old version is - eb80924
In the old version, every time it was necessary to send requests to telegram, a new client instance was created, a request was sent to setTdlibParameters, followed by checkDatabaseEncryptionKey, after which the rest of the operations were performed from the same client.
In the new version, setTdlibParameters is missing and after setTdlibParameters it is required to go through the confirmation code, which is absolutely unacceptable for my tasks.
What can you recommend? I'm thinking about using the singleton pattern to work with the client, but I'm not sure if this is the right option.
Hi. I am looking for advice on the logic of authorization. I'm trying to upgrade the ruby gem to a new version of tdlib and I don't understand how to work with authorization. Old version is - eb80924
In the old version, every time it was necessary to send requests to telegram, a new client instance was created, a request was sent to setTdlibParameters, followed by checkDatabaseEncryptionKey, after which the rest of the operations were performed from the same client. In the new version, setTdlibParameters is missing and after setTdlibParameters it is required to go through the confirmation code, which is absolutely unacceptable for my tasks.
What can you recommend? I'm thinking about using the singleton pattern to work with the client, but I'm not sure if this is the right option.