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

If some messages are sent at the same time - combine them into one event/note. #293

Open hmnijp opened 3 months ago

hmnijp commented 3 months ago

I suggest a function: 1) the ability to combine at the same time forwarded messages into one event/group/note (arriving in a short time interval) 2) mark the first message of the group as {{comment}} content variable. (check may be needed: if {{user:name}} = "myname" & not(forwaredFrom..)... etc.)

Drawing 2024-05-22 14 10 00 excalidraw

For example the first case: by forwarding a message or a long dialogue to the bot and adding a comment - the bot receives several messages and creates a note for each, which is not convenient.. The first of which is my comment (mark it for using templates - quote, etc.), the rest of the forwarded messages as {content}.

Second case: a lot of pictures are sent to the bot, the telegram unites them in groups of no more than 10 - they are also imported as different notes. In this case, there is no comment - this requires a check - "whether the first message is a comment or not." Then you can simply combine them into one note.