mirror of
https://github.com/vector-im/riotX-android
synced 2025-10-06 00:02:48 +02:00
Improve getClearContent() method: it should not fallback to the encrypted content when the content is not decrypted.
This commit is contained in:
@@ -219,10 +219,16 @@ data class Event(
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the event content
|
||||
* @return the event content.
|
||||
* If the content is encrypted, it will return the decrypted content, or null if the content is not
|
||||
* decrypted.
|
||||
*/
|
||||
fun getClearContent(): Content? {
|
||||
return getDecryptedContent() ?: content
|
||||
return if (isEncrypted()) {
|
||||
getDecryptedContent()
|
||||
} else {
|
||||
content
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user