Skip to content

SendTo only works with names instead of userid #982

Description

@gitfvb

Describe the bug
When using the telegram action in the javascripts area in iobroker with the "rules" editor, I can only successfully send messages when selection "all" as receivers. When selecting a single user, the node won't work anymore. In javascript the rules block contains a command like sendTo("telegram.0", "send", {user: "12345", text: subActionVar1747075116560}); and that does not work anymore since an update in the past. Since using a user defined command rule like sendTo("telegram.0", "send", {user: "username", text: "DING DONG"}); it works totally fine again. So that is my workaround.

To Reproduce
Steps to reproduce the behavior:

  1. Open iobroker
  2. Open Javascript Module
  3. Create a new "Rules" script
  4. On the left hand part of the rules drag on the "start script".
  5. On the right hand part drag on the telegram node and choose a specific user and set a message.
  6. Start the script. Nothing arrives...
  7. Then add another node with a userdefined function and insert sendTo("telegram.0", "send", {user: "username", text: "DING DONG"}); and exchange username with your actual username.
  8. Restart the script and I receive DING DONG

Expected behavior
I would expect to choose a user in the telegram node and that it should work.

Screenshots & Logfiles

Versions:

  • Adapter version: 4.1.0
  • JS-Controller version: 7.0.6
  • Node version: v20.19.1
  • Operating system: raspi

Additional context
Here can you see my generic settings for the adapter

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions