vysheng / tg

telegram-cli
GNU General Public License v2.0
6.51k stars 1.54k forks source link

ability to delete chat history #362

Open boonme opened 10 years ago

boonme commented 10 years ago

Dear Vysheng,

First off, I must say, I love you so much! Thank you very much for developing such a great software. How do we live without CLI?

I am on a project developing a telegram bot. I only use "secret chat".

A is telegram-cli B is the official telegram on android

B sets TTL to 5 seconds A sets/not set TTL doesn't make any difference so far

A sends a message to B B sends a message to A

After 5 seconds, message of B can be deleted using mark_read from telegram-cli. But message of A are not deleted. I am trying to use Lua - delete_msg () but still can't make it.

All in all, I just need the "delete history" feature.

Could you please shed me some light of how to do so?

Best regards,

Boonme

boonme commented 10 years ago

I am building a simple "secret group chat" based on 1:1 secret chat. The only left piece is this ability to delete chat history.

boonme commented 10 years ago

I also can't get the "delete_msg" of telegram-cli application to work either T_T

vysheng commented 10 years ago

Isn't it bug of android client that it doesn't delete message if ttl is set?

vysheng commented 10 years ago

or maybe I don't correctly understand latest layer of encrypted chats. I'll check

boonme commented 10 years ago

Thank you for your reply.

Isn't it bug of android client that it doesn't delete message if ttl is set?

The official telegram for android perfectly delete messages when TTL is set if it is between the official telegram either android-android, ios-ios or android-ios but not telegram-cli.

With telegram-cli, when the TTL is set from Android and telegram-cli calls the mark_read, only messages sent out from telegram-cli are deleted.

Also, when telegram-cli sets the TTL, it seems nothing get affected.

Anyway, now, I have implemented a version of "secret group chat" based on telegram-cli already. It supports only text messages for now. I will add support for sending pictures later. Now, all members have to clear the history manually until the TTL is resolved.

Thanks.

unsigned-nerd commented 10 years ago

boonme, your secret group chat is interesting. Could you give me the source code so I could maintain it?

boonme commented 10 years ago

unsigned-nerd, sent, you have my consent to publish it to the world.

unsigned-nerd commented 10 years ago

Thanks. I have published it on github.

https://github.com/unsigned-nerd/telegram-secret-group-chat

Hopefully, the TTL will work soon ;)

danielberlin commented 10 years ago

I hope Telegram will implement secret group chats in their apps. telegram-cli is great and I appreciate your work. But group chats mostly occur when interacting with humans and they mostly carry smartphones with them, not servers with command lines. ;-) So the best application of telegram-cli is automated notifications running on a server. Do you have any other killer application? Interested in hearing about it...

unsigned-nerd commented 10 years ago

danielberlin, Right. Our version of telegram-secret-group-chat requires a server to deploy telegram-cli with boonbot.lua. It also requires all the people who want to be in this secret group chat to be listed on the boonbot.lua file first. One way to automate this I could think of is to run a public telegram-secret-group-chat. Everyone can add boonbot as a friend. boonbot can receive command to create secret group chat and manage members automatically :)

danielberlin commented 9 years ago

Good work anyway! If I have time, I'm happy to try it out.

gisho commented 9 years ago

i have made a change that makes the client side to delete the message.

https://github.com/gisho/tgl

LukeLR commented 9 years ago

Make a pull request?

On 21 Jun 2015, at 12:06 pm, gisho notifications@github.com wrote:

i have made a change that makes the client side to delete the message.

https://github.com/gisho/tgl

— Reply to this email directly or view it on GitHub.

gisho commented 9 years ago

https://github.com/vysheng/tgl/pull/30