Code refactoring

This commit is contained in:
Torsten Schulz
2017-10-12 14:49:07 +02:00
parent 520f3106e3
commit 57ec9c2cb6
5 changed files with 14 additions and 2 deletions

View File

@@ -149,6 +149,16 @@ namespace Yc {
return value;
}
Json::Value Room::userList() {
Json::Value users = Json::arrayValue;
for (auto &user: _users) {
Json::Value jsonUser = Json::objectValue;
jsonUser["name"] = user->name();
users.append(jsonUser);
}
return users;
}
Room::RoomType Room::type() {
return _type;
}