sampaiodiego / rocket.chat.app-poll

Rocket.Chat App for creating polls.
MIT License
50 stars 39 forks source link

Can't create a poll #74

Closed beloniki closed 3 years ago

beloniki commented 3 years ago

Hi.

My attempts to create a poll are failing.

image

RC version 3.18.0, Docker platform.

sampaiodiego commented 3 years ago

that's odd.. I'll probably take a look on how to provide better error messages to make it easier to debug.

can you pls provide additional info?

thanks in advance

beloniki commented 3 years ago

Of course! I tried to create within direct, public channel of private group, public channel, conversation of private channel of private group. Yes, My role is admin. Yes, it was modal. I tried both: empty "/poll" command, and with a subject. Yes, I filled all all the fields, pressed the Create button, and nothing was happened.

Снимок экрана 2021-09-03 в 17 39 01

It works well before upgrade RC to 3.18.0

beloniki commented 3 years ago

Hi

Version 3.18.1 comes with useful logging. I watched this:

server.js:204 System ➔ error Error sending message: Error: Not enough permission
    at validateMessage (app/lib/server/functions/sendMessage.js:151:10)
    at sendMessage (app/lib/server/functions/sendMessage.js:165:2)
    at executeSendMessage (app/lib/server/methods/sendMessage.js:79:10)
    at app/apps/server/bridges/messages.ts:25:23
    at /app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/fiber_pool.js:43:40

So what permissions should I give to the poll user?

beloniki commented 3 years ago

Looks like I found it. The user needs to have an message-impersonate rights.

sampaiodiego commented 3 years ago

great.. thanks for letting us know @beloniki .. so the "app" role didn't have that permission? did you remove it by yourself? it should be there by default

beloniki commented 3 years ago

Yes, the permission were by default. I removed it by myself to use "app" role for custom integrations.

sampaiodiego commented 3 years ago

got it, thx.. I'll talk to RC team and see how we can improve reporting that error to the end user instead of silently fail