From 7d9f5bc46d48fd4b867508b593b596e56dd9100c Mon Sep 17 00:00:00 2001 From: jubb Date: Thu, 1 Apr 2021 16:25:01 +1100 Subject: [PATCH] fix: replicate the same display name logic as settings activity --- .../messaging/sending_receiving/pollers/OpenGroupPoller.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/OpenGroupPoller.kt b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/OpenGroupPoller.kt index f9b368ea4c..d213b3b6a6 100644 --- a/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/OpenGroupPoller.kt +++ b/libsession/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/OpenGroupPoller.kt @@ -202,7 +202,7 @@ class OpenGroupPoller(private val openGroup: OpenGroup, private val executorServ OpenGroupAPI.getDisplayNames(hexEncodedPublicKeys, openGroup.server).successBackground { mapping -> for (pair in mapping.entries) { if (pair.key == userHexEncodedPublicKey) continue - val senderDisplayName = "${pair.value} (...${pair.key.takeLast(8)})" + val senderDisplayName = "${pair.value} (...${pair.key.substring(pair.key.count() - 8)})" MessagingConfiguration.shared.storage.setOpenGroupDisplayName(pair.key, openGroup.channel, openGroup.server, senderDisplayName) } }.fail {