diff --git a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h
--- a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h
+++ b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.h
@@ -11,6 +11,7 @@
 #include "entities/LocalMessageInfo.h"
 #include "entities/Media.h"
 #include "entities/Message.h"
+#include "entities/SQLiteStatementWrapper.h"
 #include "entities/ThreadActivityEntry.h"
 #include "entities/UserInfo.h"
 
@@ -43,6 +44,8 @@
 #endif
 
   std::optional<int> getSyncedDatabaseVersion(sqlite3 *db) const;
+  std::vector<MessageEntity>
+  processMessagesResults(SQLiteStatementWrapper &preparedSQL) const;
 
 public:
   static std::string sqliteFilePath;
diff --git a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
--- a/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
+++ b/native/cpp/CommonCpp/DatabaseManagers/SQLiteQueryExecutor.cpp
@@ -1390,7 +1390,11 @@
       SQLiteQueryExecutor::getConnection(),
       getAllMessagesSQL,
       "Failed to retrieve all messages.");
+  return this->processMessagesResults(preparedSQL);
+}
 
+std::vector<MessageEntity> SQLiteQueryExecutor::processMessagesResults(
+    SQLiteStatementWrapper &preparedSQL) const {
   std::string prevMsgIdx{};
   std::vector<MessageEntity> allMessages;
 
diff --git a/web/shared-worker/_generated/comm_query_executor.wasm b/web/shared-worker/_generated/comm_query_executor.wasm
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000
GIT binary patch
literal 0
Hc$@<O00001

literal 0
Hc$@<O00001