Adds a custom field to the room. Note: This will replace an existing field with the same key should it exist already.
the name of the key
the value of the custom field
Adds a member to the room by username
the user's username to add to the room
Adds a user to the room, these are by username until further notice.
the user's username to add to the room
in favor of addMemberToBeAddedByUsername
. This method will be removed on version 2.0.0
Sets the creator of the room.
the user who created the room
Sets the entire custom field property to an object provided. This will overwrite every existing key/values which are unrecoverable.
the data to set
Provides a convient way to set the data for the room. Note: Providing an "id" field here will be ignored.
the room data to set
Sets whether this room should be a default room or not. This means that new users will automatically join this room when they join the server.
room should be default or not
Sets the display name of this room.
the display name of the room
Sets whether this room should display the system messages (like user join, etc) or not. This means that whenever a system event, such as joining or leaving, happens then Rocket.Chat won't send the message to the channel.
whether the messages should display or not
Sets a list of members to the room by usernames
the list of usernames
Sets whether this room should be in read only state or not. This means that users without the required permission to talk when a room is muted will not be able to talk but instead will only be able to read the contents of the room.
whether it should be read only or not
Sets the slugified name of this room, it must align to the rules of Rocket.Chat room names otherwise there will be an error thrown (no spaces, special characters, etc).
the slugified name
Sets the room's type.
the room type
Sets the usernames of who are joined to the room.
the list of usernames
in favor of setMembersByUsernames
. This method will be removed on version 2.0.0
Generated using TypeDoc
Interface for building out a room. Please note, a room creator, name, and type must be set otherwise you will NOT be able to successfully save the room object.