Merge branch 'develop' into feature/fga/requests_to_join_list
This commit is contained in:
commit
d57ec1c2f8
412 changed files with 4675 additions and 2105 deletions
|
|
@ -12,5 +12,22 @@ enum class UtdCause {
|
|||
SentBeforeWeJoined,
|
||||
VerificationViolation,
|
||||
UnsignedDevice,
|
||||
UnknownDevice
|
||||
UnknownDevice,
|
||||
|
||||
/**
|
||||
* Expected utd because this is a device-historical message and
|
||||
* key storage is not setup or not configured correctly.
|
||||
*/
|
||||
HistoricalMessage,
|
||||
|
||||
/**
|
||||
* The key was withheld on purpose because your device is insecure and/or the
|
||||
* sender trust requirement settings are not met for your device.
|
||||
*/
|
||||
WithheldUnverifiedOrInsecureDevice,
|
||||
|
||||
/**
|
||||
* Key is withheld by sender.
|
||||
*/
|
||||
WithheldBySender,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ class UtdTracker(
|
|||
UtdCause.UNKNOWN_DEVICE -> {
|
||||
Error.Name.ExpectedSentByInsecureDevice
|
||||
}
|
||||
UtdCause.HISTORICAL_MESSAGE -> Error.Name.HistoricalMessage
|
||||
}
|
||||
val event = Error(
|
||||
context = null,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,6 @@ import io.element.android.libraries.matrix.api.media.MediaSource
|
|||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.matrix.rustcomponents.sdk.Client
|
||||
import org.matrix.rustcomponents.sdk.mediaSourceFromUrl
|
||||
import org.matrix.rustcomponents.sdk.use
|
||||
import java.io.File
|
||||
import org.matrix.rustcomponents.sdk.MediaSource as RustMediaSource
|
||||
|
|
@ -86,7 +85,7 @@ class RustMediaLoader(
|
|||
return if (json != null) {
|
||||
RustMediaSource.fromJson(json)
|
||||
} else {
|
||||
mediaSourceFromUrl(url)
|
||||
RustMediaSource.fromUrl(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ class RustRoomFactory(
|
|||
}
|
||||
val innerRoom = try {
|
||||
roomListItem.previewRoom(via = emptyList())
|
||||
} catch (e: RoomListException) {
|
||||
} catch (e: Exception) {
|
||||
Timber.e(e, "Failed to get pending room for $roomId")
|
||||
return@withContext null
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
package io.element.android.libraries.matrix.impl.room.preview
|
||||
|
||||
import io.element.android.libraries.core.bool.orFalse
|
||||
import io.element.android.libraries.matrix.api.core.RoomAlias
|
||||
import io.element.android.libraries.matrix.api.core.RoomId
|
||||
import io.element.android.libraries.matrix.api.room.preview.RoomPreviewInfo
|
||||
|
|
@ -25,7 +26,7 @@ object RoomPreviewInfoMapper {
|
|||
avatarUrl = info.avatarUrl,
|
||||
numberOfJoinedMembers = info.numJoinedMembers.toLong(),
|
||||
roomType = info.roomType.map(),
|
||||
isHistoryWorldReadable = info.isHistoryWorldReadable,
|
||||
isHistoryWorldReadable = info.isHistoryWorldReadable.orFalse(),
|
||||
isJoined = info.membership == Membership.JOINED,
|
||||
isInvited = info.membership == Membership.INVITED,
|
||||
isPublic = info.joinRule == JoinRule.Public,
|
||||
|
|
|
|||
|
|
@ -145,6 +145,7 @@ private fun RustUtdCause.map(): UtdCause {
|
|||
RustUtdCause.VERIFICATION_VIOLATION -> UtdCause.VerificationViolation
|
||||
RustUtdCause.UNSIGNED_DEVICE -> UtdCause.UnsignedDevice
|
||||
RustUtdCause.UNKNOWN_DEVICE -> UtdCause.UnknownDevice
|
||||
RustUtdCause.HISTORICAL_MESSAGE -> UtdCause.HistoricalMessage
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue