Open jwsp1 opened 4 years ago
@ZzetT While this is easy code-wise (just need to add .withNotification(true|false)
to sendMessage
, the questin is how to integrate that into the actions. It would be easy if we make it a bot-configuration option, but is this flexible enough? If we want to decide on a per-message-basis, we would have to introduce another set of action-methods. I'm not sure if that is the way to go.
I'd prefer a configuration on a per-message-basis because you can easily mute all incoming messages on a chat in Telegram. But sometimes you want to send messages with low prio (=muted) while keeping the opportunity to send it with higher prio (=notification) in the same chat, e.g. when something more important happens.
While this is easy code-wise (just need to add .withNotification(true|false) to sendMessage
This means that it's already possible? If so, I would welcome an entry in readme.
I don't think this is in, but would be awesome to have.
@J-N-K
What are your thoughts on doing this with a channel? If two rules both ran at the exact same time and 1 turned the silent
channel turned ON and the other rule turned it OFF, the result would not be predictable, maybe no noise for both will occur. This is not optimal as it may be an urgent message that does not make a sound anymore.
Possible ways forward are:
This issue has been mentioned on openHAB Community. There might be relevant details there:
https://community.openhab.org/t/telegram-send-silent-message-from-bot/137048/2
@J-N-K Did you see my last post? I am happy to make some changes to the code for this, but want some feedback on which way to head with this.
https://www.openhab.org/addons/bindings/telegram/#actions-to-send-messages-to-all-configured-chats
The actions all come in two formats with the LONG being for chatIDs...
foo(String) foo(Long, String)
Then to complicate it they often have String... as the last argument. This prevents tacking the boolean on the end does it not?
foo(String, String...)
foo(String, String..., boolean) Does this work?
This will be a pain to document and this binding is already a huge pain to learn and make choices with. So I'm leaning towards a channel as a quick solution. Thoughts?
I think it will be fine to have an action method that has this setting as parameter. It is straight forward, non breaking and not difficult to maintain.
Hi guys, are there any news about this issue?
I'd like to send messages silently but it seems this is not implemented in the binding yet.