libresapi: make list of chat lobby participants available at chat/lobby_participants/<chat_id>

This commit is contained in:
electron128 2016-02-07 14:09:33 +01:00
parent 3a9ff8e1ea
commit 2c2c7936e5
2 changed files with 101 additions and 1 deletions

View file

@ -81,6 +81,12 @@ public:
}
};
class LobbyParticipantsInfo{
public:
StateToken state_token;
std::map<RsGxsId, time_t> participants;
};
class ChatInfo{
public:
bool is_broadcast;
@ -96,6 +102,7 @@ private:
void handleLobbies(Request& req, Response& resp);
void handleSubscribeLobby(Request& req, Response& resp);
void handleUnsubscribeLobby(Request& req, Response& resp);
ResponseTask* handleLobbyParticipants(Request& req, Response& resp);
void handleMessages(Request& req, Response& resp);
void handleSendMessage(Request& req, Response& resp);
void handleMarkChatAsRead(Request& req, Response& resp);
@ -124,6 +131,8 @@ private:
StateToken mLobbiesStateToken;
std::vector<Lobby> mLobbies;
std::map<ChatLobbyId, LobbyParticipantsInfo> mLobbyParticipantsInfos;
StateToken mUnreadMsgsStateToken;
};