mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-03 12:32:17 +00:00
Fixed up contact sync sending to use the correct field in protobuf.
This commit is contained in:
@@ -41,6 +41,8 @@ class LokiThreadDatabase(context: Context, helper: SQLCipherOpenHelper) : Databa
|
||||
}
|
||||
|
||||
fun getFriendRequestStatus(threadID: Long): LokiThreadFriendRequestStatus {
|
||||
if (threadID < 0) { return LokiThreadFriendRequestStatus.NONE }
|
||||
|
||||
val database = databaseHelper.readableDatabase
|
||||
val result = database.get(friendRequestTableName, "${Companion.threadID} = ?", arrayOf( threadID.toString() )) { cursor ->
|
||||
cursor.getInt(friendRequestStatus)
|
||||
@@ -53,6 +55,8 @@ class LokiThreadDatabase(context: Context, helper: SQLCipherOpenHelper) : Databa
|
||||
}
|
||||
|
||||
override fun setFriendRequestStatus(threadID: Long, friendRequestStatus: LokiThreadFriendRequestStatus) {
|
||||
if (threadID < 0) { return }
|
||||
|
||||
val database = databaseHelper.writableDatabase
|
||||
val contentValues = ContentValues(2)
|
||||
contentValues.put(Companion.threadID, threadID)
|
||||
|
||||
@@ -118,6 +118,7 @@ fun signAndSendPairingAuthorisationMessage(context: Context, pairingAuthorisatio
|
||||
Log.d("Loki", "Failed to send pairing authorization message to ${pairingAuthorisation.secondaryDevicePublicKey}.")
|
||||
}
|
||||
DatabaseFactory.getLokiAPIDatabase(context).insertOrUpdatePairingAuthorisation(signedPairingAuthorisation)
|
||||
TextSecurePreferences.setMultiDevice(context, true)
|
||||
// Call function after a short delay
|
||||
Handler().postDelayed({
|
||||
LokiStorageAPI.shared.updateUserDeviceMappings().fail {
|
||||
|
||||
Reference in New Issue
Block a user