Skip to content

Commit

Permalink
#1774 possible fix
Browse files Browse the repository at this point in the history
  • Loading branch information
hauck-jvsh committed Jul 17, 2023
1 parent 12a615d commit 8b0ea7a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public class ExtractorAndroid extends Extractor {
private boolean hasSubjectCol = false;
private boolean hasMediaDurationCol = false;
private boolean hasGroupParticiantsTable = true;
private boolean hasFoward = false;
private SQLException parsingException = null;

public ExtractorAndroid(String itemPath, File databaseFile, WAContactsDirectory contacts, WAAccount account, boolean recoverDeletedRecords) {
Expand Down Expand Up @@ -150,6 +151,7 @@ protected List<Chat> extractChatList() throws WAExtractorException {
hasEditVersionCol = SQLite3DBParser.checkIfColumnExists(conn, "messages", "edit_version"); //$NON-NLS-1$ //$NON-NLS-2$
hasMediaCaptionCol = SQLite3DBParser.checkIfColumnExists(conn, "messages", "media_caption"); //$NON-NLS-1$ //$NON-NLS-2$
hasMediaDurationCol = SQLite3DBParser.checkIfColumnExists(conn, "messages", "media_duration"); //$NON-NLS-1$ //$NON-NLS-2$
hasFoward = SQLite3DBParser.checkIfColumnExists(conn, "messages", "forwarded"); //$NON-NLS-1$ //$NON-NLS-2$
if (!hasChatView) {
hasSubjectCol = SQLite3DBParser.checkIfColumnExists(conn, "chat_list", "subject"); //$NON-NLS-1$ //$NON-NLS-2$
}
Expand Down Expand Up @@ -501,7 +503,7 @@ private Message createMessageFromDBRow(ResultSet rs, WAContact remote, boolean i
}
}
m.setDeleted(deleted);
m.setForwarded(rs.getInt("forwarded") > 0);
m.setForwarded(hasFoward && (rs.getInt("forwarded") > 0));

return m;
}
Expand Down

0 comments on commit 8b0ea7a

Please sign in to comment.