openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.86k stars 3.57k forks source link

[Telegram] Item for Channel lastMessageText no "received update" events #9897

Closed dvehof closed 3 years ago

dvehof commented 3 years ago

Expected Behavior

When text gets sent i expect an "received update" event for the last message even if the text that got sent does not change (Hint: An item changed event gets fired if the text changed, of course not if the text did not change)

Current Behavior

No "received update" gets fired if a text is received by the telegram bot, only a "changed" event if the text is no equal to what was sent before The docs state you can use "received update" for the last sent message, i also did this in openhab2 and it worked. in openhab3 it stopped working.

Possible Solution

Fire an "received update" event

Steps to Reproduce (for Bugs)

send a message to a telegram bot and watch the events log to see there is no "received update" event.

Context

without the "received update" it is not possible to get a sent message with the same text more than once (changed event only fires if message differs from the last sent message)

Your Environment

dvehof commented 3 years ago

There is nothing in the changelog but with 3.0.1 it works for me. Maybe not related to the update but cannot reproduce the problem, so I close this ticket.

e1ke commented 1 year ago

I had the same issue with openHab 3.4.2, only that not even the item from lastMessageText changed. I tried it with "/" as a prefix and that works. Both 'Item telegramMessage changed' as well as 'Item telegramMessage received update' work, when I write "/test" instead of "test" in my Telegram Group with my Chat bot in it. Hope this helps somebody