icedaq / hubot-telegram-user-whitelist-middleware

Adds ability to whitelist telegram users in hubot.
Apache License 2.0
0 stars 0 forks source link

It is not possible to whitelist rooms #1

Open come-maiz opened 8 years ago

come-maiz commented 8 years ago

I'm using hubot+telegram+tweeter to let a channel in telegram send tweets from the group account. So I want to whitelist that channel and ignore any other messages. It would be great if this script supports that use case.

I hacked your script to make it work for our usecase: https://github.com/JaquerEspeis/eljaqueado/blob/master/scripts/whitelist_room.coffee

This is my first contact with coffee script, so I'm not yet ready to propose the change myself in a clean way, but I can try in a couple of weeks after playing a little more with the language.

icedaq commented 8 years ago

Hi elopie, Thanks for your message. Whitelisting a room seems to make sense. I assume that a room for you is a telegram group? And if yes, what is the identifier of such a group? Just the name of the group?

Actually I do not know a lot about coffee script myself but merging our two scripts seems trivial enough.

come-maiz commented 8 years ago

Yes, I considered a room to be a telegram group. But hubot and/or telegram also consider a room when you talk in private with the bot. The identifier is a number, that seems to be positive for users (I assume this is the id of the user), and negative for a group.

bafplus commented 7 years ago

is this already merged?

bafplus commented 7 years ago

And it would also be nice to have a "get group id" command