iobroker-community-adapters/ioBroker.telegram

Nachricht wird nicht in Thema gesendet / Message is not sent in topic / theme / subgruoup

Closed this issue · 5 comments

nhet commented

Ich habe innerhalb von einer Gruppe ein neues Thema erstellt. Man könnte da vermutlich auch von Subgruppe sprechen. In der Telegram Web UI bekommmen diese "Gruppen" eindeutige IDs in Form einer '_X' an die eigentliche ChatID angefügt. Wobei X für die jeweilige Gruppe steht.
Wenn ich nun mit diesen neuen ChatIDs über den Adapter neue Nachrichten sende, landen diese alle im Hauptchat, ich möchte aber, dass die Nachrichten in die entsprechenden Subgruppen gelangen.

I have created a new topic within a group. You could probably also call it a subgroup. In the Telegram Web UI, these ‘groups’ get unique IDs in the form of an '_X' appended to the main ChatID. Where X stands for the respective group.
If I now send new messages with these new ChatIDs via the adapter, they all end up in the main chat, but I want the messages to end up in the corresponding subgroups.

@nhet Looks like you have to specify the correct chat_id for the subgroup (with an underscore):

"chat_id": "-1001234567890_1234"
nhet commented

In addition to the complete chat_id, it is also necessary to enter the message_thread_id. The message_thread_id only contains the value after the underscore of the chat_id.
The message_thread_id element is probably not yet in the current Telegram Bot implementation. Because I have already tried to specify the complete chat-id including the underscore value in the current version without actually sending messages to this topic.

Please test version 3.7.0

Use state communicate.requestResponse to respond to the last chat id (and thread id). Or send a message directly to a thread in a supergroup:

Example:

## Thread ID
You can also set a thread id for super groups.
```javascript
sendTo('telegram.0', 'send', {
text: 'Message to chat',
chatId: 'SOME-CHAT-ID-123',
message_thread_id: 7,
});
```