Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error after try to delete a message #885

Open
MiRo1310 opened this issue Dec 8, 2024 · 2 comments
Open

Error after try to delete a message #885

MiRo1310 opened this issue Dec 8, 2024 · 2 comments
Labels

Comments

@MiRo1310
Copy link

MiRo1310 commented Dec 8, 2024

After I send a request to delete a message, the message is deleted for the user with the sent chat ID. For the other user who is also registered on Telegram, I get an error message.
I have tried these two types. Is the user optional when i have the chat_id in the options?

sendTo('telegram', { user: user, deleteMessage: { options: { chat_id: getState('telegram.0.communicate.requestChatId').val, message_id: getState('telegram.0.communicate.requestMessageId').val } } });

sendTo('telegram', { deleteMessage: { options: { chat_id: getState('telegram.0.communicate.requestChatId').val, message_id: getState('telegram.0.communicate.requestMessageId').val } } });
telegram_error

@mcm1957
Copy link
Member

mcm1957 commented Dec 8, 2024

versions in use?
adapter
admin
js-controller
node
o/s

and please add complete log with level DEBUG aa text (no mini pictures please)

@MiRo1310
Copy link
Author

MiRo1310 commented Dec 8, 2024

Sorry, of course here are the infos.

Telegram v. 3.9.0
Admin v. 7.1.5
js-controller v. 7.0.3
node v. 20.18.0
OS v. Debian 12 Bookworm

telegram.0
2024-12-08 14:44:07.283 error Failed sending [chatId - 61823*****]: Error: ETELEGRAM: 400 Bad Request: message can't be deleted for everyone

telegram.0
2024-12-08 14:44:07.282 error Failed sending [chatId - 61823*****]: Error: ETELEGRAM: 400 Bad Request: message can't be deleted for everyone

telegram.0
2024-12-08 14:44:07.147 debug Send deleteMessage to "Melanie"

telegram.0
2024-12-08 14:44:07.146 debug Send deleteMessage to "Michael"

telegram.0
2024-12-08 14:44:07.145 debug Received command "send": {"deleteMessage":{"options":{"chat_id":11239*****,"message_id":31493}}}

telegram.0
2024-12-08 14:44:07.144 silly States system redis pmessage io.messagebox.system.adapter.telegram.0/io.messagebox.system.adapter.telegram.0:{"command":"send","message":{"deleteMessage":{"options":{"chat_id":11239*****,"message_id":31493}}},"from":"system.adapter.javascript.0","_id":63182524}

telegram.0
2024-12-08 14:44:06.744 silly Objects user redis pmessage */cfg.o.script.js.common.Test_Skripte.Skript_2:{"common":{"name":"Skript 2","expert":true,"engineType":"JavaScript/js","engine":"system.adapter.javascript.0","source":"// sendTo('telegram', {\r\n// user: user,\r\n// deleteMessage: {\r\n// options: {\r\n// chat_id: getState('telegram.0.communicate.requestChatId').val,\r\n// message_id: getState('telegram.0.communicate.requestMessageId').val\r\n// }\r\n// }\r\n// });\r\n\r\n sendTo('telegram', {\r\n deleteMessage: {\r\n options: {\r\n chat_id: getState('telegram.0.communicate.requestChatId').val,\r\n message_id: getState('telegram.0.communicate.requestMessageId').val\r\n }\r\n }\r\n });\r\n ","debug":false,"verbose":false,"enabled":true},"type":"script","_id":"script.js.common.Test_Skripte.Skript_2","acl":{"object":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"},"from":"system.adapter.admin.0","user":"system.user.admin","ts":1733665446742}

telegram.0
2024-12-08 14:43:31.760 silly Objects user redis pmessage */cfg.o.script.js.common.Test_Skripte.Skript_2:{"common":{"name":"Skript 2","expert":true,"engineType":"JavaScript/js","engine":"system.adapter.javascript.0","source":"sendTo('telegram', {\r\n user: user,\r\n deleteMessage: {\r\n options: {\r\n chat_id: getState('telegram.0.communicate.requestChatId').val,\r\n message_id: getState('telegram.0.communicate.requestMessageId').val\r\n }\r\n }\r\n });\r\n\r\n sendTo('telegram', {\r\n deleteMessage: {\r\n options: {\r\n chat_id: getState('telegram.0.communicate.requestChatId').val,\r\n message_id: getState('telegram.0.communicate.requestMessageId').val\r\n }\r\n }\r\n });\r\n ","debug":false,"verbose":false,"enabled":true},"type":"script","_id":"script.js.common.Test_Skripte.Skript_2","acl":{"object":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"},"from":"system.adapter.admin.0","user":"system.user.admin","ts":1733665411759}

@mcm1957 mcm1957 added bug and removed question labels Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants