-
Notifications
You must be signed in to change notification settings - Fork 11.1k
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
'send-many-messages' permission not respected when sending via Rocket.Chat.js.SDK #34932
Comments
As per the docs always test on latest code please.
Doesn't specify how many...... :-)
I'd imagine there's reason for that..... Check if rate limiting is involved too. |
Is this the offender? |
And are you using this? https://github.com/RocketChat/Rocket.Chat.js.SDK |
Couldn't have done it, provided that 7.1.0 is very close to the most recent one, took up that risk... Sorry.
I thought 'send-many-messages' together with 'permission' is obvious. It's about this specification: https://docs.rocket.chat/docs/permissions and 'send-many-messages' Codebase Name permission.
Yes, looks like the reason is that apparent lack of permission triggers the error (despite it being set)
Same behaviour for both rate limits settings ('on' or'off'). |
Looks so, however the example I am referring to is taken from the docs web page, as stated in the first step to reproduce (https://developer.rocket.chat/v1/docs/develop-a-rocketchat-sdk-bot) Nonetheless, the change from |
If you check the bug template links Please see our guide for opening issues: https://developer.rocket.chat/rocket.chat/contribute-to-rocket.chat/ways-to-contribute/report-bugs And:
So, setup a test deployment (I always run at least one) and test.
My bad. It wasn't visible from my mobile phone.
OK.
OK.
OK good test thanks.
Ok. Been no work on that repo for a long time. Hmmm. https://github.com/RocketChat/Rocket.Chat.js.SDK Not sure if the readme there is aligned with the docs.... This might be worth a look as an aside. RocketChat/Rocket.Chat.js.SDK#169 I will need to speak to the team about this. |
Not only there - please remember about website dev docs https://developer.rocket.chat/v1/docs/develop-a-rocketchat-sdk-bot
Yes, we also had to deal with this (quick fix implemented already)
Thanks |
I am intrested in solving this issue. Please assign this issue to me |
https://gist.github.com/reetp/b0ba4e3d0ea2ff48ca9da00a5a647d42#github |
Description:
Sending frequent messages (more than 5/sec) using Rocket.Chat.js.SDK raises an error despite having assigned permission 'send-many-messages' to a user.
Steps to reproduce:
node server.js
and send a random message to the user.Expected behavior:
The response shoule be 10 greetings like
Hi there! - 0
with numbers from 0 to 9.Actual behavior:
5 messages are sent and the error is returned:
Temporary workaround
An introduction of a send delay like this solves the issue:
for(let i=0;i<10;i++) setTimeout(async ()=>{await driver.sendToRoomId('Hi there! - '+i, message.rid)},i*200);
Server Setup Information:
The text was updated successfully, but these errors were encountered: