Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixed message_ids #13

Closed
wowkin2 opened this issue May 5, 2018 · 5 comments
Closed

Mixed message_ids #13

wowkin2 opened this issue May 5, 2018 · 5 comments

Comments

@wowkin2
Copy link
Collaborator

wowkin2 commented May 5, 2018

I want to retrieve history from channel where I have 22K of messages.
When I dump with this tool message ids are mixed sometimes.
Tried to get last 2200 messages - got them in following order:

200 items: #18854-19087
1000 items: #20243-21342
1000 items: #19088-20242

3500 messages:

500: #17269-17925
1000: #20243-21342
1000: #19088-20242
1000: #17928-19087
@wowkin2
Copy link
Collaborator Author

wowkin2 commented May 5, 2018

Can be easy fixed, by replacing .popleft() to .pop() in telegram_dumper.TelegramDumper()::_merge_temp_files_into_final

Should I create Pull Request or you can handle that?

@fxcp
Copy link
Contributor

fxcp commented May 6, 2018

Am I blind?

$ rg "popleft"
$ rg "pop"
telegram_messages_dump/telegram_dumper.py
195:                            print(buffer.pop(), file=tf)
216:                print(buffer.pop(), file=resulting_file)

By the way, looks like Kosat is a busy person and can't respond quickly to all issues. Create PR if you can.

Kosat pushed a commit that referenced this issue May 6, 2018
+ Introduced `--channelid` option as an alternative to `--chat`.
+ Fix for a critical bug of wrong messages order in dump files. #13 Contributed by @wowkin2 .
+ Proper handling of metadata exceptions.
@Kosat
Copy link
Owner

Kosat commented May 6, 2018

Guys, sorry for the delay.

The fix of "replacing .popleft() to .pop()" looks right, so far. I've included it into the latest commit. 2beb763
I'll do more testing to check it in various scenarios, though.

Kosat pushed a commit that referenced this issue May 6, 2018
@wowkin2
Copy link
Collaborator Author

wowkin2 commented May 9, 2018

@Kosat, thanks for quick update

@Kosat
Copy link
Owner

Kosat commented May 13, 2018

Please, feel free to open a new issue if this or other problem occurs.

@Kosat Kosat closed this as completed May 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants