diff --git a/libretroshare/src/gxs/rsgenexchange.h b/libretroshare/src/gxs/rsgenexchange.h index 9cb8d0734..da29c3f3b 100644 --- a/libretroshare/src/gxs/rsgenexchange.h +++ b/libretroshare/src/gxs/rsgenexchange.h @@ -583,6 +583,11 @@ public: */ void setGroupReputationCutOff(uint32_t& token, const RsGxsGroupId& grpId, int CutOff); + /*! + * @return storage time of messages in months + */ + int getStoragePeriod(){ return MESSAGE_STORE_PERIOD/(60*60*24*31);} + /*! * sets the msg status flag * @param token this is set to token value associated to this request diff --git a/libretroshare/src/retroshare/rsgxsiface.h b/libretroshare/src/retroshare/rsgxsiface.h index 9b555f2fe..a8a28f96f 100644 --- a/libretroshare/src/retroshare/rsgxsiface.h +++ b/libretroshare/src/retroshare/rsgxsiface.h @@ -170,6 +170,11 @@ public: * @param CutOff The cut off value to set */ virtual void setGroupReputationCutOff(uint32_t& token, const RsGxsGroupId& grpId, int CutOff) = 0; + + /*! + * @return storage time of messages in months + */ + virtual int getStoragePeriod() = 0; }; diff --git a/libretroshare/src/retroshare/rsgxsifacehelper.h b/libretroshare/src/retroshare/rsgxsifacehelper.h index 3856c7294..198d1466f 100644 --- a/libretroshare/src/retroshare/rsgxsifacehelper.h +++ b/libretroshare/src/retroshare/rsgxsifacehelper.h @@ -208,6 +208,14 @@ public: return mGxs->setGroupReputationCutOff(token, grpId, CutOff); } + /*! + * @return storage time of messages in months + */ + int getStoragePeriod() + { + return mGxs->getStoragePeriod(); + } + private: RsGxsIface* mGxs; diff --git a/libretroshare/src/services/p3gxsforums.cc b/libretroshare/src/services/p3gxsforums.cc index ec8cbd39e..c8c91a065 100644 --- a/libretroshare/src/services/p3gxsforums.cc +++ b/libretroshare/src/services/p3gxsforums.cc @@ -44,6 +44,7 @@ RsGxsForums *rsGxsForums = NULL; +const uint32_t GXSFORUMS_MSG_STORE_PERIOD = 60*60*24*31*12; // 12 months / 1 year #define FORUM_TESTEVENT_DUMMYDATA 0x0001 #define DUMMYDATA_PERIOD 60 // long enough for some RsIdentities to be generated. @@ -53,7 +54,7 @@ RsGxsForums *rsGxsForums = NULL; /********************************************************************************/ p3GxsForums::p3GxsForums(RsGeneralDataService *gds, RsNetworkExchangeService *nes, RsGixs* gixs) - : RsGenExchange(gds, nes, new RsGxsForumSerialiser(), RS_SERVICE_GXS_TYPE_FORUMS, gixs, forumsAuthenPolicy()), RsGxsForums(this) + : RsGenExchange(gds, nes, new RsGxsForumSerialiser(), RS_SERVICE_GXS_TYPE_FORUMS, gixs, forumsAuthenPolicy(), GXSFORUMS_MSG_STORE_PERIOD), RsGxsForums(this) { // For Dummy Msgs. mGenActive = false; diff --git a/retroshare-gui/src/gui/Posted/PostedDialog.cpp b/retroshare-gui/src/gui/Posted/PostedDialog.cpp index e19e2d015..ce007fd6d 100644 --- a/retroshare-gui/src/gui/Posted/PostedDialog.cpp +++ b/retroshare-gui/src/gui/Posted/PostedDialog.cpp @@ -63,7 +63,9 @@ QString PostedDialog::getHelpString() const channels

\

Links can be commented by subscribed users. A promotion system also gives the opportunity to \ enlight important links.

\ -

There is no restriction on which links are shared. Be careful when clicking on them.

") ; +

There is no restriction on which links are shared. Be careful when clicking on them.

\ +

Posted links get deleted after %1 months.

\ + ").arg(QString::number(rsPosted->getStoragePeriod())); return hlp_str ; } diff --git a/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.cpp b/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.cpp index cbdd34a15..b8a7727ca 100644 --- a/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.cpp +++ b/retroshare-gui/src/gui/gxschannels/GxsChannelDialog.cpp @@ -60,8 +60,9 @@ QString GxsChannelDialog::getHelpString() const the posting rights or the reading rights with friend Retroshare nodes.

\

Channels can be made anonymous, or attached to a Retroshare identity so that readers can contact you if needed.\ Enable \"Allow Comments\" if you want to let users comment on your posts.

\ - ") ; - +

Channel posts get deleted after %1 months.

\ + ").arg(QString::number(rsGxsChannels->getStoragePeriod())); + return hlp_str ; } diff --git a/retroshare-gui/src/gui/gxsforums/GxsForumsDialog.cpp b/retroshare-gui/src/gui/gxsforums/GxsForumsDialog.cpp index c5435dc23..5b298d76e 100644 --- a/retroshare-gui/src/gui/gxsforums/GxsForumsDialog.cpp +++ b/retroshare-gui/src/gui/gxsforums/GxsForumsDialog.cpp @@ -54,7 +54,8 @@ QString GxsForumsDialog::getHelpString() const

Retroshare Forums look like internet forums, but they work in a decentralized way

\

You see forums your friends are subscribed to, and you forward subscribed forums to \ your friends. This automatically promotes interesting forums in the network.

\ - "); +

Forum messages get deleted after %1 months.

\ + ").arg(QString::number(rsGxsForums->getStoragePeriod())); // not true anymore in v0.6 /*