From 30b48c59efe1115d7fde68e84796af06f478a735 Mon Sep 17 00:00:00 2001 From: chrisparker126 Date: Sun, 9 Dec 2012 22:38:49 +0000 Subject: [PATCH] Comment and Vote update now functional Voting and comment count update in gui added via msg notification clarified comments in RsTokenService git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5958 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/gxs/rsgxsdataaccess.h | 7 +- libretroshare/src/gxs/rstokenservice.h | 4 +- libretroshare/src/retroshare/rsposted.h | 1 + libretroshare/src/services/p3posted.cc | 205 ++++++++++++++++-- libretroshare/src/services/p3posted.h | 5 +- .../src/gui/Posted/PostedComments.cpp | 1 + retroshare-gui/src/gui/Posted/PostedItem.cpp | 30 ++- retroshare-gui/src/gui/Posted/PostedItem.h | 4 +- retroshare-gui/src/gui/Posted/PostedItem.ui | 13 +- .../src/gui/Posted/PostedListDialog.cpp | 98 ++++++++- .../src/gui/Posted/PostedListDialog.h | 6 +- .../src/gui/Posted/PostedUserTypes.h | 1 + 12 files changed, 339 insertions(+), 36 deletions(-) diff --git a/libretroshare/src/gxs/rsgxsdataaccess.h b/libretroshare/src/gxs/rsgxsdataaccess.h index 5f1e09975..1d6dbe920 100644 --- a/libretroshare/src/gxs/rsgxsdataaccess.h +++ b/libretroshare/src/gxs/rsgxsdataaccess.h @@ -64,7 +64,7 @@ public: bool requestGroupInfo(uint32_t &token, uint32_t ansType, const RsTokReqOptions &opts); /*! - * Use this to get msg related information, store this value to pole for request completion + * Use this to get msg information (id, meta, or data), store token value to poll for request completion * @param token The token returned for the request * @param ansType The type of result wanted * @param opts Additional option that affect outcome of request. Please see specific services, for valid values @@ -74,11 +74,12 @@ public: bool requestMsgInfo(uint32_t &token, uint32_t ansType, const RsTokReqOptions &opts, const GxsMsgReq& msgIds); /*! - * Use this to get msg related information, store this value to pole for request completion + * Use this to get message information (id, meta, or data), store token value to poll for request completion * @param token The token returned for the request * @param ansType The type of result wanted * @param opts Additional option that affect outcome of request. Please see specific services, for valid values - * @param groupIds The ids of the groups to get, this retrieve all the msgs info for each grpId in list + * @param groupIds The ids of the groups to get, this retrieve all the msgs info for each grpId in list, if group Id list is empty \n + * all messages for all groups are retrieved * @return true if request successful false otherwise */ bool requestMsgInfo(uint32_t &token, uint32_t ansType, const RsTokReqOptions &opts, const std::list& grpIds); diff --git a/libretroshare/src/gxs/rstokenservice.h b/libretroshare/src/gxs/rstokenservice.h index 655666104..c8ccb76a8 100644 --- a/libretroshare/src/gxs/rstokenservice.h +++ b/libretroshare/src/gxs/rstokenservice.h @@ -163,10 +163,10 @@ public: * @param token The token returned for the request * @param ansType The type of result wanted * @param opts Additional option that affect outcome of request. Please see specific services, for valid values - * @param groupIds The ids of the groups to get, this retrieve all the msgs info for each grpId in list + * @param groupIds The ids of the groups to get, this retrieves all the msgs info for each grpId in list * @return true if request successful false otherwise */ - virtual bool requestMsgInfo(uint32_t &token, uint32_t ansType, const RsTokReqOptions &opts, const std::list& msgIds) = 0; + virtual bool requestMsgInfo(uint32_t &token, uint32_t ansType, const RsTokReqOptions &opts, const std::list& grpIds) = 0; /*! * For requesting msgs related to a given msg id within a group diff --git a/libretroshare/src/retroshare/rsposted.h b/libretroshare/src/retroshare/rsposted.h index e6ced7349..29ea984b8 100644 --- a/libretroshare/src/retroshare/rsposted.h +++ b/libretroshare/src/retroshare/rsposted.h @@ -134,6 +134,7 @@ class RsPostedPost RsPostedPost() { mMeta.mMsgFlags = RsPosted::FLAG_MSGTYPE_POST; + mMeta.mServiceString = " 0 0 0"; return; } diff --git a/libretroshare/src/services/p3posted.cc b/libretroshare/src/services/p3posted.cc index 0ad470653..b3118e32e 100644 --- a/libretroshare/src/services/p3posted.cc +++ b/libretroshare/src/services/p3posted.cc @@ -18,8 +18,9 @@ #define NUM_TOPICS_TO_GENERATE 1 #define NUM_POSTS_TO_GENERATE 1 #define NUM_VOTES_TO_GENERATE 23 +#define NUM_COMMENTS_TO_GENERATE 23 -#define VOTE_UPDATE_PERIOD 20 // 20 seconds +#define VOTE_UPDATE_PERIOD 30 // 20 seconds const uint32_t RsPosted::FLAG_MSGTYPE_COMMENT = 0x0001; const uint32_t RsPosted::FLAG_MSGTYPE_POST = 0x0002; @@ -44,7 +45,8 @@ RsPostedVote::RsPostedVote(const RsGxsPostedVoteItem& item) p3Posted::p3Posted(RsGeneralDataService *gds, RsNetworkExchangeService *nes) : RsGenExchange(gds, nes, new RsGxsPostedSerialiser(), RS_SERVICE_GXSV1_TYPE_POSTED), RsPosted(this), mPostedMutex("Posted"), - mTokenService(NULL), mGeneratingTopics(true), mGeneratingPosts(false), mRequestPhase1(true), mRequestPhase2(false), mRequestPhase3(false) + mTokenService(NULL), mGeneratingTopics(true), mGeneratingPosts(false), mRequestPhase1(true), mRequestPhase2(false), + mRequestPhase3(false), mGenerateVotesAndComments(false) { mPostUpdate = false; mLastUpdate = time(NULL); @@ -63,6 +65,7 @@ void p3Posted::service_tick() generateTopics(); generatePosts(); + generateVotesAndComments(); time_t now = time(NULL); @@ -76,6 +79,121 @@ void p3Posted::service_tick() updateVotes(); } +void p3Posted::generateVotesAndComments() +{ + if(mGenerateVotesAndComments) + { + + if(mRequestPhase1) + { + // request topics then chose at random which one to use to generate a post about + RsTokReqOptions opts; + opts.mReqType = GXS_REQUEST_TYPE_MSG_IDS; + opts.mMsgFlagFilter = RsPosted::FLAG_MSGTYPE_POST; + opts.mMsgFlagMask = RsPosted::FLAG_MSGTYPE_MASK; + + mTokenService->requestMsgInfo(mToken, 0, opts, mGrpIds); + mRequestPhase1 = false; + mRequestPhase2 = true; + return; + } + + if(mRequestPhase2) + { + + if(mTokenService->requestStatus(mToken) == RsTokenService::GXS_REQUEST_V2_STATUS_COMPLETE) + { + GxsMsgIdResult msgIds; + RsGenExchange::getMsgList(mToken, msgIds); + + // for each msg generate a random number of votes and comments + + + GxsMsgIdResult::iterator mit = msgIds.begin(); + + for(; mit != msgIds.end(); mit++) + { + const RsGxsGroupId& grpId = mit->first; + std::vector& msgIdsV = mit->second; + std::vector::iterator vit = msgIdsV.begin(); + + for(; vit != msgIdsV.end(); vit++) + { + const RsGxsMessageId& msgId = *vit; + + int nVotes = rand()%NUM_VOTES_TO_GENERATE; + uint32_t token; + + for(int i=1; i < nVotes; i++) + { + RsPostedVote v; + + v.mDirection = (rand()%10 > 3) ? 0 : 1; + v.mMeta.mParentId = msgId; + v.mMeta.mGroupId = grpId; + + std::ostringstream ostrm; + ostrm << i; + + v.mMeta.mMsgName = "Vote " + ostrm.str(); + + + + submitVote(token, v); + mTokens.push_back(token); + + } + + int nComments = rand()%NUM_COMMENTS_TO_GENERATE; + + // single level comments for now + for(int i=1; i < nComments; i++) + { + RsPostedComment c; + + std::ostringstream ostrm; + ostrm << i; + + c.mComment = "Comment " + ostrm.str(); + c.mMeta.mParentId = msgId; + c.mMeta.mGroupId = grpId; + + submitComment(token, c); + mTokens.push_back(token); + + } + + } + } + mRequestPhase2 = false; + mRequestPhase3 = true; + } + } + + if(mRequestPhase3) + { + if(!mTokens.empty()) + { + std::vector::iterator vit = mTokens.begin(); + + for(; vit != mTokens.end(); ) + { + if(mTokenService->requestStatus(*vit) == RsTokenService::GXS_REQUEST_V2_STATUS_COMPLETE) + vit = mTokens.erase(vit); + else + vit++; + } + }else + { + // stop generating posts after acknowledging all the ones you created + mGeneratingPosts = false; + mRequestPhase3 = false; + } + } + + } +} + void p3Posted::generatePosts() { if(mGeneratingPosts) @@ -151,6 +269,8 @@ void p3Posted::generatePosts() // stop generating posts after acknowledging all the ones you created mGeneratingPosts = false; mRequestPhase3 = false; + mGenerateVotesAndComments = true; + mRequestPhase1 = true; } } @@ -544,7 +664,7 @@ void p3Posted::calcPostedPostRank(const std::vector msgMeta, Pos std::vector::iterator vit = scores.begin(); int i = 1; - for(; vit != scores.end(); vit) + for(; vit != scores.end(); vit++) { const PostedScore& p = *vit; ranking.insert(std::make_pair(p.msgId, i++)); @@ -697,6 +817,11 @@ void p3Posted::updateVotes() mPostUpdate = updateCompleteVotes(); break; } + case UPDATE_PHASE_COMMENT_COUNT: + { + mPostUpdate = updateCompleteComments(); + break; + } case UPDATE_PHASE_COMPLETE: { updateComplete(); @@ -774,13 +899,13 @@ bool p3Posted::updateRequestVotesComments() } RsTokReqOptions opts; -// // only need ids for comments -// -// opts.mReqType = GXS_REQUEST_TYPE_MSG_IDS; -// opts.mOptions = RS_TOKREQOPT_MSG_LATEST | RS_TOKREQOPT_MSG_PARENT; -// opts.mMsgFlagMask = RsPosted::FLAG_MSGTYPE_MASK; -// opts.mMsgFlagFilter = RsPosted::FLAG_MSGTYPE_COMMENT; -// mTokenService->requestMsgRelatedInfo(mCommentToken, 0, opts, msgIds); + // only need ids for comments + + opts.mReqType = GXS_REQUEST_TYPE_MSG_RELATED_IDS; + opts.mOptions = RS_TOKREQOPT_MSG_LATEST | RS_TOKREQOPT_MSG_PARENT; + opts.mMsgFlagMask = RsPosted::FLAG_MSGTYPE_MASK; + opts.mMsgFlagFilter = RsPosted::FLAG_MSGTYPE_COMMENT; + mTokenService->requestMsgRelatedInfo(mUpdateRequestComments, 0, opts, msgIds); // need actual data for votes opts.mReqType = GXS_REQUEST_TYPE_MSG_RELATED_DATA; @@ -835,7 +960,7 @@ bool p3Posted::updateCompleteVotes() } } } - mUpdatePhase = UPDATE_PHASE_COMPLETE; + mUpdatePhase = UPDATE_PHASE_COMMENT_COUNT; } else if(status == RsTokenService::GXS_REQUEST_V2_STATUS_FAILED) { @@ -845,6 +970,39 @@ bool p3Posted::updateCompleteVotes() return true; } +bool p3Posted::updateCompleteComments() +{ + uint32_t status = mTokenService->requestStatus(mUpdateRequestComments); + + if(status == RsTokenService::GXS_REQUEST_V2_STATUS_COMPLETE) + { + MsgRelatedIdResult commentIds; + RsGenExchange::getMsgRelatedList(mUpdateRequestComments, commentIds); + + // now for each msg count the number of votes and thats it + + MsgRelatedIdResult::iterator mit = commentIds.begin(); + + for(; mit != commentIds.end(); mit++) + { + const std::vector& v = mit->second; + std::vector::const_iterator cit = v.begin(); + + for(; cit != v.end(); cit++) + { + mMsgCounts[mit->first].commentCount++; + } + } + mUpdatePhase = UPDATE_PHASE_COMPLETE; + } + else if(status == RsTokenService::GXS_REQUEST_V2_STATUS_FAILED) + { + mTokenService->cancelRequest(mUpdateRequestComments); + return false; + } + return true; +} + bool p3Posted::updateComplete() { // now compare with msg meta to see what currently store there @@ -867,12 +1025,13 @@ bool p3Posted::updateComplete() msgId.second = msgMeta.mMsgId; PostedScore& sc = mMsgCounts[msgId]; - bool changed = (sc.upVotes != upVotes) || (sc.downVotes != downVotes); + bool changed = (sc.upVotes != upVotes) || (sc.downVotes != downVotes) + || (sc.commentCount != nComments); if(changed) { std::string servStr; - storeScores(servStr, sc.upVotes, sc.downVotes, 0); + storeScores(servStr, sc.upVotes, sc.downVotes, sc.commentCount); uint32_t token; setMsgServiceString(token, msgId, servStr); mChangeTokens.push_back(token); @@ -886,4 +1045,24 @@ bool p3Posted::updateComplete() mPostUpdate = false; mUpdatePhase = UPDATE_PHASE_GRP_REQUEST; + + if(!mMsgCounts.empty()) + { + RsGxsMsgChange* msgChange = new RsGxsMsgChange(); + + std::map::iterator mit_c = mMsgCounts.begin(); + + for(; mit_c != mMsgCounts.end(); mit_c++) + { + const RsGxsGrpMsgIdPair& msgId = mit_c->first; + msgChange->msgChangeMap[msgId.first].push_back(msgId.second); + } + + std::vector n; + n.push_back(msgChange); + notifyChanges(n); + + mMsgCounts.clear(); + } + } diff --git a/libretroshare/src/services/p3posted.h b/libretroshare/src/services/p3posted.h index e006ba69d..d37f9a4bc 100644 --- a/libretroshare/src/services/p3posted.h +++ b/libretroshare/src/services/p3posted.h @@ -74,7 +74,7 @@ public: * Generates random votes to existing posts * in the system */ - void generateVotes(); + void generateVotesAndComments(); public: @@ -163,7 +163,8 @@ private: // for data generation - bool mGeneratingPosts, mGeneratingTopics, mRequestPhase1, mRequestPhase2, mRequestPhase3; + bool mGeneratingPosts, mGeneratingTopics, + mRequestPhase1, mRequestPhase2, mRequestPhase3, mGenerateVotesAndComments; std::vector mTokens; uint32_t mToken; std::list mGrpIds; diff --git a/retroshare-gui/src/gui/Posted/PostedComments.cpp b/retroshare-gui/src/gui/Posted/PostedComments.cpp index 7ef6be1d7..8340cdc49 100644 --- a/retroshare-gui/src/gui/Posted/PostedComments.cpp +++ b/retroshare-gui/src/gui/Posted/PostedComments.cpp @@ -26,6 +26,7 @@ #include + #include #include diff --git a/retroshare-gui/src/gui/Posted/PostedItem.cpp b/retroshare-gui/src/gui/Posted/PostedItem.cpp index 8fd80b09b..d4c99dfff 100644 --- a/retroshare-gui/src/gui/Posted/PostedItem.cpp +++ b/retroshare-gui/src/gui/Posted/PostedItem.cpp @@ -43,6 +43,18 @@ PostedItem::PostedItem(PostedHolder *postHolder, const RsPostedPost &post) setupUi(this); setAttribute ( Qt::WA_DeleteOnClose, true ); + setContent(mPost); + + connect( commentButton, SIGNAL( clicked() ), this, SLOT( loadComments() ) ); + connect( voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote())); + connect( voteDownButton, SIGNAL(clicked()), this, SLOT( makeDownVote())); + + return; +} + +void PostedItem::setContent(const RsPostedPost &post) +{ + mPost = post; QDateTime qtime; qtime.setTime_t(mPost.mMeta.mPublishTs); QString timestamp = qtime.toString("dd.MMMM yyyy hh:mm"); @@ -57,16 +69,20 @@ PostedItem::PostedItem(PostedHolder *postHolder, const RsPostedPost &post) uint32_t up, down, nComments; - rsPosted->retrieveScores(mPost.mMeta.mServiceString, up, down, nComments); + bool ok = rsPosted->retrieveScores(mPost.mMeta.mServiceString, up, down, nComments); - int32_t vote = up - down; - scoreLabel->setText(QString::number(vote)); + if(ok) + { + int32_t vote = up - down; + scoreLabel->setText(QString::number(vote)); - connect( commentButton, SIGNAL( clicked() ), this, SLOT( loadComments() ) ); - connect( voteUpButton, SIGNAL(clicked()), this, SLOT(makeUpVote())); - connect( voteDownButton, SIGNAL(clicked()), this, SLOT( makeDownVote())); + numCommentsLabel->setText("

