Telethon secret chat plugin
Project description
Secret chat plugin for telethon
This is still a work in progress so expect more commits to it. Used https://core.telegram.org/api/end-to-end at first but it wasn’t clear enough so I followed their advice and checked one of the implementations that had it https://github.com/danog/MadelineProto so this pluigin is based on daniil’s implementation at its core.
☒ Accepting secret chats
☒ Creating secret chats
☒ Closing secret chats
☒ Sending text messages
☒ Recieving text messages
☒ Uploading/downloading media
☒ Dealing with rekeying¹
☐ Saving secret chats keys to database²
☐ Saving messages to database³
☒ Automatic decryption/accepting/finishing
¹ Every 100 messages you need to recreate the auth key.
² Auth keys are saved client sides so if you restart the script you will lose all secret chats you had and can no longer recieve messages from them
³ There is no get_messages function in secret chats so users can’t see old messages.
Examples :
client = TelegramClient(...) async def replier(event): # all events are encrypted by default if event.decrypted_event.message and event.decrypted_event.message == "hello": await event.reply("hi") manager = SecretChatManager(client, auto_accept=True) # automatically accept new secret chats manager.add_secret_event_handler(func=replier) # we can specify the type of the event client.run_until_disconnected()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for telethon_secret_chat-0.1.13.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b6e100d1c6bdf091dad707bd343441fe6fcb98823ae6f732ec71bf740b086be |
|
MD5 | b263e67cd789f4fbdfd5bb17bd02f7da |
|
BLAKE2b-256 | 6a90b2733f31a4e9b39ed38b4076037d032977bd8627da9993883037b371da15 |
Hashes for telethon_secret_chat-0.1.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e588afd7acd148d04de74e5802aacb750faeb8472af34be1c1791750ddeb1011 |
|
MD5 | 15d1b82bbecd35997ffbbda33ac1412b |
|
BLAKE2b-256 | dfd43c41756d527cc0c2f23e5f874d43fb878724b2e3c0e1181c78dd70656753 |