Telegram-Anti-Revoke
Telegram-Anti-Revoke copied to clipboard
Attempt to support Linux
Attempt to make the plugin support Linux
.
Attempted code changes will be made in linux-experiment
branch of this repository.
(This branch has not been created yet)
@SpriteOvO can you explain how exactly it works? Like via source code links. I mean official telegram desktop client source codes. Show what exactly is beeing hoked, which variable being replaced, when and how. Can you?
@tcNmjeD6SpVrpLC In short, hooking History::destroyMessage
, replacing _timeText
, and then changing some width.
Compiling a tdesktop yourself and debugging it with .pdb file can help you understand more details.
@SpriteOvO What about ttl based deletions?
What is the poin of single hook? What exactly do you stop in hook? Call of i->second->destroy();
?
Have you tried it with Delete all messages from user
in super groups? It usually requires full update of historywidget, is this .dll can handle it as well?
Can you eloborate a little bit more? Like expanded version of explanation? It would help. I most likely understand part about changing time string to 'deleted'. But elobarate the hooking part a little bit.
@tcNmjeD6SpVrpLC AFAIK, cached message deletion requests from the server always through i->second->destroy()
.
Changing call i->second->destroy()
to call
OnDestroyMessage.
In the detour function OnDestroyMessage
, the message ptr will be stored and then processed by another thread.
I think you can easily get these answers if you are willing to read the code.
Then I don't quite understand what you mean by "expanded version", do you mean these? https://github.com/SpriteOvO/Telegram-Anti-Revoke/blob/9d6f8bfd5fce996114cfdafb98e169d58380c078/Source/Core/IRuntime.cpp#L32-L85 Some updates to the TG will change some of the member offsets, and it would be better if they were searched dynamically so that hard-coded offsets are no longer needed and have better compatibility, but at this stage they are not.
BTW, these discussions are offtopic from this issue, so if you want to discuss more, please create a new issue.