mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 16:57:50 +00:00
Include public key with display names
This commit is contained in:
parent
dbb07d78b0
commit
cbb7f9827c
@ -292,12 +292,16 @@ public class PushDecryptJob extends BaseJob implements InjectableType {
|
||||
}
|
||||
}
|
||||
|
||||
// Loki - Get the sender display name if needed
|
||||
Optional<String> senderDisplayName = content.senderDisplayName;
|
||||
if (senderDisplayName.isPresent()) {
|
||||
DatabaseFactory.getLokiUserDatabase(context).setDisplayName(envelope.getSource(), senderDisplayName.get());
|
||||
// Loki - Store the sender display name if needed
|
||||
Optional<String> rawSenderDisplayName = content.senderDisplayName;
|
||||
if (rawSenderDisplayName.isPresent() && rawSenderDisplayName.get().length() > 0) {
|
||||
String senderHexEncodedPublicKey = envelope.getSource();
|
||||
String senderDisplayName = rawSenderDisplayName + " (..." + senderHexEncodedPublicKey.substring(senderHexEncodedPublicKey.length() - 8) + ")";
|
||||
DatabaseFactory.getLokiUserDatabase(context).setDisplayName(senderHexEncodedPublicKey, senderDisplayName);
|
||||
}
|
||||
|
||||
// TODO: Deleting the display name
|
||||
|
||||
if (content.getDataMessage().isPresent()) {
|
||||
SignalServiceDataMessage message = content.getDataMessage().get();
|
||||
boolean isMediaMessage = message.getAttachments().isPresent() || message.getQuote().isPresent() || message.getSharedContacts().isPresent() || message.getPreviews().isPresent() || message.getSticker().isPresent();
|
||||
|
Loading…
x
Reference in New Issue
Block a user