What's the easiest way to do this guys and gals? Ideally it would be a default admin setting to toggle on or off (if on the hubot could repond to requests in every private chat until it's been removed from the chat.)
This was reported here :
https://github.com/RocketChat/Rocket.Chat/issues/3132
I would like to see the internal hubot in a private group - none of our groups are public
I am experiencing this or similar on v0.57.2 - CentOS 6, Node 4.8.x
If I create a Public channel I can add and chat to the internal hubot.
If I convert it to Private the bot does not respond
Convert back it Public and it works again
Any thoughts on this form the rocket devs ?
Having the ability to have the internal hubot on Private chats would be very useful (and currently you are allowed to add it to a Private chat so you assume it will work, but it won't respond which is confusing)
@MartinSchoeler
You closed #3132. You asked me to open another bug, but one was opened at the same time so I added to it rather than create new.
Are the devs looking at it ?
Anyone looking at his ?
Still exists on 0.58.2
also this seems not be fixed in 0.59.0-rc3
update:
still not fixed in 0.59.0-rc4
Still no progress with this ?
It IS a bug in that you can allow the internal hubot in private rooms but it cannot react.
I presume it is just a switch in the DB ?
Are there any technical limitation to support Hubot in the private chat???
@veerjainATgmail not as far as I am aware. If it works in a public chat I'd guess it should work in private.
I'm still scratching my head as to why this bug is ignored for so long. It's irritating, and frustrating not to have the functionality.
I'm no JS coder so not even sure where to start digging. Perhaps a dev will deign to shed some light on it?
:+1: Even using ROCKETCHAT_ROOM='' and LISTEN_ON_ALL_PUBLIC=true do nothing on docker compose ...
It IS a bug in that you can allow the internal hubot in private rooms but it cannot react.
I assume you mean in a one on one conversation, because hubot works perfect in private rooms.
No - the internal bot doesn't work in private rooms/groups.
See #3132 as well, though I have not rested this
Set a room to Public. Bot responds as expected.
e.g @rocket.cat weather london
rocket.cat 12:00 PM
It is currently 12潞C Partly Cloudy, 67% humidity
Set room to Private. Bot fails to respond at all.
e.g @rocket.cat weather london
No response
Set it back to Public and it responds again.
e.g @rocket.cat weather london
rocket.cat 12:00 PM
It is currently 12潞C Partly Cloudy, 67% humidity
This has been ongoing for several versions as far as I can see.
I think I found where the problem is. If you open the internal hubot source code there is this function :
const InternalHubotReceiver = (message) => {
if (DEBUG) { console.log(message); }
if (message.u.username !== InternalHubot.name) {
const room = RocketChat.models.Rooms.findOneById(message.rid);
if (room.t === 'c') {
const InternalHubotUser = new Hubot.User(message.u.username, {room: message.rid});
const InternalHubotTextMessage = new Hubot.TextMessage(InternalHubotUser, message.msg, message._id);
InternalHubot.adapter.receive(InternalHubotTextMessage);
}
}
return message;
};
You can see that there is a condition on the room type if (room.t === 'c') if you comment it the bot will response on private chat.
I don't know what the 'c' means , if someone can explain what are the rooms type.
@ramrami seems to be the room type described here
https://rocket.chat/docs/developer-guides/realtime-api/the-room-object/
maybe you can try to allow it to c and p (maybe d?)
@eloo yes thank you. I think this should be added to the Internal Hubot as a setting.
I just created an PR to solve this issue : #8933
Most helpful comment
I just created an PR to solve this issue : #8933