Open florian-bellencontre opened 4 years ago
I see how the message can be confusing.. that was introduced at https://github.com/RocketChat/Rocket.Chat/pull/18024/ and the idea was to keep it working but showing a message saying the integration will fail if a user that is not member of that room in the near future. the warning shows every 1 hour only (that's why you think it shows randomly).
we could change the warning message making it more clear that the message was actually sent (instead of saying it failed to send)
Indeed I think that the message is not very clear and that it needs to be changed. Thanks for the information I added the user to the right channels.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Is there a proper permission that we can provide to the rocket.cat
user or bot
role to allow it to send to all channels?
I'm not seeing anything obvious.
I've added rocket.cat to our critical channels to avoid this, but would rather accomplish this through a permissions change so we don't have to join rocket.cat to any channel we want to send a webhook to.
Are there any news on this?
This is the default/expected behavior on new versions.
A message can only be sent to a channel if the user is on that channel.
Hello,
I understand the purpose behind this restriction, but would it be possible to add a new permission autojoin to some specific bot ? This way, integrations with impersonate as Rocket.cat (or whatever the name of the bot) and the aujotoin permission would work ? In direct messages it's impossible to have one single integration with a specific script. Thanks.
That can be evaluated, but it should no longer be considered a bug, rather a Feature Request
Also, I don't understand the part about direct messages, I can set up incoming or outcomming webhooks that work accordingly at direct too.
Hello,
thanks for your answer.
Here's my outgoing webhook settings:
I need it to work in any room, channel, direct message as it used to.
If I try to call the webhook in a direct message I get this error message:
{"level":50,"time":"2022-04-28T06:50:09.188Z","pid":8,"hostname":"34b1df99a4a8","name":"Integrations","section":"Outgoing WebHook","err":{"type":"Error","message":"error-not-allowed","stack":"Error: error-not-allowed\n at app/authorization/server/functions/canSendMessage.js:20:9\n at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40\n => awaited here:\n at Function.Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)\n at validateRoomMessagePermissions (app/authorization/server/functions/canSendMessage.js:51:10)\n at processWebhookMessage (app/lib/server/functions/processWebhookMessage.js:103:3)\n at RocketChatIntegrationHandler.sendMessage (app/integrations/server/lib/triggerHandler.js:228:13)\n at app/integrations/server/lib/triggerHandler.js:825:34\n at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40"},"msg":"error-not-allowed"}
I tried to disable Impersonate User but I stumbled on the same error.
I can only get it working in channels where the rocket.cat bot is. Obviously it's a hassle to add it on every chan and to explain the users how to do it. Maybe I have to change the settings of the integration, do you know what would be the correct settings ? Thanks.
Description:
Last night I updated my server to the latest version (3.4.2) and I now have a message in my logs telling me that the user "rocket.cat" (bot) can't send messages sometimes.
Steps to reproduce:
I can't reproduce the problem when I do a curl on the API manually I don't get an error message that appears.
Expected behavior:
Do not have WARNING in the logs.
Actual behavior:
Command sent by my monitoring system to RocketChat:
Log of my monitoring system telling me that it sent this message:
Error from the RocketChat server telling me that it can't send the message because it doesn't have the rights:
The alert is sent in the channel on RocketChat:
I don't understand why he's telling me he can't send it if he's sending it anyway. As I said before, it is impossible to reproduce the problem manually and it happens randomly on some messages.
Server Setup Information:
Relevant logs: