From 5b949b0116c7fe233c36c4e542574b887a2b61ca Mon Sep 17 00:00:00 2001 From: Alex Hart Date: Fri, 28 Jun 2024 11:50:38 -0300 Subject: [PATCH] Fix call id serialization. --- .../java/org/thoughtcrime/securesms/database/CallTable.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/database/CallTable.kt b/app/src/main/java/org/thoughtcrime/securesms/database/CallTable.kt index 866c13e7f3..c2263e0cf7 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/database/CallTable.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/database/CallTable.kt @@ -719,19 +719,19 @@ class CallTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTabl val didInsert = writableDatabase.withinTransaction { db -> val exists = db.exists(TABLE_NAME) - .where("$PEER = ? AND $CALL_ID = ?", callLinkRecipient.id.serialize(), callId) + .where("$PEER = ? AND $CALL_ID = ?", callLinkRecipient.id.serialize(), callId.longValue()) .run() if (exists && !skipTimestampUpdate) { db.update(TABLE_NAME) .values(TIMESTAMP to timestamp) - .where("$PEER = ? AND $CALL_ID = ? AND $TIMESTAMP < ?", callLinkRecipient.id.serialize(), callId, timestamp) + .where("$PEER = ? AND $CALL_ID = ? AND $TIMESTAMP < ?", callLinkRecipient.id.serialize(), callId.longValue(), timestamp) .run() false } else if (!exists) { db.insertInto(TABLE_NAME) .values( - CALL_ID to callId, + CALL_ID to callId.longValue(), MESSAGE_ID to null, PEER to callLinkRecipient.id.toLong(), EVENT to Event.serialize(Event.GENERIC_GROUP_CALL),