soberhacker / obsidian-telegram-sync

Transfer messages and files from Telegram to Obsidian
GNU Affero General Public License v3.0
303 stars 30 forks source link

Append \ Rewrite Files #285

Open ValikProgrammer opened 5 months ago

ValikProgrammer commented 5 months ago

I would be great to add this feature: if the message text was edited, apply this changes in Obsidian as well.

MooWantFree commented 5 months ago

image Now if you edit, the edited content will be appended to the end. Do you mean changing the previous content? For example, in the picture, I edited 234 to 2345. According to you, the 234 in the second line should be directly changed to 2345 in obsidian, right?

ValikProgrammer commented 5 months ago

Yeah, your are right. Usually I write long messages in telegram. I take first line as a file name and write message text to this file. Often I want to edit text in this message, but as long as it is edited in telegram, it remains the same in Obsidian. That's a bit inconvinient because you have 2 different versions of the same text in obsidian and in telegram.

Is it possible to update message in obsidian file, when message was updated in telegram?

soberhacker commented 5 months ago

I think we can only partially manage this situation because to locate a message in Obsidian files, we need a unique identifier in the file name. Otherwise, we would need to search for the message by its original text within the Obsidian files, which is a really difficult task. This is because it is resource-intensive. Additionally, Telegram bots only send the new text of the message, so we would need to store the old message in some system storage, etc. Thus, I can only propose a feature that will assist in switching between rewriting files with the same name instead of appending to them.

ValikProgrammer commented 4 months ago

Rewriting is okay for me, I think this feature will be helpfull.