|
SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
|
Changes the password of a Room. More...
#include <ChangeRoomPasswordStateRequest.h>
Public Member Functions | |
| ChangeRoomPasswordStateRequest (std::shared_ptr< entities::Room > room, std::string newPass) | |
| Creates a new ChangeRoomPasswordStateRequest. | |
Changes the password of a Room.
It changes the password of the Room and, with it, the "password state" of the Room, that is, whether the Room is protected by a password or not.
On success a event::SFSEvent::ROOM_PASSWORD_STATE_CHANGE event reaches every user who subscribed the Group of the Room, the requester included. If the user is not the creator (owner) of the Room, a event::SFSEvent::ROOM_PASSWORD_STATE_CHANGE_ERROR event is fired instead. An administrator or a moderator does not have this limit.
If the Room was set up so that the password cannot be changed (see the permissions setting in RoomSettings), the request is dropped and no error is fired.
|
inline |
Creates a new ChangeRoomPasswordStateRequest.
Pass it to SmartFox::send for the request to be performed.
| room | The Room whose password must change. |
| newPass | The new password of the Room. Pass an empty string to remove the password. |