# Comments: " + + QString::number(nComments) + "

"); + } - return; } RsPostedPost PostedItem::getPost() const diff --git a/retroshare-gui/src/gui/Posted/PostedItem.h b/retroshare-gui/src/gui/Posted/PostedItem.h index a78865040..de968d019 100644 --- a/retroshare-gui/src/gui/Posted/PostedItem.h +++ b/retroshare-gui/src/gui/Posted/PostedItem.h @@ -38,15 +38,15 @@ class PostedHolder virtual void showComments(const RsPostedPost& post) = 0; }; - class PostedItem : public QWidget, private Ui::PostedItem { Q_OBJECT public: - PostedItem(PostedHolder *parent, const RsPostedPost &item); + PostedItem(PostedHolder *parent, const RsPostedPost &post); RsPostedPost getPost() const; + void setContent(const RsPostedPost& post); private slots: void loadComments(); diff --git a/retroshare-gui/src/gui/Posted/PostedItem.ui b/retroshare-gui/src/gui/Posted/PostedItem.ui index aa7c37aa2..608b059c7 100644 --- a/retroshare-gui/src/gui/Posted/PostedItem.ui +++ b/retroshare-gui/src/gui/Posted/PostedItem.ui @@ -250,7 +250,18 @@ border-radius: 10px} - + + + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:10pt; font-weight:600;">#</span><span style=" font-size:8pt; font-weight:600;"> Comments: 0</span></p></body></html> + + + diff --git a/retroshare-gui/src/gui/Posted/PostedListDialog.cpp b/retroshare-gui/src/gui/Posted/PostedListDialog.cpp index 6e632f791..e3c8521f7 100644 --- a/retroshare-gui/src/gui/Posted/PostedListDialog.cpp +++ b/retroshare-gui/src/gui/Posted/PostedListDialog.cpp @@ -140,21 +140,68 @@ void PostedListDialog::showComments(const RsPostedPost& post) void PostedListDialog::updateDisplay() { - std::list groupIds; - std::list::iterator it; if (!rsPosted) return; + + std::list groupIds; + std::map > msgs; + + if (rsPosted->updated()) { /* update Forums List */ - insertGroups(); - insertThreads(); + + rsPosted->groupsChanged(groupIds); + if(!groupIds.empty()) + { + std::list::iterator it = std::find(groupIds.begin(), groupIds.end(), mCurrTopicId); + + if(it != groupIds.end()){ + requestGroupSummary(); + return; + } + } + + rsPosted->msgsChanged(msgs); + + if(!msgs.empty()) + { + + + std::map >::iterator mit = msgs.find(mCurrTopicId); + if(mit != msgs.end()) + { + updateDisplayedItems(mit->second); + } + } } } +void PostedListDialog::updateDisplayedItems(const std::vector &msgIds) +{ + + RsTokReqOptions opts; + + opts.mReqType = GXS_REQUEST_TYPE_MSG_DATA; + opts.mOptions = RS_TOKREQOPT_MSG_LATEST; + + + GxsMsgReq msgs; + msgs[mCurrTopicId] = msgIds; + + std::cerr << "PostedListDialog::updateDisplayedItems(" << mCurrTopicId << ")"; + std::cerr << std::endl; + + uint32_t token; + mPostedQueue->requestMsgInfo(token, RS_TOKREQ_ANSTYPE_DATA, opts, msgs, TOKEN_USER_TYPE_POST_MOD); + +} + + + void PostedListDialog::changedTopic(const QString &id) { mCurrTopicId = id.toStdString(); @@ -362,7 +409,8 @@ void PostedListDialog::loadGroupThreadData_InsertThreads(const uint32_t &token) for(; vit != posts.end(); vit++) { - loadPost(*vit); + RsPostedPost& p = *vit; + loadPost(p); } } @@ -371,6 +419,7 @@ void PostedListDialog::loadPost(const RsPostedPost &post) PostedItem *item = new PostedItem(this, post); connect(item, SIGNAL(vote(RsGxsGrpMsgIdPair,bool)), this, SLOT(submitVote(RsGxsGrpMsgIdPair,bool))); QLayout *alayout = ui.scrollAreaWidgetContents->layout(); + mPosts.insert(post.mMeta.mMsgId, item); alayout->addWidget(item); } @@ -415,9 +464,37 @@ void PostedListDialog::clearPosts() alayout->removeWidget(item); delete item; } + + mPosts.clear(); } +void PostedListDialog::updateCurrentDisplayComplete(const uint32_t &token) +{ + std::cerr << "PostedListDialog::loadGroupThreadData_InsertThreads()"; + std::cerr << std::endl; + PostedPostResult result; + rsPosted->getPost(token, result); + + + if(result.find(mCurrTopicId) == result.end()) + return; + + std::vector& posts = result[mCurrTopicId]; + std::vector::iterator vit = posts.begin(); + + for(; vit != posts.end(); vit++) + { + + RsPostedPost& p = *vit; + + // modify post content + if(mPosts.find(p.mMeta.mMsgId) != mPosts.end()) + mPosts[p.mMeta.mMsgId]->setContent(p); + + } + +} /*********************** **** **** **** ***********************/ /*********************** **** **** **** ***********************/ @@ -470,6 +547,17 @@ void PostedListDialog::loadRequest(const TokenQueue *queue, const TokenRequest & break; } break; + case TOKEN_USER_TYPE_POST_MOD: + switch(req.mAnsType) + { + case RS_TOKREQ_ANSTYPE_DATA: + updateCurrentDisplayComplete(req.mToken); + break; + default: + std::cerr << "Error, unexpected anstype:" << req.mAnsType << std::endl; + break; + } + break; default: std::cerr << "PostedListDialog::loadRequest() ERROR: INVALID TYPE"; std::cerr << std::endl; diff --git a/retroshare-gui/src/gui/Posted/PostedListDialog.h b/retroshare-gui/src/gui/Posted/PostedListDialog.h index 0609a5406..efa809679 100644 --- a/retroshare-gui/src/gui/Posted/PostedListDialog.h +++ b/retroshare-gui/src/gui/Posted/PostedListDialog.h @@ -104,13 +104,16 @@ private: void loadVoteData(const uint32_t &token); + // update displayed item + + void updateDisplayedItems(const std::vector& msgIds); + void updateCurrentDisplayComplete(const uint32_t& token); void insertGroupData(const std::list &groupList); void groupInfoToGroupItemInfo(const RsGroupMetaData &groupInfo, GroupItemInfo &groupItemInfo); void loadRequest(const TokenQueue *queue, const TokenRequest &req); - private: QTreeWidgetItem *yourTopics; @@ -124,6 +127,7 @@ private: RsGxsGroupId mCurrTopicId; QMap mGroups; + QMap mPosts; TokenQueue *mPostedQueue; CommentHolder* mCommentHolder; diff --git a/retroshare-gui/src/gui/Posted/PostedUserTypes.h b/retroshare-gui/src/gui/Posted/PostedUserTypes.h index aa05682ef..228067d6d 100644 --- a/retroshare-gui/src/gui/Posted/PostedUserTypes.h +++ b/retroshare-gui/src/gui/Posted/PostedUserTypes.h @@ -4,5 +4,6 @@ #define TOKEN_USER_TYPE_POST 4 #define TOKEN_USER_TYPE_VOTE 5 #define TOKEN_USER_TYPE_TOPIC 6 +#define TOKEN_USER_TYPE_POST_MOD 7 #endif // POSTEDUSERTYPES_H