jordenc / org.telegram.api.bot

Homey Telegram communication
5 stars 6 forks source link

With 2 Homey's and 2 separate Private bots on 1 phone (/Say) Works not separate #12

Closed CliffBroeren closed 6 years ago

CliffBroeren commented 6 years ago

when the (/ Say) Commando is used with 1 of the 2 Bots both homeys talk at the same time, While it is sent to 1 Bot.

The rest are all working super with

2 homeys with each their own private bot

when /Say is sent from a phone with acces to 1 bot/homey Everything is fine

But when its send with a phone with acces to both bots/homeys, Both homeys speak

It is not very bad but there is something to do about it

jordenc commented 6 years ago

Are both Telegrambot (Homey) apps the latest version?

CliffBroeren commented 6 years ago

Yes both are. 0.2.4

jordenc commented 6 years ago

The problem is that messages that are sent to any bot related to Telegram, go to the Athom webhook server.

At the Athom webhook server, I look which "chat id" is sending the message, which is then passed on as a "filter" to all Homeys that are connected to the Telegram app webhook.

If the chat id is registered to Homey, Homey will allow the message. So this is causing 2 custom bots to accept the same message.

--update-- I tried to see if I can see to which bot you're sending, but this is not possible. I only get a chat_id and the ID of the person that sent it, not the (custom) bot ID.

So I am sorry but this is not possible currently.