Fix / Sending events have warning until encrypted
This commit is contained in:
parent
4578b9df7f
commit
78b7f03138
|
@ -25,6 +25,7 @@ import im.vector.matrix.android.api.session.events.model.toModel
|
||||||
import im.vector.matrix.android.api.session.room.Room
|
import im.vector.matrix.android.api.session.room.Room
|
||||||
import im.vector.matrix.android.api.session.room.model.ReferencesAggregatedContent
|
import im.vector.matrix.android.api.session.room.model.ReferencesAggregatedContent
|
||||||
import im.vector.matrix.android.api.session.room.model.message.MessageVerificationRequestContent
|
import im.vector.matrix.android.api.session.room.model.message.MessageVerificationRequestContent
|
||||||
|
import im.vector.matrix.android.api.session.room.send.SendState
|
||||||
import im.vector.matrix.android.api.session.room.timeline.TimelineEvent
|
import im.vector.matrix.android.api.session.room.timeline.TimelineEvent
|
||||||
import im.vector.matrix.android.api.session.room.timeline.getLastMessageContent
|
import im.vector.matrix.android.api.session.room.timeline.getLastMessageContent
|
||||||
import im.vector.matrix.android.api.session.room.timeline.hasBeenEdited
|
import im.vector.matrix.android.api.session.room.timeline.hasBeenEdited
|
||||||
|
@ -123,7 +124,9 @@ class MessageInformationDataFactory @Inject constructor(private val session: Ses
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getE2EDecoration(room: Room?, event: TimelineEvent): E2EDecoration {
|
private fun getE2EDecoration(room: Room?, event: TimelineEvent): E2EDecoration {
|
||||||
return if (room?.isEncrypted() == true
|
return if (
|
||||||
|
event.root.sendState == SendState.SYNCED
|
||||||
|
&& room?.isEncrypted() == true
|
||||||
// is user verified
|
// is user verified
|
||||||
&& session.cryptoService().crossSigningService().getUserCrossSigningKeys(event.root.senderId ?: "")?.isTrusted() == true) {
|
&& session.cryptoService().crossSigningService().getUserCrossSigningKeys(event.root.senderId ?: "")?.isTrusted() == true) {
|
||||||
val ts = room.roomSummary()?.encryptionEventTs ?: 0
|
val ts = room.roomSummary()?.encryptionEventTs ?: 0
|
||||||
|
|
Loading…
Reference in New Issue