iobroker-community-adapters/ioBroker.telegram

callmebot call - passing language shown in example is not working properly

Closed this issue · 1 comments

Describe the bug

https://github.com/iobroker-community-adapters/ioBroker.telegram/tree/master/docs/en#calls-via-telegram

example of passing language is not working
language: 'de-DE-Standard-A'

if you use lang instead language as parameter name
lang: 'de-DE-Standard-A',
calls are made in the passed language to callmebot, otherwise systemlanguages or default is used

To Reproduce
Steps to reproduce the behavior:

send something to callmebot with parameter name language

sendTo('telegram.0', 'call', {
    text: 'Some text',
    user: '@Username', // optional and the call will be done to the first user in telegram.0.communicate.users.
    language: 'de-DE-Standard-A' // optional and the system language will be taken
    repeats: 0, // number of repeats 
});

Expected behavior

the documentation how to pass the language has to be adopt or the code

Screenshots & Logfiles
If applicable, add screenshots and logfiles to help explain your problem.

2023-03-29 01:33:19.583 - debug: telegram.0 (4629) Received command "call": {"text":"SOMETEXTHERE","users":["@user"],"language":"de-DE-Standard-B","repeats":2} 2023-03-29 01:33:19.586 - debug: telegram.0 (4629) CALL: http://api.callmebot.com/start.php?source=iobroker&user=%40user&text=SOMETEXTHERE&rpt=2&lang=en-GB-Standard-A

Versions:

  • Adapter version: v1.15.2
  • JS-Controller version: 4.0.23
  • Node version: v14.21.3
  • Operating system: linux

Additional context
Add any other context about the problem here.

I had the same issue, but i had to replace 'repeats' with 'rpt' also. Calls where working (with spoken message) with this code:

        sendTo('telegram.0','call', {
            text: 'message',
            user: '@username',
            lang: 'de-DE-Standard-A', // optional
            rpt: 2 // number of repeats 
        });