Merge branch 'develop' into feature/fga/iterate_members
This commit is contained in:
commit
24324db700
130 changed files with 1494 additions and 1217 deletions
|
|
@ -64,8 +64,6 @@ interface EncryptionService {
|
|||
*/
|
||||
suspend fun startIdentityReset(): Result<IdentityResetHandle?>
|
||||
|
||||
suspend fun isUserVerified(userId: UserId): Result<Boolean>
|
||||
|
||||
/**
|
||||
* Remember this identity, ensuring it does not result in a pin violation.
|
||||
*/
|
||||
|
|
@ -82,8 +80,10 @@ interface EncryptionService {
|
|||
|
||||
/**
|
||||
* Get the identity state of a user, if known.
|
||||
* @param userId the user id to get the identity for.
|
||||
* @param fallbackToServer whether to fallback to fetching the identity from the server if not known locally. Defaults to true.
|
||||
*/
|
||||
suspend fun getUserIdentity(userId: UserId): Result<IdentityState?>
|
||||
suspend fun getUserIdentity(userId: UserId, fallbackToServer: Boolean = true): Result<IdentityState?>
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -240,10 +240,6 @@ class RustEncryptionService(
|
|||
}
|
||||
}
|
||||
|
||||
override suspend fun isUserVerified(userId: UserId): Result<Boolean> = runCatchingExceptions {
|
||||
getUserIdentityInternal(userId).isVerified()
|
||||
}
|
||||
|
||||
override suspend fun pinUserIdentity(userId: UserId): Result<Unit> = runCatchingExceptions {
|
||||
getUserIdentityInternal(userId).pin()
|
||||
}
|
||||
|
|
@ -252,8 +248,8 @@ class RustEncryptionService(
|
|||
getUserIdentityInternal(userId).withdrawVerification()
|
||||
}
|
||||
|
||||
override suspend fun getUserIdentity(userId: UserId): Result<IdentityState?> = runCatchingExceptions {
|
||||
val identity = getUserIdentityInternal(userId)
|
||||
override suspend fun getUserIdentity(userId: UserId, fallbackToServer: Boolean): Result<IdentityState?> = runCatchingExceptions {
|
||||
val identity = getUserIdentityInternal(userId, fallbackToServer)
|
||||
val isVerified = identity.isVerified()
|
||||
when {
|
||||
identity.hasVerificationViolation() -> IdentityState.VerificationViolation
|
||||
|
|
@ -263,10 +259,10 @@ class RustEncryptionService(
|
|||
}
|
||||
}
|
||||
|
||||
suspend fun getUserIdentityInternal(userId: UserId): UserIdentity {
|
||||
private suspend fun getUserIdentityInternal(userId: UserId, fallbackToServer: Boolean = true): UserIdentity {
|
||||
return service.userIdentity(
|
||||
userId = userId.value,
|
||||
// requestFromHomeserverIfNeeded = true,
|
||||
fallbackToServer = fallbackToServer,
|
||||
) ?: error("User identity not found")
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,6 @@ import kotlinx.coroutines.flow.flowOf
|
|||
class FakeEncryptionService(
|
||||
var startIdentityResetLambda: () -> Result<IdentityResetHandle?> = { lambdaError() },
|
||||
private val pinUserIdentityResult: (UserId) -> Result<Unit> = { lambdaError() },
|
||||
private val isUserVerifiedResult: (UserId) -> Result<Boolean> = { lambdaError() },
|
||||
private val withdrawVerificationResult: (UserId) -> Result<Unit> = { lambdaError() },
|
||||
private val getUserIdentityResult: (UserId) -> Result<IdentityState?> = { lambdaError() },
|
||||
private val enableRecoveryLambda: (Boolean) -> Result<Unit> = { lambdaError() },
|
||||
|
|
@ -139,11 +138,7 @@ class FakeEncryptionService(
|
|||
return withdrawVerificationResult(userId)
|
||||
}
|
||||
|
||||
override suspend fun isUserVerified(userId: UserId): Result<Boolean> = simulateLongTask {
|
||||
isUserVerifiedResult(userId)
|
||||
}
|
||||
|
||||
override suspend fun getUserIdentity(userId: UserId): Result<IdentityState?> = simulateLongTask {
|
||||
override suspend fun getUserIdentity(userId: UserId, fallbackToServer: Boolean): Result<IdentityState?> = simulateLongTask {
|
||||
return getUserIdentityResult(userId)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
<plurals name="notification_compat_summary_title">
|
||||
<item quantity="other">"%d 個通知"</item>
|
||||
</plurals>
|
||||
<string name="notification_error_unified_push_unregistered_android">"Unified Push 通知散佈程式註冊失敗,因此您無法再收到通知。請檢查應用程式的通知設定與推播散佈程式的狀態。"</string>
|
||||
<string name="notification_fallback_content">"您有新訊息。"</string>
|
||||
<string name="notification_incoming_call">"📹 來電"</string>
|
||||
<string name="notification_inline_reply_failed">"** 無法傳送,請開啟聊天室"</string>
|
||||
|
|
|
|||
|
|
@ -130,7 +130,9 @@
|
|||
<string name="common_about">"Относно"</string>
|
||||
<string name="common_acceptable_use_policy">"Политика за приемлива употреба"</string>
|
||||
<string name="common_add_account">"Добавяне на акаунт"</string>
|
||||
<string name="common_add_another_account">"Добавяне на друг акаунт"</string>
|
||||
<string name="common_advanced_settings">"Разширени настройки"</string>
|
||||
<string name="common_an_image">"изображение"</string>
|
||||
<string name="common_analytics">"Статистика"</string>
|
||||
<string name="common_android_shortcuts_remove_reason_left_room">"Напуснахте стаята"</string>
|
||||
<string name="common_appearance">"Облик"</string>
|
||||
|
|
@ -142,6 +144,7 @@
|
|||
<string name="common_copyright">"Авторски права"</string>
|
||||
<string name="common_creating_room">"Създаване на стая…"</string>
|
||||
<string name="common_current_user_left_room">"Стаята е напусната"</string>
|
||||
<string name="common_current_user_left_space">"Пространството е напуснато"</string>
|
||||
<string name="common_dark">"Тъмен"</string>
|
||||
<string name="common_decryption_error">"Грешка при разшифроване"</string>
|
||||
<string name="common_description">"Описание"</string>
|
||||
|
|
@ -172,6 +175,7 @@
|
|||
<string name="common_install_apk_android">"Инсталиране на APK"</string>
|
||||
<string name="common_invite_unknown_profile">"Този Matrix ID не може да бъде намерен, така че поканата може да не бъде получена."</string>
|
||||
<string name="common_leaving_room">"Стаята се напуска"</string>
|
||||
<string name="common_leaving_space">"Пространството се напуска"</string>
|
||||
<string name="common_light">"Светъл"</string>
|
||||
<string name="common_link_copied_to_clipboard">"Връзката е копирана в клипборда"</string>
|
||||
<string name="common_loading">"Зарежда се…"</string>
|
||||
|
|
@ -214,6 +218,7 @@
|
|||
<string name="common_preparing">"Подготвя се…"</string>
|
||||
<string name="common_privacy_policy">"Политика за поверителност"</string>
|
||||
<string name="common_private_room">"Частна стая"</string>
|
||||
<string name="common_private_space">"Частно пространство"</string>
|
||||
<string name="common_public_room">"Общодостъпна стая"</string>
|
||||
<string name="common_public_space">"Общодостъпно пространство"</string>
|
||||
<string name="common_reaction">"Реакция"</string>
|
||||
|
|
@ -243,15 +248,19 @@
|
|||
<string name="common_search_results">"Резултати от търсенето"</string>
|
||||
<string name="common_security">"Защита"</string>
|
||||
<string name="common_seen_by">"Видяно от"</string>
|
||||
<string name="common_select_account">"Избиране на акаунт"</string>
|
||||
<string name="common_sending">"Изпраща се…"</string>
|
||||
<string name="common_sending_failed">"Изпращането е неуспешно"</string>
|
||||
<string name="common_sent">"Изпратено"</string>
|
||||
<string name="common_server_not_supported">"Сървърът не се поддържа"</string>
|
||||
<string name="common_server_url">"URL адрес на сървъра"</string>
|
||||
<string name="common_settings">"Настройки"</string>
|
||||
<string name="common_share_space">"Споделяне на пространството"</string>
|
||||
<string name="common_shared_location">"Споделено местоположение"</string>
|
||||
<string name="common_signing_out">"Излизате"</string>
|
||||
<string name="common_something_went_wrong">"Нещо се обърка"</string>
|
||||
<string name="common_something_went_wrong_message">"Възникна проблем. Моля, опитайте отново."</string>
|
||||
<string name="common_space">"Пространство"</string>
|
||||
<plurals name="common_spaces">
|
||||
<item quantity="one">"%1$d пространство"</item>
|
||||
<item quantity="other">"%1$d пространства"</item>
|
||||
|
|
@ -268,6 +277,7 @@
|
|||
<string name="common_topic">"Тема"</string>
|
||||
<string name="common_topic_placeholder">"За какво се отнася тази стая?"</string>
|
||||
<string name="common_unable_to_decrypt">"Не може да се разшифрова"</string>
|
||||
<string name="common_unable_to_decrypt_no_access">"Нямате достъп до това съобщение"</string>
|
||||
<string name="common_unable_to_invite_message">"Поканите не можаха да бъдат изпратени до един или повече потребители."</string>
|
||||
<string name="common_unable_to_invite_title">"Не може да се изпрати покана(и)"</string>
|
||||
<string name="common_unlock">"Отключване"</string>
|
||||
|
|
@ -282,6 +292,9 @@
|
|||
<string name="common_verify_identity">"Потвърждаване на самоличността"</string>
|
||||
<string name="common_verify_user">"Потвърждаване на потребителя"</string>
|
||||
<string name="common_video">"Видео"</string>
|
||||
<string name="common_video_quality_high">"Високо качество"</string>
|
||||
<string name="common_video_quality_low">"Ниско качество"</string>
|
||||
<string name="common_video_quality_standard">"Стандартно качество"</string>
|
||||
<string name="common_voice_message">"Гласово съобщение"</string>
|
||||
<string name="common_waiting">"Изчаква се…"</string>
|
||||
<string name="common_waiting_for_decryption_key">"В очакване на това съобщение"</string>
|
||||
|
|
@ -320,9 +333,11 @@
|
|||
<string name="screen_share_this_location_action">"Споделяне на това местоположение"</string>
|
||||
<string name="screen_space_list_parent_space">"%1$s пространство"</string>
|
||||
<string name="screen_space_list_title">"Пространства"</string>
|
||||
<string name="screen_space_menu_action_members">"Преглед на членовете"</string>
|
||||
<string name="screen_view_location_title">"Местоположение"</string>
|
||||
<string name="settings_version_number">"Версия: %1$s (%2$s)"</string>
|
||||
<string name="test_language_identifier">"bg"</string>
|
||||
<string name="timeline_decryption_failure_historical_event_unverified_device">"Трябва да потвърдите това устройство за да достъпите исторически съобщения"</string>
|
||||
<string name="timeline_decryption_failure_historical_event_user_not_joined">"Нямате достъп до това съобщение"</string>
|
||||
<string name="timeline_decryption_failure_unable_to_decrypt">"Съобщението не може да се разшифрова"</string>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@
|
|||
<string name="action_forgot_password">"忘記密碼?"</string>
|
||||
<string name="action_forward">"轉寄"</string>
|
||||
<string name="action_go_back">"返回"</string>
|
||||
<string name="action_go_to_roles_and_permissions">"前往角色與權限"</string>
|
||||
<string name="action_go_to_settings">"前往設定"</string>
|
||||
<string name="action_ignore">"忽略"</string>
|
||||
<string name="action_invite">"邀請"</string>
|
||||
|
|
@ -435,6 +436,10 @@
|
|||
<string name="screen_resolve_send_failure_unsigned_device_title">"未傳送您的訊息,因為 %1$s 尚未驗證所有裝置。"</string>
|
||||
<string name="screen_resolve_send_failure_you_unsigned_device_subtitle">"您的一個或多個裝置未經驗證。您仍可傳送訊息,也可以取消並在您驗證您的所有裝置後再試一次。"</string>
|
||||
<string name="screen_resolve_send_failure_you_unsigned_device_title">"因為您尚未驗證一個或多個裝置,因為未傳送您的訊息"</string>
|
||||
<string name="screen_room_change_permissions_change_settings">"變更設定"</string>
|
||||
<string name="screen_room_change_permissions_manage_space">"管理空間"</string>
|
||||
<string name="screen_room_change_permissions_manage_space_rooms">"管理聊天室"</string>
|
||||
<string name="screen_room_change_permissions_title">"權限"</string>
|
||||
<string name="screen_room_change_role_administrators_or_owners_title">"編輯管理員或擁有者"</string>
|
||||
<string name="screen_room_error_failed_processing_media">"無法處理要上傳的媒體,請再試一次。"</string>
|
||||
<string name="screen_room_error_failed_retrieving_user_details">"無法擷取使用者詳細資訊"</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue