fixed mistake that causes missing FeedItems for messages and posted

This commit is contained in:
csoler 2020-01-17 21:22:39 +01:00
parent 5df7f7667f
commit 8941a19db9
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C
2 changed files with 5 additions and 8 deletions

View File

@ -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<uint32_t>(time(nullptr));
mRecentlyReceivedMessageHashes[hash] = static_cast<uint32_t>(time(nullptr));
}
IndicateConfigChanged();
RsItem *item = _serialiser->deserialise(
const_cast<uint8_t*>(data), &dataSize );
RsItem *item = _serialiser->deserialise( const_cast<uint8_t*>(data), &dataSize );
RsMsgItem *msg_item = dynamic_cast<RsMsgItem*>(item);
if(msg_item)

View File

@ -188,10 +188,10 @@ void NewsFeed::handleEvent_main_thread(std::shared_ptr<const RsEvent> 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<const RsEvent> event)