UserInfo --> MemberInfo
This commit is contained in:
parent
7d8970d1b4
commit
6394b300de
3 changed files with 5 additions and 5 deletions
|
@ -13,7 +13,7 @@ make install
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
This library depends on jansson and liburl, so be sure to add the following libraries to your projects makefile:
|
This library depends on jansson and libcurl, so be sure to add the following libraries to your projects makefile:
|
||||||
```
|
```
|
||||||
-lmatrix-3ds-sdk -ljansson `curl-config --libs`
|
-lmatrix-3ds-sdk -ljansson `curl-config --libs`
|
||||||
```
|
```
|
||||||
|
|
|
@ -22,7 +22,7 @@ struct RoomInfo {
|
||||||
std::string avatarUrl;
|
std::string avatarUrl;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct UserInfo {
|
struct MemberInfo {
|
||||||
std::string displayname;
|
std::string displayname;
|
||||||
std::string avatarUrl;
|
std::string avatarUrl;
|
||||||
};
|
};
|
||||||
|
@ -69,7 +69,7 @@ public:
|
||||||
std::string resolveRoom(std::string alias);
|
std::string resolveRoom(std::string alias);
|
||||||
std::vector<std::string> getJoinedRooms();
|
std::vector<std::string> getJoinedRooms();
|
||||||
RoomInfo getRoomInfo(std::string roomId);
|
RoomInfo getRoomInfo(std::string roomId);
|
||||||
UserInfo getUserInfo(std::string userId, std::string roomId = "");
|
MemberInfo getMemberInfo(std::string userId, std::string roomId = "");
|
||||||
std::string getRoomName(std::string roomId);
|
std::string getRoomName(std::string roomId);
|
||||||
std::string getRoomTopic(std::string roomId);
|
std::string getRoomTopic(std::string roomId);
|
||||||
std::string getRoomAvatar(std::string roomId);
|
std::string getRoomAvatar(std::string roomId);
|
||||||
|
|
|
@ -154,7 +154,7 @@ RoomInfo Client::getRoomInfo(std::string roomId) {
|
||||||
return info;
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
UserInfo Client::getUserInfo(std::string userId, std::string roomId) {
|
MemberInfo Client::getMemberInfo(std::string userId, std::string roomId) {
|
||||||
std::string displayname = "";
|
std::string displayname = "";
|
||||||
std::string avatarUrl = "";
|
std::string avatarUrl = "";
|
||||||
if (roomId != "") {
|
if (roomId != "") {
|
||||||
|
@ -190,7 +190,7 @@ UserInfo Client::getUserInfo(std::string userId, std::string roomId) {
|
||||||
json_decref(ret);
|
json_decref(ret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UserInfo info = {
|
MemberInfo info = {
|
||||||
displayname: displayname,
|
displayname: displayname,
|
||||||
avatarUrl: avatarUrl,
|
avatarUrl: avatarUrl,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue