mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-25 09:17:44 +00:00
Fix order of execution.
This commit is contained in:
parent
842be4378a
commit
7c6c551b32
@ -95,10 +95,10 @@ class LokiGroupChatPoller(private val context: Context, private val group: LokiG
|
||||
val x2 = SignalServiceDataMessage(message.timestamp, x1, null, message.body)
|
||||
val x3 = SignalServiceContent(x2, message.hexEncodedPublicKey, SignalServiceAddress.DEFAULT_DEVICE_ID, message.timestamp, false)
|
||||
|
||||
PushDecryptJob(context).handleTextMessage(x3, x2, Optional.absent(), Optional.of(message.serverID))
|
||||
|
||||
val senderDisplayName = "${message.displayName} (...${message.hexEncodedPublicKey.takeLast(8)})"
|
||||
DatabaseFactory.getLokiUserDatabase(context).setServerDisplayName(group.id, message.hexEncodedPublicKey, senderDisplayName)
|
||||
|
||||
PushDecryptJob(context).handleTextMessage(x3, x2, Optional.absent(), Optional.of(message.serverID))
|
||||
}
|
||||
fun processOutgoingMessage(message: LokiGroupMessage) {
|
||||
val messageServerID = message.serverID ?: return
|
||||
|
@ -57,6 +57,7 @@ class LokiUserDatabase(context: Context, helper: SQLCipherOpenHelper) : Database
|
||||
values.put(Companion.displayName, displayName)
|
||||
try {
|
||||
database.insertWithOnConflict(serverDisplayNameTable, null, values, SQLiteDatabase.CONFLICT_REPLACE)
|
||||
Recipient.from(context, Address.fromSerialized(hexEncodedPublicKey), false).notifyListeners()
|
||||
} catch (e: Exception) {
|
||||
print(e)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user