mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-28 12:44:34 +01:00
Fix call id serialization.
This commit is contained in:
committed by
Cody Henthorne
parent
3c13619ce8
commit
5b949b0116
@@ -719,19 +719,19 @@ class CallTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTabl
|
|||||||
|
|
||||||
val didInsert = writableDatabase.withinTransaction { db ->
|
val didInsert = writableDatabase.withinTransaction { db ->
|
||||||
val exists = db.exists(TABLE_NAME)
|
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()
|
.run()
|
||||||
|
|
||||||
if (exists && !skipTimestampUpdate) {
|
if (exists && !skipTimestampUpdate) {
|
||||||
db.update(TABLE_NAME)
|
db.update(TABLE_NAME)
|
||||||
.values(TIMESTAMP to timestamp)
|
.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()
|
.run()
|
||||||
false
|
false
|
||||||
} else if (!exists) {
|
} else if (!exists) {
|
||||||
db.insertInto(TABLE_NAME)
|
db.insertInto(TABLE_NAME)
|
||||||
.values(
|
.values(
|
||||||
CALL_ID to callId,
|
CALL_ID to callId.longValue(),
|
||||||
MESSAGE_ID to null,
|
MESSAGE_ID to null,
|
||||||
PEER to callLinkRecipient.id.toLong(),
|
PEER to callLinkRecipient.id.toLong(),
|
||||||
EVENT to Event.serialize(Event.GENERIC_GROUP_CALL),
|
EVENT to Event.serialize(Event.GENERIC_GROUP_CALL),
|
||||||
|
|||||||
Reference in New Issue
Block a user