teleirc icon indicating copy to clipboard operation
teleirc copied to clipboard

Add message_thread_id support in teleirc.conf

Open devnull-hub-lab opened this issue 1 year ago • 1 comments

Hi folks!

In telegram group, we can have many chat topics. Currently the bridge sends messages from all chat topics to IRC. But I would like to restrict it to just one chat topic (eg. General). In Telegram, this is controlled by the message_thread_id tag.

Is it possible to implement the message_thread_id tag into teleirc.conf?

Either after TELEGRAM_CHAT_ID (eg. -1009999999999/10), or through another parameter (e.g. TELEGRAM_THREAD_ID=10) ?

That would be wonderful!

Thanks!

devnull-hub-lab avatar Aug 22 '24 19:08 devnull-hub-lab

Thanks @Tjzabel for triage!

I've been researching, and it seems the messageThreadID functionality is in WIP (work-in-progress), and would be released in Telegram API 6.5. You can see it here: https://github.com/go-telegram-bot-api/telegram-bot-api/pull/633

MatterBridge had the same problem (https://github.com/42wim/matterbridge/pull/1942), and the solution found was to fork https://github.com/go-telegram-bot-api/telegram-bot-api , and apply a patch to integrate messageThreadID into the BaseChat structure.

Just to know, the fork created by him was https://github.com/matterbridge/telegram-bot-api/v6

So maybe we can consider in create a telegram-bot-api fork too and apply the patch, until the moment the telegram bot api finishes the commit on the branch.

Just a suggestion.

Thanks, devnull

devnull-hub-lab avatar Sep 01 '24 03:09 devnull-hub-lab