added admin list to forum group data

This commit is contained in:
csoler 2018-07-15 10:13:04 +02:00
parent 0bc77749d0
commit b20bd0a454
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
3 changed files with 12 additions and 2 deletions

View File

@ -32,8 +32,7 @@
#include "retroshare/rstokenservice.h"
#include "retroshare/rsgxsifacehelper.h"
#include "serialiser/rstlvidset.h"
/* The Main Interface Class - for information about your Peers */
class RsGxsForums;
@ -44,6 +43,7 @@ class RsGxsForumGroup
public:
RsGroupMetaData mMeta;
std::string mDescription;
RsTlvGxsIdSet admin_list; // this is optional, and handled by the serialiser
};
class RsGxsForumMsg

View File

@ -52,7 +52,15 @@ void RsGxsForumGroupItem::clear()
void RsGxsForumGroupItem::serial_process(RsGenericSerializer::SerializeJob j,RsGenericSerializer::SerializeContext& ctx)
{
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_DESCR,mGroup.mDescription,"mGroup.Description");
// image is optional
if(j == RsGenericSerializer::DESERIALIZE && ctx.mOffset == ctx.mSize)
return ;
RsTypeSerializer::serial_process<RsTlvItem>(j,ctx,mGroup.admin_list,"admin_list") ;
}
void RsGxsForumMsgItem::clear()
{
mMsg.mMsg.clear();

View File

@ -61,11 +61,13 @@ const uint32_t ForumEditDefaultsFlags = ForumCreateDefaultsFlags;
GxsForumGroupDialog::GxsForumGroupDialog(TokenQueue *tokenQueue, QWidget *parent)
: GxsGroupDialog(tokenQueue, ForumCreateEnabledFlags, ForumCreateDefaultsFlags, parent)
{
ui.pubKeyShare_cb->setEnabled(true) ;
}
GxsForumGroupDialog::GxsForumGroupDialog(TokenQueue *tokenExternalQueue, RsTokenService *tokenService, Mode mode, RsGxsGroupId groupId, QWidget *parent)
: GxsGroupDialog(tokenExternalQueue, tokenService, mode, groupId, ForumEditEnabledFlags, ForumEditDefaultsFlags, parent)
{
ui.pubKeyShare_cb->setEnabled(true) ;
}
void GxsForumGroupDialog::initUi()