From c300e10f142cb3e8e70a99dc3c94aff584a7ea26 Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Mon, 19 Feb 2018 13:55:11 +0100 Subject: [PATCH] fix(ChatRoom): return chat messages in chat room history --- src/chat/chat-room/chat-room.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/chat/chat-room/chat-room.cpp b/src/chat/chat-room/chat-room.cpp index 7785774c3..f5251497d 100644 --- a/src/chat/chat-room/chat-room.cpp +++ b/src/chat/chat-room/chat-room.cpp @@ -328,11 +328,20 @@ list> ChatRoom::getMessageHistoryRange (int begin, int end) } list> ChatRoom::getHistory (int nLast) const { - return getCore()->getPrivate()->mainDb->getHistory(getChatRoomId(), nLast, MainDb::Filter::ConferenceInfoNoDeviceFilter); + return getCore()->getPrivate()->mainDb->getHistory( + getChatRoomId(), + nLast, + MainDb::FilterMask({ MainDb::Filter::ConferenceChatMessageFilter, MainDb::Filter::ConferenceInfoNoDeviceFilter }) + ); } list> ChatRoom::getHistoryRange (int begin, int end) const { - return getCore()->getPrivate()->mainDb->getHistoryRange(getChatRoomId(), begin, end, MainDb::Filter::ConferenceInfoNoDeviceFilter); + return getCore()->getPrivate()->mainDb->getHistoryRange( + getChatRoomId(), + begin, + end, + MainDb::FilterMask({ MainDb::Filter::ConferenceChatMessageFilter, MainDb::Filter::ConferenceInfoNoDeviceFilter }) + ); } int ChatRoom::getHistorySize () const {