diff --git a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java index 3ac942589a..c7bd1ba379 100644 --- a/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java +++ b/iped-parsers/iped-parsers-impl/src/main/java/iped/parsers/whatsapp/ExtractorAndroidNew.java @@ -123,7 +123,7 @@ protected List extractChatList() throws WAExtractorException { Map idToChat = new HashMap(); try (Connection conn = getConnection(); Statement stmt = conn.createStatement()) { - try (ResultSet rs = stmt.executeQuery(SELECT_CHAT_VIEW)) { + try (ResultSet rs = stmt.executeQuery(SELECT_CHATS)) { while (rs.next()) { String contactId = rs.getString("contact"); //$NON-NLS-1$ @@ -946,8 +946,8 @@ protected Message.MessageType decodeMessageType(int messageType, int status, Int return result; } - private static final String SELECT_CHAT_VIEW = "SELECT _id as id, raw_string_jid AS contact," //$NON-NLS-1$ - + " subject, created_timestamp as creation, sort_timestamp FROM chat_view ORDER BY sort_timestamp DESC"; //$NON-NLS-1$ + private static final String SELECT_CHATS = "SELECT c._id as id, j.raw_string AS contact, c.subject, c.created_timestamp as creation," + + " sort_timestamp FROM chat c, jid j WHERE c.jid_row_id = j._id ORDER BY c.sort_timestamp DESC"; private static final String SELECT_ADD_ONS = "SELECT message_add_on_type as type,timestamp, status,jid.raw_string as remoteResource,from_me as fromMe FROM message_add_on m left join jid on jid._id=m.sender_jid_row_id where parent_message_row_id=?";