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

Blocking users results in rocket.cat error message #17400

Closed
bbrauns opened this issue Apr 23, 2020 · 4 comments · Fixed by #17406
Closed

Blocking users results in rocket.cat error message #17400

bbrauns opened this issue Apr 23, 2020 · 4 comments · Fixed by #17406

Comments

@bbrauns
Copy link
Contributor

bbrauns commented Apr 23, 2020

Description:

Blocking a user results in getting an "Error" response from rocket.cat. It is not possible to send messages.

Steps to reproduce:

  1. Block a user
  2. Try to send a message

Expected behavior:

Message successfully sent.

Actual behavior:

block-user

Server Setup Information:

  • Version of Rocket.Chat Server: 3.1.1

Client Setup Information

  • Desktop App or Browser Version:
  • Operating System:

Additional context

Relevant logs:

Apr 23 09:08:28 chat-stage rocketchat_app_scale_1[970]: server.js:204 Meteor ➔ method stream -> userId: null, arguments: ["notify-room","mrkyTQT9omoYhYRJZ/typing",{"0":"xyz","1":false}]
Apr 23 09:08:28 chat-stage rocketchat_app_scale_3[970]: server.js:204 System ➔ error Error sending message: Error: room_is_blocked
Apr 23 09:08:28 chat-stage rocketchat_app_scale_3[970]:     at app/authorization/server/functions/canSendMessage.js:21:9
Apr 23 09:08:28 chat-stage rocketchat_app_scale_3[970]:     at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40
Apr 23 09:08:28 chat-stage rocketchat_app_scale_3[970]:  => awaited here:
Apr 23 09:08:28 chat-stage rocketchat_app_scale_3[970]:     at Function.Promise.await (/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:56:12)
Apr 23 09:08:28 chat-stage rocketchat_app_scale_3[970]:     at canSendMessage (app/authorization/server/functions/canSendMessage.js:38:84)
Apr 23 09:08:28 chat-stage rocketchat_app_scale_3[970]:     at executeSendMessage (app/lib/server/methods/sendMessage.js:71:16)
Apr 23 09:08:28 chat-stage rocketchat_app_scale_3[970]:     at MethodInvocation.sendMessage (app/lib/server/methods/sendMessage.js:105:10)
Apr 23 09:08:28 chat-stage rocketchat_app_scale_3[970]:     at maybeAuditArgumentChecks (packages/ddp-server/livedata_server.js:1771:12)
Apr 23 09:08:28 chat-stage rocketchat_app_scale_3[970]:     at packages/ddp-server/livedata_server.js:719:19
Apr 23 09:08:28 chat-stage rocketchat_app_scale_3[970]:     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
Apr 23 09:08:28 chat-stage rocketchat_app_scale_3[970]:     at packages/ddp-server/livedata_server.js:717:46
Apr 23 09:08:28 chat-stage rocketchat_app_scale_3[970]:     at Meteor.EnvironmentVariable.EVp.withValue (packages/meteor.js:1234:12)
Apr 23 09:08:28 chat-stage rocketchat_app_scale_3[970]:     at packages/ddp-server/livedata_server.js:715:46
Apr 23 09:08:28 chat-stage rocketchat_app_scale_3[970]:     at new Promise (<anonymous>)
Apr 23 09:08:28 chat-stage rocketchat_app_scale_3[970]:     at Session.method (packages/ddp-server/livedata_server.js:689:23)
Apr 23 09:08:28 chat-stage rocketchat_app_scale_3[970]:     at packages/ddp-server/livedata_server.js:559:43
@sampaiodiego
Copy link
Member

sampaiodiego commented Apr 23, 2020

what browser and browser version are you using? are there any modifications on the source code?

the issue here is that your UI didn't change to reflect the new room state.. when you block a person the UI hides the message box, so you cannot even try sending a message.

the server sending an error is the expected result.

Edit: this applies only to DMs, which is not the case on this issue.

@benedikt-wegmann
Copy link

But this is the part that puzzels me. If I block a user, why does "the room state" change and why should I be barred from sending a message to the room if I block a user?

@sampaiodiego
Copy link
Member

oh, I'm sorry, what I described is actually the expected behaviour on a DM with a blocked user. I'll edit my comment to reflect that.

but the issue is on a public channel, so it is totally different scenario. I'll check what is happening.. thanks @benedikt-wegmann

@benedikt-wegmann
Copy link

thanks for looking into it! 💪 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants