mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 02:25:19 +00:00
Update for core changes
This commit is contained in:
parent
1023227744
commit
a3d23e55a1
@ -44,6 +44,7 @@ import org.thoughtcrime.securesms.sms.OutgoingTextMessage;
|
||||
import org.thoughtcrime.securesms.util.JsonUtils;
|
||||
import org.thoughtcrime.securesms.util.TextSecurePreferences;
|
||||
import org.whispersystems.libsignal.util.guava.Optional;
|
||||
import org.whispersystems.signalservice.loki.messaging.LokiMessageFriendRequestStatus;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.security.SecureRandom;
|
||||
@ -661,6 +662,11 @@ public class SmsDatabase extends MessagingDatabase {
|
||||
ApplicationContext.getInstance(context).getJobManager().add(new TrimThreadJob(threadId));
|
||||
}
|
||||
|
||||
// Loki - Set message friend request status
|
||||
if (message.isFriendRequest) {
|
||||
DatabaseFactory.getLokiMessageFriendRequestDatabase(context).setFriendRequestStatus(messageId, LokiMessageFriendRequestStatus.REQUEST_SENDING_OR_FAILED);
|
||||
}
|
||||
|
||||
return messageId;
|
||||
}
|
||||
|
||||
|
@ -14,9 +14,9 @@ import org.whispersystems.libsignal.IdentityKey
|
||||
import org.whispersystems.libsignal.ecc.Curve
|
||||
import org.whispersystems.libsignal.state.PreKeyBundle
|
||||
import org.whispersystems.signalservice.api.push.SignalServiceAddress
|
||||
import org.whispersystems.signalservice.loki.messaging.LokiPreKeyDatabaseProtocol
|
||||
import org.whispersystems.signalservice.loki.messaging.LokiPreKeyBundleDatabaseProtocol
|
||||
|
||||
class LokiPreKeyBundleDatabase(context: Context, helper: SQLCipherOpenHelper) : Database(context, helper), LokiPreKeyDatabaseProtocol {
|
||||
class LokiPreKeyBundleDatabase(context: Context, helper: SQLCipherOpenHelper) : Database(context, helper), LokiPreKeyBundleDatabaseProtocol {
|
||||
|
||||
companion object {
|
||||
private val tableName = "loki_pre_key_bundle_database"
|
||||
|
@ -21,7 +21,7 @@ class LokiThreadFriendRequestDatabase(context: Context, helper: SQLCipherOpenHel
|
||||
return DatabaseFactory.getSmsDatabase(context).getThreadIdForMessage(messageID)
|
||||
}
|
||||
|
||||
override fun getFriendRequestStatus(threadID: Long): LokiThreadFriendRequestStatus {
|
||||
fun getFriendRequestStatus(threadID: Long): LokiThreadFriendRequestStatus {
|
||||
val database = databaseHelper.readableDatabase
|
||||
val result = database.get(tableName, "${Companion.threadID} = ?", arrayOf( threadID.toString() )) { cursor ->
|
||||
cursor.getInt(friendRequestStatus)
|
||||
|
Loading…
Reference in New Issue
Block a user