mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04:00
added background for post pinning and logic to edit others posts
This commit is contained in:
parent
ded9c21617
commit
5b1c150acb
8 changed files with 129 additions and 49 deletions
|
@ -43,7 +43,11 @@ class RsGxsForumGroup
|
|||
public:
|
||||
RsGroupMetaData mMeta;
|
||||
std::string mDescription;
|
||||
RsTlvGxsIdSet mAdminList; // this is optional, and handled by the serialiser
|
||||
|
||||
// What's below is optional, and handled by the serialiser
|
||||
|
||||
RsTlvGxsIdSet mAdminList;
|
||||
RsTlvGxsMsgIdSet mPinnedPosts;
|
||||
};
|
||||
|
||||
class RsGxsForumMsg
|
||||
|
|
|
@ -53,12 +53,13 @@ void RsGxsForumGroupItem::serial_process(RsGenericSerializer::SerializeJob j,RsG
|
|||
{
|
||||
RsTypeSerializer::serial_process(j,ctx,TLV_TYPE_STR_DESCR,mGroup.mDescription,"mGroup.Description");
|
||||
|
||||
// image is optional
|
||||
// This is for backward compatibility: normally all members are serialized, but in the previous version, these members are missing.
|
||||
|
||||
if(j == RsGenericSerializer::DESERIALIZE && ctx.mOffset == ctx.mSize)
|
||||
return ;
|
||||
|
||||
RsTypeSerializer::serial_process<RsTlvItem>(j,ctx,mGroup.mAdminList,"admin_list") ;
|
||||
RsTypeSerializer::serial_process<RsTlvItem>(j,ctx,mGroup.mAdminList ,"admin_list" ) ;
|
||||
RsTypeSerializer::serial_process<RsTlvItem>(j,ctx,mGroup.mPinnedPosts,"pinned_posts") ;
|
||||
}
|
||||
|
||||
void RsGxsForumMsgItem::clear()
|
||||
|
|
|
@ -205,6 +205,7 @@ const uint16_t TLV_TYPE_RECOGNSET = 0x1024;
|
|||
const uint16_t TLV_TYPE_GXSIDSET = 0x1025;
|
||||
const uint16_t TLV_TYPE_GXSCIRCLEIDSET= 0x1026;
|
||||
const uint16_t TLV_TYPE_NODEGROUPIDSET= 0x1027;
|
||||
const uint16_t TLV_TYPE_GXSMSGIDSET = 0x1028;
|
||||
|
||||
const uint16_t TLV_TYPE_SERVICESET = 0x1030;
|
||||
|
||||
|
|
|
@ -118,12 +118,13 @@ template<class ID_CLASS,uint32_t TLV_TYPE> class t_RsTlvIdSet: public RsTlvItem
|
|||
std::set<ID_CLASS> ids ;
|
||||
};
|
||||
|
||||
typedef t_RsTlvIdSet<RsPeerId, TLV_TYPE_PEERSET> RsTlvPeerIdSet ;
|
||||
typedef t_RsTlvIdSet<RsPgpId, TLV_TYPE_PGPIDSET> RsTlvPgpIdSet ;
|
||||
typedef t_RsTlvIdSet<Sha1CheckSum, TLV_TYPE_HASHSET> RsTlvHashSet ;
|
||||
typedef t_RsTlvIdSet<RsGxsId, TLV_TYPE_GXSIDSET> RsTlvGxsIdSet ;
|
||||
typedef t_RsTlvIdSet<RsGxsCircleId,TLV_TYPE_GXSCIRCLEIDSET> RsTlvGxsCircleIdSet ;
|
||||
typedef t_RsTlvIdSet<RsNodeGroupId,TLV_TYPE_NODEGROUPIDSET> RsTlvNodeGroupIdSet ;
|
||||
typedef t_RsTlvIdSet<RsPeerId, TLV_TYPE_PEERSET> RsTlvPeerIdSet ;
|
||||
typedef t_RsTlvIdSet<RsPgpId, TLV_TYPE_PGPIDSET> RsTlvPgpIdSet ;
|
||||
typedef t_RsTlvIdSet<Sha1CheckSum, TLV_TYPE_HASHSET> RsTlvHashSet ;
|
||||
typedef t_RsTlvIdSet<RsGxsId, TLV_TYPE_GXSIDSET> RsTlvGxsIdSet ;
|
||||
typedef t_RsTlvIdSet<RsGxsMessageId,TLV_TYPE_GXSMSGIDSET> RsTlvGxsMsgIdSet ;
|
||||
typedef t_RsTlvIdSet<RsGxsCircleId, TLV_TYPE_GXSCIRCLEIDSET> RsTlvGxsCircleIdSet ;
|
||||
typedef t_RsTlvIdSet<RsNodeGroupId, TLV_TYPE_NODEGROUPIDSET> RsTlvNodeGroupIdSet ;
|
||||
|
||||
class RsTlvServiceIdSet: public RsTlvItem
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue