telegram-cli-backup
telegram-cli-backup copied to clipboard
Offset
Hi, I want to retrieve all my 35000 messages of one of my contacts.
It is possible to send offset in history method but I don't know how to add this option.
Can you guide me?
Hi, I am not sure if I understood you correctly. Have you tried changing the MESSAGE_COUNT in line 3? If MESSAGE_COUNT is set to 500, it means that it tries to retrieve the last 500 messages.
I had 32000 messages in one account and it is not possible to retrieve all in one connection.
So it has to be send in smaller requests by using offset.
Anyway, thanks I wrote a program in php and solved my problem.
Is it a limit impose by Telegram or you got some error?
On Thu, Feb 4, 2016, 2:53 PM Mahdi Jaberzadeh Ansari < [email protected]> wrote:
I had 32000 messages in one account and it is not possible to retrieve all in one connection.
So it has to be send in smaller requests by using offset.
Anyway, thanks I wrote a program in php and solved my problem.
— Reply to this email directly or view it on GitHub https://github.com/psamim/telegram-cli-backup/issues/12#issuecomment-179780410 .
There was not any error. Just does not return anything. You have to use offset. Just take a look at telegram-cli for history function
history
https://github.com/vysheng/tg/wiki/Telegram-CLI-Commands
By looking at https://github.com/vysheng/tg/blob/master/lua-tg.c#L1128, it seems that in the Lua binding the offset is hardcoded as 0.
I made a pull request and added a new function to the Lua binding to be able to get history with limit and offset, waiting to be merged.
https://github.com/vysheng/tg/pull/987
Nice, Thanks.
@psamim Can only load 3000 messages, 3001 gives nothing
@vstet Are you using my pull request for tg or the master branch of tg?
@psamim just the main instructions from the README.org
@vstet Then it is a limit from Telegram API, you can fetch 3000 by 3000 using offsets.
@mjza could you publish it?
Hi. Congratulations on the tool. One question, I am not able to configure it to make me a backup of all the channels and superchannels ... Can you help me? Thank you
I would like to save the information in a database type sqlite3
@ToMas-hack I have not tested this scripts for channels.