windkh / node-red-contrib-telegrambot

Telegram bot nodes for node-red.
Other
260 stars 116 forks source link

Error when sending photo #143

Closed petorian closed 3 years ago

petorian commented 3 years ago

When I try to send a photo, I get the following error: "TypeError: Cannot read property 'sendPhoto' of undefined"

The message is constructed like this: msg.payload.content = '/etc/openhab2/html/lastsnap.jpg'; msg.payload.type = 'photo'; msg.payload.chatId = '-1xxxxxxxx';

/ type can be one of the following photo audio video sticker voice document /

return msg;

windkh commented 3 years ago

Does the send photo example flow in the examples folder work?

windkh commented 3 years ago

I just tried it and ot works using version 8.8.0 image

image

What version do you use?

petorian commented 3 years ago

I'm using version 8.8.0 as well. And version 1.2.3 of Node-Red (installed on Openhabian)

windkh commented 3 years ago

Hm... can you attach a debugger to the node red instance?

petorian commented 3 years ago

I had also a different problem; every time I tried to change anything on the flows, the Deploy button would not respond. I followed this thread: https://discourse.nodered.org/t/deploy-button-not-working/2972/30 and ended up deleting the JSON files and started over with a blank canvas. If I then use the provided example it works perfect. If interested I can share the faulty json file with you windkh, but for me the problem is now solved. Thanks for your quick response.

windkh commented 3 years ago

Yes please send me the faulty json.