From 8941a19db92ca50a20c8b701e9baa9be5050e1ab Mon Sep 17 00:00:00 2001 From: csoler Date: Fri, 17 Jan 2020 21:22:39 +0100 Subject: [PATCH] fixed mistake that causes missing FeedItems for messages and posted --- libretroshare/src/services/p3msgservice.cc | 9 +++------ retroshare-gui/src/gui/NewsFeed.cpp | 4 ++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/libretroshare/src/services/p3msgservice.cc b/libretroshare/src/services/p3msgservice.cc index 8acd44501..b1c1bf847 100644 --- a/libretroshare/src/services/p3msgservice.cc +++ b/libretroshare/src/services/p3msgservice.cc @@ -2134,8 +2134,7 @@ bool p3MsgService::receiveGxsTransMail( const RsGxsId& authorId, { RS_STACK_MUTEX(recentlyReceivedMutex); - if( mRecentlyReceivedMessageHashes.find(hash) != - mRecentlyReceivedMessageHashes.end() ) + if( mRecentlyReceivedMessageHashes.find(hash) != mRecentlyReceivedMessageHashes.end() ) { RsInfo() << __PRETTY_FUNCTION__ << " (II) receiving " << "message of hash " << hash << " more than once. " @@ -2143,14 +2142,12 @@ bool p3MsgService::receiveGxsTransMail( const RsGxsId& authorId, << std::endl; return true; } - mRecentlyReceivedMessageHashes[hash] = - static_cast(time(nullptr)); + mRecentlyReceivedMessageHashes[hash] = static_cast(time(nullptr)); } IndicateConfigChanged(); - RsItem *item = _serialiser->deserialise( - const_cast(data), &dataSize ); + RsItem *item = _serialiser->deserialise( const_cast(data), &dataSize ); RsMsgItem *msg_item = dynamic_cast(item); if(msg_item) diff --git a/retroshare-gui/src/gui/NewsFeed.cpp b/retroshare-gui/src/gui/NewsFeed.cpp index 1afb1bfc8..872a819ce 100644 --- a/retroshare-gui/src/gui/NewsFeed.cpp +++ b/retroshare-gui/src/gui/NewsFeed.cpp @@ -188,10 +188,10 @@ void NewsFeed::handleEvent_main_thread(std::shared_ptr event) handleForumEvent(event); if(event->mType == RsEventType::GXS_POSTED && (flags & RS_FEED_TYPE_POSTED)) - handleMailEvent(event); + handlePostedEvent(event); if(event->mType == RsEventType::MAIL_STATUS_CHANGE && (flags & RS_FEED_TYPE_MSG)) - handlePostedEvent(event); + handleMailEvent(event); } void NewsFeed::handleMailEvent(std::shared_ptr event)