diff --git a/src/org/thoughtcrime/securesms/loki/LokiGroupChatPoller.kt b/src/org/thoughtcrime/securesms/loki/LokiGroupChatPoller.kt index b0e6fcb59f..3a5c94f36b 100644 --- a/src/org/thoughtcrime/securesms/loki/LokiGroupChatPoller.kt +++ b/src/org/thoughtcrime/securesms/loki/LokiGroupChatPoller.kt @@ -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 diff --git a/src/org/thoughtcrime/securesms/loki/LokiUserDatabase.kt b/src/org/thoughtcrime/securesms/loki/LokiUserDatabase.kt index fd71896a09..4b16d8432a 100644 --- a/src/org/thoughtcrime/securesms/loki/LokiUserDatabase.kt +++ b/src/org/thoughtcrime/securesms/loki/LokiUserDatabase.kt @@ -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) }