automaticall save/restore subscribed chat rooms. The advantage is that auto-subscribed is not needed anymore and chat rooms will survive automatically

This commit is contained in:
csoler 2019-06-15 13:54:34 +02:00
parent ee9c240fb0
commit c72b49c296
No known key found for this signature in database
GPG key ID: 7BCA522266C0804C
7 changed files with 136 additions and 16 deletions

View file

@ -34,6 +34,7 @@
#include "serialiser/rstlvidset.h"
#include "serialiser/rstlvfileitem.h"
#include "retroshare/rsmsgs.h"
/* chat Flags */
const uint32_t RS_CHAT_FLAG_PRIVATE = 0x0001;
@ -82,6 +83,8 @@ const uint8_t RS_PKT_SUBTYPE_CHAT_LOBBY_INVITE_DEPRECATED = 0x1A ; // to be remo
const uint8_t RS_PKT_SUBTYPE_CHAT_LOBBY_INVITE = 0x1B ;
const uint8_t RS_PKT_SUBTYPE_OUTGOING_MAP = 0x1C ;
const uint8_t RS_PKT_SUBTYPE_SUBSCRIBED_CHAT_LOBBY_CONFIG = 0x1D ;
typedef uint64_t ChatLobbyId ;
typedef uint64_t ChatLobbyMsgId ;
typedef std::string ChatLobbyNickName ;
@ -298,6 +301,19 @@ struct RsPrivateChatMsgConfigItem : RsChatItem
uint32_t recvTime;
};
class RsSubscribedChatLobbyConfigItem: public RsChatItem
{
public:
RsSubscribedChatLobbyConfigItem() :RsChatItem(RS_PKT_SUBTYPE_SUBSCRIBED_CHAT_LOBBY_CONFIG) {}
virtual ~RsSubscribedChatLobbyConfigItem() {}
virtual void clear() { RsChatItem::clear(); info.clear(); }
void serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx);
ChatLobbyInfo info;
};
class RsChatLobbyConfigItem: public RsChatItem
{
public: