mirror of
https://github.com/oxen-io/session-android.git
synced 2025-02-19 19:48:27 +00:00
Parse display name from messages
This commit is contained in:
parent
244d4fd899
commit
acae76161d
@ -252,7 +252,7 @@ public class PushDecryptJob extends BaseJob implements InjectableType {
|
||||
return;
|
||||
}
|
||||
|
||||
// Loki - Handle Loki specific messages
|
||||
// Loki - Handle Loki specific logic if needed
|
||||
if (content.lokiMessage.isPresent()) {
|
||||
LokiServiceMessage lokiMessage = content.lokiMessage.get();
|
||||
if (lokiMessage.getPreKeyBundleMessage() != null) {
|
||||
@ -269,6 +269,11 @@ public class PushDecryptJob extends BaseJob implements InjectableType {
|
||||
}
|
||||
}
|
||||
|
||||
Optional<String> senderDisplayName = content.senderDisplayName;
|
||||
if (senderDisplayName.isPresent()) {
|
||||
// TODO: Use 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();
|
||||
|
@ -77,6 +77,10 @@ class LokiAPIDatabase(context: Context, helper: SQLCipherOpenHelper) : Database(
|
||||
val row = wrap(mapOf( userID to userPublicKey, receivedMessageHashValues to receivedMessageHashValuesAsString ))
|
||||
database.insertOrUpdate(receivedMessageHashValuesCache, row, "$userID = ?", wrap(userPublicKey))
|
||||
}
|
||||
|
||||
override fun getUserDisplayName(): String? {
|
||||
return TextSecurePreferences.getProfileName(context)
|
||||
}
|
||||
}
|
||||
|
||||
// region Convenience
|
||||
|
Loading…
x
Reference in New Issue
Block a user