Skip to content

Commit d7ee751

Browse files
committed
Fetch encryption state when loading a room if it's unknown
1 parent 3fc6e32 commit d7ee751

File tree

1 file changed

+5
-0
lines changed
  • features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl

1 file changed

+5
-0
lines changed

features/messages/impl/src/main/kotlin/io/element/android/features/messages/impl/MessagesPresenter.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ class MessagesPresenter @AssistedInject constructor(
164164
// as those will be handled by the timeline.
165165
withContext(dispatchers.io) {
166166
room.setUnreadFlag(isUnread = false)
167+
168+
// If for some reason the encryption state is unknown, fetch it
169+
if (roomInfo.isEncrypted == null) {
170+
room.getUpdatedIsEncrypted()
171+
}
167172
}
168173
}
169174

0 commit comments

Comments
 (0)