-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Include room name in message stream for bots #11811
Copy link
Copy link
Closed
Description
A common use case for bots is to have room specific functionality. In the current subscription model, all they get access to is the room ID, so they usually need a subsequent call using DDP or the API to find out the name for the current room using the ID.
It's a very simple solution to just add the room name to the meta (options) object that is the second argument given to the stream event callbacks. This already contains the room type, so it's the logical place.
I know some rooms (DM) don't have a name, but that's fine, the property can contain undefined and the bot can either check for undefined or just use the name when room type is not d.
I have a PR ready for this and am implementing it with bots locally already.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels