From 2a5b4f9d483b3553b7953658f9ab502a53a7c053 Mon Sep 17 00:00:00 2001 From: Dessan Hemrayev <43703214+dessanhemrayev@users.noreply.github.com> Date: Thu, 9 Oct 2025 11:25:54 +0300 Subject: [PATCH 1/2] fix: Ensure cross-database compatibility for unread message count query In the "ofpresence" table, the "offlineDate" field has the data type "VARCHAR/CHAR" depending on the database, and in the query we are trying to compare this field with the "sentDate" field, which has the data type "BIGINT/INTEGER". This results in the following error: ``` ERROR: operator does not exist: bigint > character varying LINE 3: JOIN ofPresence p ON (a.sentDate > p.offlineDate) HINT: No operator matches the given name and argument types. You might need to add explicit type casts. ``` This change replaces implicit comparison with explicit, database-specific CAST expressions. The correct CAST is selected at runtime based on the underlying database (MySQL, PostgreSQL, SQL Server, Oracle, Sybase), ensuring reliable and portable behavior across all Openfire-supported DBs. --- changelog.html | 5 ++++ plugin.xml | 2 +- .../rest/controller/MsgArchiveController.java | 30 +++++++++++++++---- 3 files changed, 31 insertions(+), 6 deletions(-) diff --git a/changelog.html b/changelog.html index 2a0aa6a72..d83f73c80 100644 --- a/changelog.html +++ b/changelog.html @@ -44,6 +44,11 @@

REST API Plugin Changelog

+

1.12.2 October 9, 2025

+ +

1.12.1 (to be determined)