diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 8a892b9b15..5698a696b6 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -11,7 +11,7 @@ jobs: - run: | npm install --save-dev @babel/plugin-transform-flow-strip-types - name: Danger - uses: danger/danger-js@11.1.2 + uses: danger/danger-js@11.1.3 with: args: "--dangerfile tools/danger/dangerfile.js" env: diff --git a/.github/workflows/quality.yml b/.github/workflows/quality.yml index da70d13a86..1692e2e281 100644 --- a/.github/workflows/quality.yml +++ b/.github/workflows/quality.yml @@ -66,7 +66,7 @@ jobs: yarn add danger-plugin-lint-report --dev - name: Danger lint if: always() - uses: danger/danger-js@11.1.2 + uses: danger/danger-js@11.1.3 with: args: "--dangerfile tools/danger/dangerfile-lint.js" env: diff --git a/CHANGES.md b/CHANGES.md index 009c2b2af5..d1e4834988 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,59 @@ +Changes in Element v1.5.2 (2022-10-05) +====================================== + +Features ✨ +---------- + - New App Layout is now enabled by default! Go to the Settings > Labs to toggle this ([#7166](https://github.com/vector-im/element-android/issues/7166)) + - Render inline images in the timeline ([#351](https://github.com/vector-im/element-android/issues/351)) + - Add privacy setting to disable personalized learning by the keyboard ([#6633](https://github.com/vector-im/element-android/issues/6633)) + +Bugfixes 🐛 +---------- + - Disable emoji keyboard not applies in reply ([#5029](https://github.com/vector-im/element-android/issues/5029)) + - Fix animated images not autoplaying sometimes if only a thumbnail was fetched from the server ([#6215](https://github.com/vector-im/element-android/issues/6215)) + - Add Warning shield when a user previously verified rotated their cross signing keys ([#6702](https://github.com/vector-im/element-android/issues/6702)) + - Can't verify user when option to send keys to verified devices only is selected ([#6723](https://github.com/vector-im/element-android/issues/6723)) + - Add option to only send to verified devices per room (web parity) ([#6725](https://github.com/vector-im/element-android/issues/6725)) + - Delete pin code key and the key used for biometrics authentication on logout ([#6906](https://github.com/vector-im/element-android/issues/6906)) + - Fix crash on previewing images to upload on Android Pie. ([#7184](https://github.com/vector-im/element-android/issues/7184)) + - Fix app restarts in loop on Android 13 on the first run of the app. ([#7224](https://github.com/vector-im/element-android/issues/7224)) + +In development 🚧 +---------------- + - [Device Management] Learn more bottom sheets ([#7100](https://github.com/vector-im/element-android/issues/7100)) + - [Device management] Verify current session ([#7114](https://github.com/vector-im/element-android/issues/7114)) + - [Device management] Verify another session ([#7143](https://github.com/vector-im/element-android/issues/7143)) + - [Device management] Rename a session ([#7158](https://github.com/vector-im/element-android/issues/7158)) + - [Device Manager] Unverified and inactive sessions list ([#7170](https://github.com/vector-im/element-android/issues/7170)) + - [Device management] Sign out a session ([#7190](https://github.com/vector-im/element-android/issues/7190)) + - [Device Manager] Parse user agents ([#7247](https://github.com/vector-im/element-android/issues/7247)) + - [Voice Broadcast] Add a feature flag with the composer action ([#7258](https://github.com/vector-im/element-android/issues/7258)) + +Improved Documentation 📚 +------------------------ + - Draft onboarding documentation of the project at `./docs/_developer_onboarding.md` ([#7126](https://github.com/vector-im/element-android/issues/7126)) + +SDK API changes ⚠️ +------------------ + - Allow the sync timeout to be configured (mainly useful for testing) ([#7198](https://github.com/vector-im/element-android/issues/7198)) + - Ports SDK instrumentation tests to use suspending functions instead of countdown latches ([#7207](https://github.com/vector-im/element-android/issues/7207)) + - [Device Manager] Extend user agent to include device information ([#7209](https://github.com/vector-im/element-android/issues/7209)) + +Other changes +------------- + - Add support for `/tableflip` command ([#12](https://github.com/vector-im/element-android/issues/12)) + - Decreases the size of rounded corners and increases the maximum width of message bubbles to help avoid unnecessary unused space on screen ([#5712](https://github.com/vector-im/element-android/issues/5712)) + - Adds screenshot testing tooling ([#5798](https://github.com/vector-im/element-android/issues/5798)) + - [AppLayout]: added tracking of new analytics events ([#6508](https://github.com/vector-im/element-android/issues/6508)) + - Target API 12 and compile with Android SDK 32. ([#6929](https://github.com/vector-im/element-android/issues/6929)) + - Add basic integration of Sentry to capture errors and crashes if user has given consent. ([#7076](https://github.com/vector-im/element-android/issues/7076)) + - Add support to `/devtools` command. ([#7126](https://github.com/vector-im/element-android/issues/7126)) + - Fix lint warning, and cleanup the code ([#7159](https://github.com/vector-im/element-android/issues/7159)) + - Mutualize the pending auth handling ([#7193](https://github.com/vector-im/element-android/issues/7193)) + - CI: Prevent modification of translations by developer. ([#7211](https://github.com/vector-im/element-android/issues/7211)) + - Fix typo in strings.xml and make sure this is American English. ([#7287](https://github.com/vector-im/element-android/issues/7287)) + + Changes in Element v1.5.1 (2022-09-28) ====================================== diff --git a/build.gradle b/build.gradle index e7f7d00159..dd0f9a8d7f 100644 --- a/build.gradle +++ b/build.gradle @@ -29,7 +29,7 @@ buildscript { classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.4.0.2513' classpath 'com.google.android.gms:oss-licenses-plugin:0.10.5' classpath "com.likethesalad.android:stem-plugin:2.2.2" - classpath 'org.owasp:dependency-check-gradle:7.2.0' + classpath 'org.owasp:dependency-check-gradle:7.2.1' classpath "org.jetbrains.dokka:dokka-gradle-plugin:1.7.10" classpath "org.jetbrains.kotlinx:kotlinx-knit:0.4.0" classpath 'com.jakewharton:butterknife-gradle-plugin:10.2.3' diff --git a/changelog.d/12.misc b/changelog.d/12.misc deleted file mode 100644 index 392d7b1122..0000000000 --- a/changelog.d/12.misc +++ /dev/null @@ -1 +0,0 @@ -Add support for `/tableflip` command \ No newline at end of file diff --git a/changelog.d/5798.misc b/changelog.d/5798.misc deleted file mode 100644 index 40185eac0d..0000000000 --- a/changelog.d/5798.misc +++ /dev/null @@ -1 +0,0 @@ -Adds screenshot testing tooling diff --git a/changelog.d/6929.misc b/changelog.d/6929.misc deleted file mode 100644 index d12167cfea..0000000000 --- a/changelog.d/6929.misc +++ /dev/null @@ -1 +0,0 @@ -Target API 12 and compile with Android SDK 32. diff --git a/changelog.d/7114.wip b/changelog.d/7114.wip deleted file mode 100644 index 79ad705132..0000000000 --- a/changelog.d/7114.wip +++ /dev/null @@ -1 +0,0 @@ -[Device management] Verify current session diff --git a/changelog.d/7126.doc b/changelog.d/7126.doc deleted file mode 100644 index 9c69350a11..0000000000 --- a/changelog.d/7126.doc +++ /dev/null @@ -1 +0,0 @@ -Draft onboarding documentation of the project at `./docs/_developer_onboarding.md` diff --git a/changelog.d/7126.misc b/changelog.d/7126.misc deleted file mode 100644 index a79d61f819..0000000000 --- a/changelog.d/7126.misc +++ /dev/null @@ -1 +0,0 @@ -Add support to `/devtools` command. diff --git a/changelog.d/7143.wip b/changelog.d/7143.wip deleted file mode 100644 index 588f7fb255..0000000000 --- a/changelog.d/7143.wip +++ /dev/null @@ -1 +0,0 @@ -[Device management] Verify another session diff --git a/changelog.d/7158.wip b/changelog.d/7158.wip deleted file mode 100644 index 6c303281d8..0000000000 --- a/changelog.d/7158.wip +++ /dev/null @@ -1 +0,0 @@ -[Device management] Rename a session diff --git a/changelog.d/7159.misc b/changelog.d/7159.misc deleted file mode 100644 index 76f5f45c40..0000000000 --- a/changelog.d/7159.misc +++ /dev/null @@ -1 +0,0 @@ -Fix lint warning, and cleanup the code diff --git a/changelog.d/7166.misc b/changelog.d/7166.misc deleted file mode 100644 index d223208853..0000000000 --- a/changelog.d/7166.misc +++ /dev/null @@ -1 +0,0 @@ -New App Layout is now enabled by default! Go to the Settings > Labs to toggle this diff --git a/changelog.d/7170.wip b/changelog.d/7170.wip deleted file mode 100644 index f5b71a14f8..0000000000 --- a/changelog.d/7170.wip +++ /dev/null @@ -1 +0,0 @@ -[Device Manager] Unverified and inactive sessions list diff --git a/changelog.d/7190.wip b/changelog.d/7190.wip deleted file mode 100644 index 3c70666d91..0000000000 --- a/changelog.d/7190.wip +++ /dev/null @@ -1 +0,0 @@ -[Device management] Sign out a session diff --git a/changelog.d/7193.misc b/changelog.d/7193.misc deleted file mode 100644 index efa0f594ae..0000000000 --- a/changelog.d/7193.misc +++ /dev/null @@ -1 +0,0 @@ -Mutualize the pending auth handling diff --git a/changelog.d/7198.sdk b/changelog.d/7198.sdk deleted file mode 100644 index 115b8d6113..0000000000 --- a/changelog.d/7198.sdk +++ /dev/null @@ -1 +0,0 @@ -Allow the sync timeout to be configured (mainly useful for testing) diff --git a/changelog.d/7207.sdk b/changelog.d/7207.sdk deleted file mode 100644 index 0bc221e9f7..0000000000 --- a/changelog.d/7207.sdk +++ /dev/null @@ -1 +0,0 @@ -Ports SDK instrumentation tests to use suspending functions instead of countdown latches diff --git a/changelog.d/7209.sdk b/changelog.d/7209.sdk deleted file mode 100644 index 6375f5e495..0000000000 --- a/changelog.d/7209.sdk +++ /dev/null @@ -1 +0,0 @@ -[Device Manager] Extend user agent to include device information diff --git a/changelog.d/7211.misc b/changelog.d/7211.misc deleted file mode 100644 index 44abd3d59d..0000000000 --- a/changelog.d/7211.misc +++ /dev/null @@ -1 +0,0 @@ - CI: Prevent modification of translations by developer. diff --git a/dependencies.gradle b/dependencies.gradle index f4165ad692..3bf3ab746d 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -9,9 +9,9 @@ ext.versions = [ def gradle = "7.2.2" // Ref: https://kotlinlang.org/releases.html -def kotlin = "1.7.10" +def kotlin = "1.7.20" def kotlinCoroutines = "1.6.4" -def dagger = "2.43.2" +def dagger = "2.44" def appDistribution = "16.0.0-beta04" def retrofit = "2.9.0" def arrow = "0.8.2" @@ -22,13 +22,15 @@ def flowBinding = "1.2.0" def flipper = "0.164.0" def epoxy = "4.6.2" def mavericks = "2.7.0" -def glide = "4.13.2" +def glide = "4.14.1" def bigImageViewer = "1.8.1" def jjwt = "0.11.5" // Temporary version to unblock #6929. Once 0.16.0 is released we should use it, and revert // the whole commit which set version 0.16.0-SNAPSHOT def vanniktechEmoji = "0.16.0-SNAPSHOT" +def sentry = "6.4.1" + def fragment = "1.5.3" // Testing @@ -119,6 +121,7 @@ ext.libs = [ markwon : [ 'core' : "io.noties.markwon:core:$markwon", 'extLatex' : "io.noties.markwon:ext-latex:$markwon", + 'imageGlide' : "io.noties.markwon:image-glide:$markwon", 'inlineParser' : "io.noties.markwon:inline-parser:$markwon", 'html' : "io.noties.markwon:html:$markwon" ], @@ -164,10 +167,13 @@ ext.libs = [ apache : [ 'commonsImaging' : "org.apache.sanselan:sanselan:0.97-incubator" ], + sentry: [ + 'sentryAndroid' : "io.sentry:sentry-android:$sentry" + ], tests : [ 'kluent' : "org.amshove.kluent:kluent-android:1.68", 'timberJunitRule' : "net.lachlanmckee:timber-junit-rule:1.0.1", - 'junit' : "junit:junit:4.13.2" + 'junit' : "junit:junit:4.13.2", ] ] diff --git a/dependencies_groups.gradle b/dependencies_groups.gradle index a97d80bc7f..cdab6172d1 100644 --- a/dependencies_groups.gradle +++ b/dependencies_groups.gradle @@ -148,6 +148,7 @@ ext.groups = [ 'io.opencensus', 'io.reactivex.rxjava2', 'io.realm', + 'io.sentry', 'it.unimi.dsi', 'jakarta.activation', 'jakarta.xml.bind', @@ -210,7 +211,6 @@ ext.groups = [ 'org.ow2.asm', 'org.ow2.asm', 'org.reactivestreams', - 'org.robolectric', 'org.slf4j', 'org.sonatype.oss', 'org.testng', diff --git a/fastlane/metadata/android/cs-CZ/changelogs/40104360.txt b/fastlane/metadata/android/cs-CZ/changelogs/40104360.txt new file mode 100644 index 0000000000..fcadf9898c --- /dev/null +++ b/fastlane/metadata/android/cs-CZ/changelogs/40104360.txt @@ -0,0 +1,3 @@ +Nový vzhled aplikace lze povolit v Experimentálních funkcích. Prosíme, vyzkoušejte ho! +Oprava problémů s chybějícími oznámeními a dlouhou přírůstkovou synchronizací. +Úplný seznam změn: https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/de-DE/changelogs/40104360.txt b/fastlane/metadata/android/de-DE/changelogs/40104360.txt new file mode 100644 index 0000000000..3c47fa7eb6 --- /dev/null +++ b/fastlane/metadata/android/de-DE/changelogs/40104360.txt @@ -0,0 +1,3 @@ +Das neue App-Layout kann in den experimentellen Einstellungen aktiviert werden. Probier es gerne aus! +Fehler bzgl. ausbleibender Benachrichtigungen und langwierigem inkrementellem Synchronisieren behoben. +Vollständiges Änderungsprotokoll: https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/de-DE/short_description.txt b/fastlane/metadata/android/de-DE/short_description.txt index d27bd3ef12..de571645ee 100644 --- a/fastlane/metadata/android/de-DE/short_description.txt +++ b/fastlane/metadata/android/de-DE/short_description.txt @@ -1 +1 @@ -Gruppen-Messenger - verschlüsselte Kommunikation, Gruppenchat und Videoanrufe +Gruppen-Messenger – verschlüsselte Kommunikation, Gruppen und Videoanrufe diff --git a/fastlane/metadata/android/de-DE/title.txt b/fastlane/metadata/android/de-DE/title.txt index 6304f37925..edee751d06 100644 --- a/fastlane/metadata/android/de-DE/title.txt +++ b/fastlane/metadata/android/de-DE/title.txt @@ -1 +1 @@ -Element - Sicherer Messenger +Element – Sicher kommunizieren diff --git a/fastlane/metadata/android/en-US/changelogs/40105020.txt b/fastlane/metadata/android/en-US/changelogs/40105020.txt new file mode 100644 index 0000000000..41795c468c --- /dev/null +++ b/fastlane/metadata/android/en-US/changelogs/40105020.txt @@ -0,0 +1,2 @@ +Main changes in this version: New app layout enabled by default! +Full changelog: https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/et/changelogs/40104360.txt b/fastlane/metadata/android/et/changelogs/40104360.txt new file mode 100644 index 0000000000..1c2733683d --- /dev/null +++ b/fastlane/metadata/android/et/changelogs/40104360.txt @@ -0,0 +1,3 @@ +Testide alt saad sisse lülitada uue kujunduse - palun proovi seda! +Parandasime teavitustega seotud vigu ning andmete sünkroniseerimist pika viitega. +Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/fa/changelogs/40104360.txt b/fastlane/metadata/android/fa/changelogs/40104360.txt new file mode 100644 index 0000000000..be14e1b9e2 --- /dev/null +++ b/fastlane/metadata/android/fa/changelogs/40104360.txt @@ -0,0 +1,3 @@ +چینش کارهٔ جدید می‌تواند در تنظیمات آزمایشگاه‌ها به کار بیفتند. لطفاً بیازماییدش! +رفع مشکلات مربوط به آگاهی غایب و همگام‌سازی تجمعّی طولانی. +گزارش دگرگونی کامل: https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/fr-FR/changelogs/40104360.txt b/fastlane/metadata/android/fr-FR/changelogs/40104360.txt new file mode 100644 index 0000000000..80f59952d1 --- /dev/null +++ b/fastlane/metadata/android/fr-FR/changelogs/40104360.txt @@ -0,0 +1,3 @@ +La nouvelle présentation de l’application est disponibles dans les paramètres expérimentaux. Essayez-là ! +Correction de problèmes sur les notifications manquantes, et la synchronisation incrémentale lente. +Intégralité des changements : https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/hu-HU/changelogs/40104360.txt b/fastlane/metadata/android/hu-HU/changelogs/40104360.txt new file mode 100644 index 0000000000..a63a8d1a83 --- /dev/null +++ b/fastlane/metadata/android/hu-HU/changelogs/40104360.txt @@ -0,0 +1,3 @@ +Az új alkalmazás megjelenés a Laborokban bekapcsolható. Próbáld ki! +Hiányzó értesítések és hosszú inkrementális szinkronizáció javítása. +Teljes változásnapló: https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/id/changelogs/40104360.txt b/fastlane/metadata/android/id/changelogs/40104360.txt new file mode 100644 index 0000000000..be626f6350 --- /dev/null +++ b/fastlane/metadata/android/id/changelogs/40104360.txt @@ -0,0 +1,3 @@ +Tata Letak Aplikasi Baru dapat diaktifkan di pengaturan Uji Coba. Cobalah! +Perbariki masalah tentang notifikasi hilang, dan penyinkronan inkremental panjang. +Catatan perubahan lanjutan: https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/it-IT/changelogs/40104360.txt b/fastlane/metadata/android/it-IT/changelogs/40104360.txt new file mode 100644 index 0000000000..c6749d3ff7 --- /dev/null +++ b/fastlane/metadata/android/it-IT/changelogs/40104360.txt @@ -0,0 +1,3 @@ +Nuova disposizione dell'app attivabile nelle impostazioni Laboratori. Provala! +Corretti problemi su notifiche mancanti e sincronizzazioni incrementali lunghe. +Cronologia completa: https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/pt-BR/changelogs/40104360.txt b/fastlane/metadata/android/pt-BR/changelogs/40104360.txt new file mode 100644 index 0000000000..78a879ccb7 --- /dev/null +++ b/fastlane/metadata/android/pt-BR/changelogs/40104360.txt @@ -0,0 +1,3 @@ +Novo Layout de App poder ser habilitado nas configurações de Labs. Por favor dê uma chance! +Consertar problemas sobre notificação faltando, e sinc incremental longo. +Changelog completo: https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/sk/changelogs/40104360.txt b/fastlane/metadata/android/sk/changelogs/40104360.txt new file mode 100644 index 0000000000..af4154b5cf --- /dev/null +++ b/fastlane/metadata/android/sk/changelogs/40104360.txt @@ -0,0 +1,3 @@ +Nové usporiadanie aplikácie môžete povoliť v nastaveniach laboratórií. Vyskúšajte to! +Oprava problémov týkajúcich sa chýbajúcich oznámení a dlhej inkrementálnej synchronizácie. +Úplný zoznam zmien: https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/uk/changelogs/40104360.txt b/fastlane/metadata/android/uk/changelogs/40104360.txt new file mode 100644 index 0000000000..a2c9bcc4b5 --- /dev/null +++ b/fastlane/metadata/android/uk/changelogs/40104360.txt @@ -0,0 +1,3 @@ +Новий макет програми можна увімкнути в налаштуваннях лабораторії. Спробуйте! +Виправлено проблеми з відсутністю сповіщень та тривалою інкрементною синхронізацією. +Список усіх змін: https://github.com/vector-im/element-android/releases diff --git a/fastlane/metadata/android/uk/full_description.txt b/fastlane/metadata/android/uk/full_description.txt index c046d8a40a..330ddde4ae 100644 --- a/fastlane/metadata/android/uk/full_description.txt +++ b/fastlane/metadata/android/uk/full_description.txt @@ -5,7 +5,7 @@ Element — це і безпечний месенджер, і застосуно - Повністю зашифровані повідомлення для надання можливості безпечнішого корпоративного спілкування, навіть для віддалених працівників - Децентралізований чат на основі відкритого коду Matrix - Безпечний обмін файлами із зашифрованими даними для керування проєктами -- Відеочати з передачею голосу через IP та показом екрану іншим +- Відеочати з передачею голосу через IP та показом екрана іншим - Проста інтеграція з вашими улюбленими інструментами для онлайн-співпраці, інструментами керування проєктами, послугами VoIP та іншими застосунками обміну повідомленнями для команд Element цілковито відрізняється від інших застосунків обміну повідомленнями та спільної роботи. Він працює на Matrix, відкритій мережі для безпечного обміну повідомленнями та децентралізованого зв'язку. Це дозволяє самостійне розгортання, щоб надати користувачам якнайбільше володіння та контролю над їх даними та повідомленнями. diff --git a/fastlane/metadata/android/zh-CN/full_description.txt b/fastlane/metadata/android/zh-CN/full_description.txt index 9b60098c34..03fdb6e34d 100644 --- a/fastlane/metadata/android/zh-CN/full_description.txt +++ b/fastlane/metadata/android/zh-CN/full_description.txt @@ -30,7 +30,7 @@ Element 透过不同的方式让你掌控一切: 你可以与 Matrix 网络上的任何人聊天,不论他们是使用 Element、其他 Matrix 应用或其他通讯应用。 超级安全 -真正的端到端加密(仅有那些在对话中的可以解密讯息)以及交叉签章装置验证。 +真正的端到端加密(仅有那些在对话中的人可以解密讯息)以及交叉签章装置验证。 完整的通讯与整合 信息传递、语音与视频通话、文件分享、画面分享与超多的整合、机器人与挂件。建构房间、社群、保持联络并完成工作。 diff --git a/fastlane/metadata/android/zh-CN/short_description.txt b/fastlane/metadata/android/zh-CN/short_description.txt index e271e7f9a4..8cfea85b90 100644 --- a/fastlane/metadata/android/zh-CN/short_description.txt +++ b/fastlane/metadata/android/zh-CN/short_description.txt @@ -1 +1 @@ -群组消息应用-加密的消息传递、群组聊天和视频通话 +群组消息应用——加密的消息传递、群组聊天和视频通话 diff --git a/fastlane/metadata/android/zh-TW/changelogs/40104360.txt b/fastlane/metadata/android/zh-TW/changelogs/40104360.txt new file mode 100644 index 0000000000..be36b60840 --- /dev/null +++ b/fastlane/metadata/android/zh-TW/changelogs/40104360.txt @@ -0,0 +1,3 @@ +新的應用程式佈局可在「實驗室」設定中啟用。請試試看! +修復關於遺失通知的問題,以及增量同步需要長時間的問題。 +完整的變更紀錄:https://github.com/vector-im/element-android/releases diff --git a/gradle.properties b/gradle.properties index ded5a43e28..2c999af35d 100644 --- a/gradle.properties +++ b/gradle.properties @@ -15,7 +15,8 @@ org.gradle.vfs.watch=true org.gradle.caching=true # Android Settings -android.enableJetifier=false +android.enableJetifier=true +android.jetifier.ignorelist=android-base-common,common android.useAndroidX=true #Project Settings diff --git a/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/ImageUtils.kt b/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/ImageUtils.kt index a3d69ae8cf..705223c55e 100644 --- a/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/ImageUtils.kt +++ b/library/multipicker/src/main/java/im/vector/lib/multipicker/utils/ImageUtils.kt @@ -30,7 +30,15 @@ object ImageUtils { fun getBitmap(context: Context, uri: Uri): Bitmap? { return try { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { - ImageDecoder.decodeBitmap(ImageDecoder.createSource(context.contentResolver, uri)) + val source = ImageDecoder.createSource(context.contentResolver, uri) + val listener = ImageDecoder.OnHeaderDecodedListener { decoder, _, _ -> + if (Build.VERSION.SDK_INT == Build.VERSION_CODES.P) { + // Allocating hardware bitmap may cause a crash on framework versions prior to Android Q + decoder.allocator = ImageDecoder.ALLOCATOR_SOFTWARE + } + } + + ImageDecoder.decodeBitmap(source, listener) } else { context.contentResolver.openInputStream(uri)?.use { inputStream -> BitmapFactory.decodeStream(inputStream) diff --git a/library/ui-strings/src/main/res/values-ca/strings.xml b/library/ui-strings/src/main/res/values-ca/strings.xml index 863fa13fbb..25c490807e 100644 --- a/library/ui-strings/src/main/res/values-ca/strings.xml +++ b/library/ui-strings/src/main/res/values-ca/strings.xml @@ -2674,4 +2674,40 @@ Aquesta sessió està llesta per a missatges segurs. La teva sessió actual està llesta per a missatges segurs. Verifica la teva sessió actual obtenir missatges segurs millorats. + Crea missatge directe només al primer missatge + Activa missatges directes programats + Verifica o tanca aquesta sessió per estar més segur. + Per estar més segur, tanca qualsevol sessió que no reconeguis o ja no utilitzis. + No s\'han trobat sessions inactives. + No s\'han trobat sessions no verificades. + No s\'han trobat sessions verificades. + Detalls de sessió + Esborra filtre + Última activitat + Nom de la sessió + Informació d\'aplicació, dispositiu i activitat. + Adreça IP + + Pensa en tancar sessió de les sessions antigues (%1$d dia o més) que ja no utilitzis. + Pensa en tancar sessió de les sessions antigues (%1$d dies o més) que ja no utilitzis. + + Inactiu + No verificat + Verificat + Filtra + + Inactiu durant %1$d dia o més + Inactiu durant %1$d dies o més + + Inactiu + No verificat + Verificat + Totes les sessions + Filtre + Última activitat %1$s + Dispositiu + Sessió + Sessió actual + Element simplificat amb pestanyes opcionals + Activa la nova visualització \ No newline at end of file diff --git a/library/ui-strings/src/main/res/values-cs/strings.xml b/library/ui-strings/src/main/res/values-cs/strings.xml index 79f8311159..1983036271 100644 --- a/library/ui-strings/src/main/res/values-cs/strings.xml +++ b/library/ui-strings/src/main/res/values-cs/strings.xml @@ -2720,4 +2720,48 @@ Sbalit podprostory %s Rozbalit podprostory %s Změnit prostor - + IP adresa + Poslední aktivita + Název relace + Informace o aplikacích, zařízeních a aktivitách. + Podrobnosti o relaci + Vyčistit filtr + Nebyly nalezeny žádné neaktivní relace. + Nebyly nalezeny žádné neověřené relace. + Nebyly nalezeny žádné ověřené relace. + + Zvažte odhlášení ze starých relací (%1$d den nebo více), které již nepoužíváte. + Zvažte odhlášení ze starých relací (%1$d dny nebo více), které již nepoužíváte. + Zvažte odhlášení ze starých relací (%1$d dnů nebo více), které již nepoužíváte. + + Neaktivní + Ověřte své relace pro vylepšené bezpečné zasílání zpráv nebo se odhlaste z těch, které již nepoznáváte nebo nepoužíváte. + Neověřeno + Pro nejlepší zabezpečení se odhlaste z každé relace, kterou již nepoznáváte nebo nepoužíváte. + Ověřeno + Filtr + + Neaktivní po dobu %1$d dne nebo déle + Neaktivní po dobu %1$d dnů nebo déle + Neaktivní po dobu %1$d dnů nebo déle + + Neaktivní + Není připraveno na bezpečné zasílání zpráv + Neověřeno + Připraveno na bezpečné zasílání zpráv + Ověřeno + Všechny relace + Filtr + Poslední aktivita %1$s + Zařízení + Relace + Aktuální relace + Pro nejlepší zabezpečení a spolehlivost tuto relaci ověřte nebo se z ní odhlaste. + Ověřte svou aktuální relaci pro vylepšené bezpečené zasílání zpráv. + Tato relace je připravena pro bezpečné zasílání zpráv. + Vaše aktuální relace je připravena pro bezpečné zasílání zpráv. + Vytvořit přímou zprávu pouze při první zprávě + Povolit odložené přímé zprávy + Zjednodušený Element s volitelnými kartami + Povolit nový vzhled + \ No newline at end of file diff --git a/library/ui-strings/src/main/res/values-de/strings.xml b/library/ui-strings/src/main/res/values-de/strings.xml index e01fc898a3..27f46160bc 100644 --- a/library/ui-strings/src/main/res/values-de/strings.xml +++ b/library/ui-strings/src/main/res/values-de/strings.xml @@ -103,7 +103,7 @@ Du hast das Bild des Raumes geändert Du hast den Raumnamen zu %1$s geändert Du hast einen Videoanruf gestartet. - Du hast einen Audioanruf gestartet. + Du hast einen Sprachanruf gestartet. Du hast den Anruf angenommen. Du hast den Anruf beendet. Du hast den zukünftigen Nachrichtenverlauf für %1$s sichtbar gemacht @@ -269,7 +269,7 @@ Problem melden Bitte beschreibe das Problem. Was hast du genau gemacht\? Was sollte passieren\? Was ist tatsächlich passiert\? Problembeschreibung - Um Probleme diagnostizieren zu können, werden Protokolle des Clients zusammen mit dem Fehlerbericht übermittelt. Dieser Fehlerbericht wird, wie die Protokolle und das Bildschirmfoto, nicht öffentlich sichtbar sein. Wenn du nur den oben eingegebenen Text senden möchtest, die nachfolgenden Haken entsprechend entfernen: + Um Probleme diagnostizieren zu können, werden Protokolle der Anwendung zusammen mit dem Fehlerbericht übermittelt. Dieser Fehlerbericht wird, wie die Protokolle und das Bildschirmfoto, nicht öffentlich sichtbar sein. Wenn du nur den oben eingegebenen Text senden möchtest, die nachfolgenden Haken entsprechend entfernen: Du scheinst dein Telefon frustriert zu schütteln. Möchtest du das Fenster zum Senden eines Fehlerberichts öffnen\? Dein Fehlerbericht wurde erfolgreich übermittelt Der Fehlerbericht konnte nicht übermittelt werden (%s) @@ -278,7 +278,7 @@ Raum betreten Benutzername Abmelden - Heimserver-Adresse + Heim-Server-Adresse Suchen Sprachanruf starten Videoanruf starten @@ -308,7 +308,7 @@ Die Gegenseite hat den Anruf nicht angenommen. Information ${app_name} benötigt die Berechtigung, auf dein Mikrofon zugreifen zu können, um (Sprach-)Anrufe tätigen zu können. - ${app_name} benötigt die Berechtigung, auf Kamera und Mikrofon zu zugreifen, um Video-Anrufe durchzuführen. + ${app_name} benötigt die Berechtigung, auf Kamera und Mikrofon zuzugreifen, um Videoanrufe durchzuführen. \n \nBitte erlaube den Zugriff im nächsten Dialog, um den Anruf durchzuführen. Ja @@ -351,12 +351,12 @@ Anzeigename E-Mail-Adresse hinzufügen Telefonnummer hinzufügen - Appinfo in den Systemeinstellungen öffnen. - App-Info + Anwendungsinformationen in den Systemeinstellungen anzeigen. + Anwendungsinformationen Benachrichtigungen für diesen Account Benachrichtigungen für diese Sitzung Direktnachrichten - Gruppenchats + Gruppenunterhaltungen Einladungen Anrufe Nachrichten von Bots @@ -366,7 +366,7 @@ Version OLM-Version Nutzungsbedingungen - Nutzungshinweise von Drittanbietern + Drittanbieter-Lizenzen Urheberrechtserklärung Datenschutzerklärung Cache leeren @@ -390,8 +390,8 @@ %1$s @ %2$s Authentifizierung Angemeldet als - Heimserver - Identitätsserver + Heim-Server + Identitäts-Server Bitte prüfe deinen E-Mail-Posteingang und klicke auf den in der E-Mail enthaltenen Link. Klicke anschließend auf Fortsetzen. Diese E-Mail-Adresse wird bereits verwendet. Diese Telefonnummer wird bereits verwendet. @@ -403,8 +403,8 @@ Alle Nachrichten von %s anzeigen\? Wähle ein Land Thema - Lesbarkeit des Chatverlaufs - Wer kann den Chatverlauf lesen? + Lesbarkeit des Verlaufs + Wer kann den Verlauf lesen\? Alle Nur Mitglieder Nur Mitglieder (ab Einladung) @@ -412,8 +412,8 @@ Verbannte Benutzer Erweitert Interne ID dieses Raumes - Experimentelle Einstellungen - Dies sind experimentelle Funktionen, die in unerwarteter Weise Fehler verursachen können. Mit Vorsicht zu verwenden. + Labor + Dies sind experimentelle Funktionen, die in unerwarteter Weise Fehler verursachen können. Verwende sie mit Vorsicht. Als Hauptadresse setzen Als Hauptadresse aufheben Entschlüsselungsfehler @@ -447,7 +447,7 @@ Starte beim Systemstart Medien-Cache leeren Medien behalten - Für alle Nachrichten Zeitstempel anzeigen + Zeitstempel für alle Nachrichten 3 Tage 1 Woche 1 Monat @@ -500,7 +500,7 @@ Sicher, dass du einen Videoanruf starten möchtest\? Die Verbannung einer Person entfernt sie aus diesem Raum und hindert sie am erneuten Beitritt. Alle Nachrichten - URL-Vorschau im Chat + URL-Vorschau Vibriere beim Erwähnen eines Nutzers Erstellen Startseite @@ -551,9 +551,9 @@ Um %1$s weiter zu verwenden, musst die Geschäftsbedingungen begutachten und ihnen zustimmen. Jetzt prüfen Konto deaktivieren - Dies wird dein Konto permanent unbenutzbar machen. Du wirst dich nicht anmelden können und keiner wird denselben Nutzernamen erneut registrieren können. Du verlässt automatisch alle Räume, in denen du bist, und deine Kontoangaben werden vom Identitätsserver gelöscht. Diese Aktion ist unumkehrbar. + Dies wird dein Konto permanent unbenutzbar machen. Du wirst dich nicht anmelden können und keiner wird denselben Nutzernamen erneut registrieren können. Du verlässt automatisch alle Räume, in denen du bist, und deine Kontoangaben werden vom Identitäts-Server gelöscht. Diese Aktion ist unumkehrbar. \n -\nDie Deaktivierung deines Konto wird standardmäßig keine deiner gesendeten Nachrichten löschen. Wenn du möchtest, dass auch deine Nachrichten gelöscht werden, wähle zusätzlich die Option unten. +\nDie Deaktivierung deines Kontos wird standardmäßig keine deiner gesendeten Nachrichten löschen. Wenn du möchtest, dass auch deine Nachrichten gelöscht werden, wähle zusätzlich die Option unten. \n \nDie Sichtbarkeit deiner Nachrichten ist ähnlich wie bei E-Mails: Wenn deine Nachrichten gelöscht werden, bedeutet dies, dass von dir verschickte Nachrichten nicht mit neuen oder unregistrierten Nutzer geteilt werden. Aber registrierte Nutzer, die bereits Zugang zu diesen Nachrichten haben, behalten weiterhin Zugriff auf ihre Kopie. Bitte alle Nachrichten, die ich gesendet habe, löschen, wenn mein Konto deaktiviert wird (Warnung: Unterhaltungen werden für zukünftige Nutzer unvollständig erscheinen) @@ -605,7 +605,7 @@ %1$s: %2$s +%d Aus Unterhaltung entfernen - Linkvorschau im Chat aktivieren, falls dein Homeserver diese Funktion unterstützt. + Link-Vorschau im Chat aktivieren, falls dein Heim-Server diese Funktion unterstützt. Schreibbenachrichtigungen senden Lasse andere Benutzer wissen, dass du tippst. Markdown-Formatierung @@ -614,7 +614,7 @@ Klicke auf die Lesebestätigungen für eine detailliertere Liste. Einladungen, Entfernungen und Verbannungen bleiben sichtbar. Passwort - Starte die System-Kamera anstelle der angepassten Kamera. + Starte die Kamera des Systems anstelle der selbstdefinierten. Das Kommando \"%s\" braucht mehr Parameter oder einige Parameter sind inkorrekt. Markdown wurde aktiviert. Markdown wurde deaktiviert. @@ -729,10 +729,10 @@ Wiederherstellungsschlüssel aus Passphrase generieren. Dies kann mehrere Sekunden brauchen. Du verlierst möglicherweise den Zugang zu deinen Nachrichten, wenn du dich abmeldest oder das Gerät verlierst. Rufe Backup-Version ab… - Nutze deine Wiederherstellungspassphrase, um deinen verschlüsselten Chatverlauf lesen zu können + Nutze deine Wiederherstellungs-Passphrase, um deinen verschlüsselten Nachrichtenverlauf lesen zu können nutze deinen Wiederherstellungsschlüssel Wenn du deine Wiederherstellungspassphrase nicht weist, kannst du %s. - Nutze deinen Wiederherstellungsschlüssel, um deinen verschlüsselten Chatverlauf lesen zu können + Nutze deinen Wiederherstellungsschlüssel, um deinen verschlüsselten Nachrichtenverlauf lesen zu können Hast du deinen Wiederherstellungsschlüssel verloren\? Du kannst einen neuen in den Einstellungen einrichten. Sicherung konnte mit dieser Passphrase nicht entschlüsselt werden. Bitte stelle sicher, dass du die korrekte Wiederherstellungspassphrase eingegeben hast. Gib deinen Wiederherstellungsschlüssel ein @@ -757,7 +757,7 @@ Die Sicherung hat eine ungültige Signatur von der verifizierten Sitzung %s Die Sicherung hat eine ungültige Signatur von der nicht verifizierten Sitzung %s Um die Schlüsselsicherung für diese Sitzung zu verwenden, stelle sie jetzt mit deiner Passphrase oder deinem Wiederherstellungsschlüssel wieder her. - Deine gesicherten Schlüssel vom Server löschen\? Du wirst deinen Wiederherstellungsschlüssel nicht mehr nutzen können, um deinen verschlüsselten Chatverlauf zu lesen. + Deine gesicherten Schlüssel vom Server löschen\? Du wirst deinen Wiederherstellungsschlüssel nicht mehr nutzen können, um deinen verschlüsselten Nachrichtenverlauf zu lesen. Beim Abmelden gehen deine verschlüsselten Nachrichten verloren Schlüssel-Sicherung wird durchgeführt. Wenn du dich jetzt abmeldest, gehen deine verschlüsselten Nachrichten verloren. Schlüsselsicherung sollte bei allen Sitzungen aktiviert sein, um den Verlust verschlüsselter Nachrichten zu verhindern. @@ -889,7 +889,7 @@ Sonstige Hinweise Dritter Du siehst diesen Raum bereits! Allgemein - Einstellungen + Optionen Sicherheit und Privatsphäre Push-Regeln Keine Push-Regeln definiert @@ -934,7 +934,7 @@ Keine Hintergrundsynchronisation Auffindbarkeit Um fortzufahren, musst du die Nutzungsbedingungen akzeptieren. - Du verwendest keinen Identitätsserver + Du verwendest keinen Identitäts-Server Du versuchst anscheinend, eine Verbindung zu einem anderen Homeserver herzustellen. Möchtest du dich abmelden\? Push-Key: App-Anzeigename: @@ -942,13 +942,13 @@ Nutzungsbedingungen Für andere auffindbar sein Verwende Bots, Bridges, Widgets und Sticker-Pakete - Identitätsserver - Verbindung zum Identitätsserver trennen - Identitätsserver konfigurieren - Identitätsserver ändern + Identitäts-Server + Verbindung zum Identitäts-Server trennen + Identitäts-Server konfigurieren + Identitäts-Server ändern Auffindbare E-Mail-Adressen Erkennungsoptionen werden angezeigt, sobald du eine E-Mail hinzugefügt hast. - Gib einen neuen Identitätsserver ein + Gib eine Identitäts-Server-Adresse ein Konnte keine Verbindung zum Homeserver herstellen Dies ist keine Adresse eines Matrixservers Kann Homeserver nicht unter dieser URL erreichen. Bitte überprüfen @@ -986,15 +986,15 @@ Sitzungsname: Format: Du nutzt aktuell %1$s um vorhandene Kontakte zu finden und um von dir bekannten Kontakten gefunden zu werden. - Du benutzt aktuell keinen Identitätsserver. Um zu entdecken und um von dir bekannten Kontakten entdeckt zu werden, richte unten einen ein. + Aktuell nutzt du keinen Identitäts-Server. Richte einen ein, um andere zu finden und selbst auffindbar zu sein. Auffindbare Telefonnummern - Bitte gib die Adresse des Identitätsservers ein - Identitätsserver hat keine Nutzungsbedingungen - Der Identitätsserver den du ausgewählt hast, hat keine Nutzungsbedingungen. Fahre nur fort, wenn du dem Besitzer des Dienstes vertraust + Bitte gib die Adresse des Identitäts-Servers ein + Identitäts-Server hat keine Nutzungsbedingungen + Der Identitäts-Server, den du ausgewählt hast, hat keine Nutzungsbedingungen. Fahre nur fort, wenn du den Betreibenden des Dienstes vertraust Eine Textnachricht wurde an %s gesendet. Bitte gib den Verifizierungscode ein, den sie enthält. Aktiviere ausführliche Logs. - Ausführliche Logs werden der Entwicklung der App dadurch helfen, dass mehr Informationen übertragen werden, wenn du einen Fehlerbericht sendest. Auch wenn dies aktiviert ist, werden keine Nachrichteninhalte oder andere privaten Daten aufgezeichnet. - Bitte erneut versuchen, nachdem du die Nutzungsbedingungen deines Heimservers akzeptiert hast. + Ausführliche Protokolle werden bei der Entwicklung der App helfen. Auch wenn dies aktiviert ist, werden keine Nachrichteninhalte oder andere privaten Daten aufgezeichnet. + Bitte erneut versuchen, nachdem du die Nutzungsbedingungen deines Heim-Servers akzeptiert hast. Bei Benutzung könnten Cookies gesetzt werden und es könnten Daten mit %s geteilt werden: Bei Benutzung könnten Daten mit %s geteilt werden: Optionen zum Finden werden erscheinen, sobald du eine Telefonnummer hinzugefügt hast. @@ -1004,7 +1004,7 @@ Navigationsmenü öffnen Raumerstellungsmenü öffnen Schließe das Raumerstellungsmenü… - Starte einen neuen Privatchat + Erstelle eine neue Direktnachricht Erstelle einen neuen Raum Schließe Key-Backup-Einblendung Zum Ende springen @@ -1052,7 +1052,7 @@ Halte auf einem Raum um mehr Optionen anzuzeigen %1$s hat den Raum für jeden, der den Link hat, öffentlich gemacht. Ungelesene Nachrichten - Privat oder in Gruppen mit Leuten chatten + Schreibe privat oder in Gruppen Halte Gespräche mittels Verschlüsselung privat Los geht\'s Wähle einen Server @@ -1063,9 +1063,9 @@ Andere Benutzerdefinierte und erweiterte Einstellungen Fortfahren - Eine Trennung von deinem Identitätsserver würde bedeuten, dass du weder von anderen Nutzern gefunden werden, noch diese per E-Mail oder Telefonnummer einladen kannst. - Du teilst deine E-Mail-Adressen oder Telefonnummern momentan auf dem Identitätsserver %1$s. Du wirst dich erneut mit %2$s verbinden müssen, um mit dem Teilen aufzuhören. - Stimme den Nutzungsbedingungen des Identitätsservers (%s) zu, um zu erlauben per E-Mail oder Telefonnummer gefunden zu werden. + Eine Trennung von deinem Identitäts-Server würde bedeuten, dass du weder von anderen gefunden werden, noch diese per E-Mail oder Telefonnummer einladen kannst. + Du teilst deine E-Mail-Adressen oder Telefonnummern momentan auf dem Identitäts-Server %1$s. Du wirst dich erneut mit %2$s verbinden müssen, um mit dem Teilen aufzuhören. + Stimme den Nutzungsbedingungen des Identitäts-Servers (%s) zu, um per E-Mail-Adresse oder Telefonnummer auffindbar zu sein zu können. Zu teilende Daten nicht verarbeitbar Erweitere und individualisiere dein Benutzererlebnis Mit %1$s verbinden @@ -1081,13 +1081,13 @@ Es tut uns leid. Dieser Server akzeptiert keine neuen Benutzerkonten. Die Anwendung kann kein neues Benutzerkonto auf diesem Server erstellen. \n -\nMöchtest du dich über eine Web-Anwendung anmelden\? +\nMöchtest du dich mit einer Web-Anwendung anmelden\? Diese E-Mail-Adresse ist mit keinem Benutzerkonto verknüpft. Passwort auf %1$s zurücksetzen E-Mail Neues Passwort Achtung! - Eine Änderung deines Passworts wird alle Ende-zu-Ende-Schlüssel zurücksetzen. Dein verschlüsselter Chatverlauf wird dadurch unlesbar. Richte die Schlüsselsicherung ein oder exportiere deine Raumschlüssel aus einer anderen Sitzung, bevor du dein Passwort zurücksetzt. + Eine Änderung deines Passworts wird alle Ende-zu-Ende-Schlüssel zurücksetzen. Dein verschlüsselter Verlauf wird dadurch unlesbar. Richte die Schlüsselsicherung ein oder exportiere deine Raumschlüssel aus einer anderen Sitzung, bevor du dein Passwort zurücksetzt. Fortfahren Diese E-Mail-Adresse ist mit keinem Benutzerkonto verknüpft Prüfe deinen Posteingang @@ -1126,9 +1126,9 @@ Es ist deine Konversation. Mache sie dir zu eigen. Premium-Hosting für Organisationen Gib die Adresse des Modular Element oder Servers ein, den du verwenden möchtest - Die Anwendung kann sich nicht bei diesem Homeserver anmelden. Der Homeserver unterstützt die folgenden Anmeldemöglichkeiten: %1$s. + Die Anwendung kann sich nicht bei diesem Heim-Server anmelden. Der Heim-Server unterstützt die folgenden Anmeldemöglichkeiten: %1$s. \n -\nMöchtest du dich mit einem Webclient anmelden\? +\nMöchtest du dich mit einer Web-Anwendung anmelden\? Dir wird eine Bestätigungsmail gesendet, um dein neues Passwort zu bestätigen. Weiter Du wurdest von allen Sitzungen abgemeldet und erhältst keine Push-Benachrichtigungen mehr. Um Benachrichtigungen wieder zu aktivieren, melde dich auf jedem Gerät erneut an. @@ -1272,21 +1272,21 @@ Vergleiche den Code mit dem Code auf dem Bildschirm deines Gegenübers. Nachrichten mit diesem Gegenüber sind Ende-zu-Ende-verschlüsselt und können nicht von Dritten gelesen werden. Deine neue Sitzung ist jetzt verifiziert. Sie hat Zugriff auf deine verschlüsselten Nachrichten, und andere Benutzer sehen sie als vertrauenswürdig an. - Cross-Signing - Cross-Signing ist aktiviert -\nPrivate Schlüssel auf dem Gerät. - Cross-Signing ist aktiviert + Quersignierung + Quersignierung ist aktiviert, +\nprivate Schlüssel auf dem Gerät. + Quersignierung ist aktiviert, \nSchlüssel sind vertrauenswürdig. \nPrivate Schlüssel sind nicht bekannt - Cross-Signing ist aktiviert + Quersignierung ist aktiviert, \nSchlüssel sind nicht vertrauenswürdig - Cross-Signing ist nicht aktiviert + Quersignierung ist nicht aktiviert Aktive Sitzungen Alle Sitzungen anzeigen Sitzungen verwalten Diese Sitzung abmelden Keine kryptografischen Informationen verfügbar - Diese Sitzung ist für sichere Nachrichtenübertragung vertrauenswürdig, da du sie überprüft hast: + Diese Sitzung ist für sichere Kommunikation vertrauenswürdig, da du sie überprüft hast: Verifiziere diese Sitzung, um sie als vertrauenswürdig zu markieren, und gewähren ihr Zugriff auf verschlüsselte Nachrichten. Wenn du dich nicht bei dieser Sitzung angemeldet hast, ist dein Konto möglicherweise gefährdet: Eine aktive Sitzung @@ -1301,10 +1301,10 @@ Sitzungen Vertraut Nicht vertraut - Diese Sitzung ist für sichere Nachrichtenübertragung vertrauenswürdig, weil %1$s (%2$s) sie verifiziert hat: + Diese Sitzung ist für sichere Kommunikation vertrauenswürdig, weil %1$s (%2$s) sie verifiziert hat: %1$s (%2$s) hat sich in einer neuen Sitzung angemeldet: Bis dieser Benutzer dieser Sitzung vertraut, werden an und von ihm gesendete Nachrichten mit Warnungen gekennzeichnet. Alternativ kannst du dies manuell überprüfen. - Initialisiere Cross-Signing + Quersignierung initialisieren Schlüssel zurücksetzen QR-Code Fast geschafft! Zeigt %s ein Häkchen\? @@ -1373,7 +1373,7 @@ Import der Schlüssel fehlgeschlagen Benachrichtigungskonfiguration Nachrichten mit \"@room\" - Verschlüsselte Gruppenchats + Verschlüsselte Gruppenunterhaltungen Sendet eine Nachricht als einfachen Text, ohne sie als Markdown zu interpretieren Inkorrekter Benutzername und/oder Passwort. Das eingegebene Passwort beginnt oder endet mit Leerzeichen, bitte kontrolliere es. Nachrichtenschlüssel @@ -1381,7 +1381,7 @@ Druck es aus und speichere es an einem sicheren Ort Kopier es in deinen persönlichen Cloud-Speicher Verschlüsselung ist nicht aktiviert - Raumupgrades + Raumaktualisierung Verschlüsselung aktiviert Nachrichten in diesem Raum sind Ende-zu-Ende-verschlüsselt. Erfahre mehr und verifiziere Benutzer in deren Profil. Die Verschlüsselung in diesem Raum wird nicht unterstützt @@ -1392,7 +1392,7 @@ Fast geschafft! Warte auf Bestätigung… Verschlüsselte Direktnachrichten Nachricht… - Verifiziere dich und andere, um eure Chats zu schützen + Verifiziere dich und andere, um eure Unterhaltungen zu schützen Gib zum Fortfahren deinen %s ein Datei benutzen Dies ist kein gültiger Wiederherstellungsschlüssel @@ -1412,12 +1412,12 @@ Bildschirmfotos der Anwendung verhindern Das Aktivieren dieser Einstellung setzt FLAG_SECURE in allen Aktivitäten. Starte die Anwendung neu, damit die Änderung wirksam wird. Neues Benutzerpasswort festlegen… - Nutze die neueste Version von ${app_name} auf deinen anderen Geräten, ${app_name} Web, ${app_name} Desktop, ${app_name} iOS, ${app_name} für Android oder einen anderen cross-signing-fähigen Matrix-Client + Nutze die neueste Version von ${app_name} auf deinen anderen Geräten, ${app_name} Web, ${app_name} Desktop, ${app_name} iOS, ${app_name} für Android oder eine andere Matrix-Anwendung, die Quersignierung unterstützt ${app_name} Web \n${app_name} Desktop ${app_name} iOS \n${app_name} Android - oder einen anderen cross-signing-fähigen Matrix Client + oder eine andere Matrix-Anwendung, die Quersignierung unterstützt Nutze die neueste Version von ${app_name} auf deinen anderen Geräten: Erzwingt das Verwerfen der aktuell ausgehende Gruppensitzung in einem verschlüsseltem Raum Wird nur in verschlüsselten Räumen unterstützt @@ -1461,7 +1461,7 @@ Ablehnen Erfolg Echtzeitverbindung konnte nicht hergestellt werden. -\nBitte den Administrator deines Heimservers, einen TURN-Server zu konfigurieren, damit Anrufe zuverlässig funktionieren. +\nBitte den Administrator deines Heim-Servers, einen TURN-Server zu konfigurieren, damit Anrufe zuverlässig funktionieren. Audiogerät auswählen Telefon Lautsprecher @@ -1555,22 +1555,22 @@ Andere verfügbare Sprachen Lade verfügbare Sprachen… Öffne AGBs von %s - Trenne Verbindung zu Identitätsserver %s\? - Dieser Identitätsserver ist veraltet. ${app_name} unterstützt nur API V2. + Verbindung zu Identitäts-Server %s trennen\? + Dieser Identitäts-Server ist veraltet. ${app_name} unterstützt nur API V2. Diese Operation ist nicht möglich. Der Homeserver ist veraltet. - Bitte konfiguriere zuerst einen Identitätsserver. - Bitte akzeptiere zuerst die AGB des Identitätsservers in den Einstellungen. + Bitte konfiguriere zuerst einen Identitäts-Server. + Bitte akzeptiere zuerst die AGB des Identitäts-Servers in den Einstellungen. Deiner Privatsphäre wegen unterstützt ${app_name} nur das Senden gehashter E-Mail-Adressen und Telefonnummern. Die Assoziierung ist fehlgeschlagen. Für diese Kennung gibt es aktuell keine Zuordnung. - Dein Homeserver (%1$s) schlägt %2$s als Identitätsserver vor + Dein Heim-Server (%1$s) schlägt %2$s als Identitäts-Server vor Benutze %1$s - Alternativ kannst du die URL eines beliebigen anderen Identitätsservers angeben - Gib die URL von einem Identitätsserver ein - Bestätigen - Lege Rolle fest + Alternativ kannst du die URL eines beliebigen anderen Identitäts-Servers angeben + Gib die Adresse eines Identitäts-Servers ein + Absenden + Rolle festlegen Rolle - Öffne Chat + Unterhaltung öffnen Stelle Mikrophon stumm Aktiviere Mikrophon Stoppe Kamera @@ -1704,7 +1704,7 @@ Alle Wiederherstellungsoptionen vergessen oder verloren\? Alles zurücksetzen Du bist beigetreten. %s ist beigetreten. - Nachrichten in diesem Raum sind Ende-zu-Ende-verschlüsselt. + Nachrichten in dieser Unterhaltung sind Ende-zu-Ende-verschlüsselt. Verlassen Einstellungen Nachrichten hier sind Ende-zu-Ende-verschlüsselt. @@ -1744,10 +1744,10 @@ Direktnachricht Verlauf der Anfragen von Schlüsselfreigaben senden Keine weiteren Ergebnisse - Beginne ein Gespräch + Beginne eine Unterhaltung Autorisieren Meine Zustimmung widerrufen - Du hast zugestimmt E-Mails und Telefonnummern an diesen Identitätsserver zu senden, um von anderen Nutzern entdeckt zu werden. + Du hast zugestimmt, E-Mail-Adressen und Telefonnummern an diesen Identitäts-Server zu übermitteln, um für andere auffindbar zu sein. E-Mails und Telefonnummern senden Vorschläge Bekannte Personen @@ -1774,7 +1774,7 @@ Suche nach Kontakten auf Matrix Raumbild einrichten Einverständnis wurde nicht abgegeben. - Teile diesen Code mit Leuten, damit sie ihn scannen und mit dir chatten können. + Teile diesen Code, damit andere ihn einlesen und mit dir schreiben können. Meinen Code teilen Mein Code Scanne einen QR-Code @@ -1794,7 +1794,7 @@ Manche Zeichen sind nicht zulässig Bitte gib eine Raumadresse an Diese Adresse ist bereits vergeben - Aktivieren, wenn der Raum nur von Mitgliedern deines Heimservers zur internen Kommunikation verwendet wird. Das kann später nicht mehr geändert werden. + Aktivieren, wenn der Raum nur von Mitgliedern deines Heim-Servers zur internen Kommunikation verwendet wird. Das kann später nicht mehr geändert werden. Begrenze Zugang zu diesem Raum (für immer!) auf Mitglieder von %s %1$d von %2$d Keine Vorschau für diesen Raum verfügbar. Willst du direkt beitreten\? @@ -1849,7 +1849,7 @@ Knopf zum Nachrichteneditor hinzufügen, der die Emoji-Tastatur öffnet Emoji-Tastatur anzeigen Nutze /confetti oder sende Nachrichten mit ❄️ oder 🎉 - Chateffekte + Effekte im Verlauf Thema ändern Raum aktualisieren Rollen, die zum Ändern verschiedener Teile des Raums erforderlich sind, auswählen @@ -1859,7 +1859,7 @@ Authentifizierung fehlgeschlagen Deine Anmeldeinformationen müssen für ${app_name} eingegeben werden, um diese Aktion auszuführen. Erneute Authentifizierung erforderlich - Cross-Signing konnte nicht eingerichtet werden + Quersignierung konnte nicht eingerichtet werden Nicht autorisierte, fehlende gültige Authentifizierungsdaten Nutzer Beim Weiterleiten des Anrufs ist ein Fehler aufgetreten @@ -1917,7 +1917,7 @@ %d Einträge Die Obergrenze ist nicht bekannt. - Dein Homeserver akzeptiert Anhänge (wie Dateien, Medien, etc.) mit einer Größe bis zu %s. + Dein Heim-Server akzeptiert Anhänge (wie Dateien, Medien, etc.) mit einer Größe bis zu %s. Datei-Upload-Obergrenze des Servers Serverversion Servername @@ -1960,7 +1960,7 @@ Diese werden in der Lage sein, %s zu durchsuchen Diese werden kein Teil von %s sein Tritt meinem Space %1$s %2$s bei - Mit Spaces kannst du Personen und Räume gruppieren. + Spaces sind eine neue Möglichkeit, Räume und Personen zu gruppieren. Räume oder Spaces hinzufügen Vorübergehend überspringen Über welche Themen möchtest du dich in %s unterhalten\? @@ -1994,8 +1994,8 @@ Dein öffentlicher Space Betrete einen Space mit der angegebenen ID Beschreibung - Erzeuge Space… - Irgendetwas + Erzeuge Space … + Ohne Thema Allgemein Einen Space erstellen Nur für mich @@ -2051,7 +2051,7 @@ Privater Space Öffentlicher Space Unbekannte Person - Feedback geben + Rückmeldung geben Fehler beim Senden vom Feedback (%s) Dein Feedback wurde erfolgreich versandt. Danke! Mich bei Fragen kontaktieren @@ -2086,7 +2086,7 @@ Sprachnachricht pausieren Sprachnachricht abspielen Sprachnachricht aufnehmen - Dieser Raum verwendet die Raumversion %s, die von diesem Heimserver als instabil markiert ist. + Dieser Raum verwendet die Raumversion %s, die von diesem Heim-Server als instabil markiert ist. Du benötigst die Berechtigung, um einen Raum upzugraden Übergeordneten Space automatisch updaten Benutzer automatisch einladen @@ -2105,14 +2105,14 @@ Sprachnachricht Lege fest, wer diesen Raum finden und betreten kann. Klicke, um die Spaces zu bearbeiten - Spaces auswählen + Spaces wählen Mitglieder von %s können Räume finden, betrachten und betreten. Privat (Zutritt nur mit Einladung) Raumupgrades Nachrichten von Bots Raumeinladungen - Verschlüsselten Gruppenchats - Gruppenchats + Verschlüsselte Gruppennachrichten + Gruppennachrichten Verschlüsselten Direktnachrichten Direktnachrichten Mein Benutzername @@ -2129,7 +2129,7 @@ Verpasster Sprachanruf %d verpasste Sprachanrufe - Heimserver API URL + Heim-Server API URL Um Sprachnachrichten zu senden, erlaube bitte Zugriff aufs Mikrofon. Um fortzufahren, erlaube bitte in den Systemeinstellungen Zugriff auf die Kamera. Für diese Aktion fehlen einige Berechtigungen, bitte erlaube diese in den Systemeinstellungen. @@ -2243,8 +2243,8 @@ Auffindungseinstellungen öffnen Sitzung abgemeldet! Raum verlassen! - Heimserver auswählen - Es konnte kein Heimserver mit der Adresse %s gefunden werden. Bitte überprüfe die Adresse oder wähle den Heimserver manuell. + Heim-Server auswählen + Es konnte kein Heim-Server mit der Adresse %s gefunden werden. Bitte überprüfe die Adresse oder wähle den Heim-Server manuell. Untergeordneten Space hinzufügen. Bist du dir wirklich sicher, dass du diese Informationen senden willst\? E-Mail-Adressen und Telefonnummern an %s senden @@ -2259,16 +2259,16 @@ \n%s kannst du alle unsere Bedingungen lesen. Stelle sicher, dass die richtigen Personen Zugriff auf %s haben. Du kannst jederzeit weitere Personen einladen. Wer ist Mitglied deines Teams\? - Der Identitätsserver gibt keine Bedingungen an - Bedingungen des Identitätsservers ausblenden - Bedingungen des Identitätsservers anzeigen + Der Identitäts-Server gibt keine Bedingungen an + Richtlinie des Identitäts-Servers ausblenden + Bedingungen des Identitäts-Servers anzeigen Systemeinstellungen Versionen Erhalte Hilfe bei der Bedienung von ${app_name} Hilfe und Unterstützung Hilfe Rechtliches - Entscheide, welche Spaces Zugriff auf den Raum haben sollen. Die Mitglieder der Spaces können diesen Räumen beitreten. + Entscheide, welche Spaces Zugriff auf den Raum haben sollen. Die Mitglieder der Spaces können diesen Räumen betreten. hier Hilf mit, ${app_name} zu verbessern Aktivieren @@ -2296,15 +2296,15 @@ Auffindbarkeit (%s) Per E-Mail einladen, finde deine Kontakte und mehr… Schließe die Konfiguration des Auffindbarkeitsdienstes ab. - Du verwendest derzeit keinen Identitätsserver. Um Teammitglieder einzuladen und für sie auffindbar zu sein, müssen du einen solchen Server konfigurieren. - Ich habe schon ein Konto - Sichere Nachrichtenübertragung. - Besitze deine Konversationen. - Um bestehende Kontakte ermitteln zu können, müsst du Kontaktinformationen (E-Mails und Telefonnummern) an Ihren Identitätsserver senden. Wir verschlüsseln deine Daten vor dem Senden, um den Datenschutz zu gewährleisten. - Deine Kontakte sind privat. Um in deinen Kontakten Benutzer erkennen zu können, benötigen wir deine Erlaubnis, Kontaktinformationen an deinen Identitätsserver zu senden. + Du verwendest derzeit keinen Identitäts-Server. Um Team-Mitglieder einzuladen und für sie auffindbar zu sein, konfiguriere zunächst einen. + Ich habe bereits ein Konto + Sichere Kommunikation. + Besitze deine Unterhaltungen. + Um bestehende Kontakte ermitteln zu können, musst du Kontaktinformationen (E-Mail-Adressen und Telefonnummern) an deinen Identitäts-Server übermitteln. Wir verschlüsseln deine Daten vor der Übermittlung, um den Datenschutz gewährleisten zu können. + Deine Kontakte sind privat. Um unter deinen Kontakten Matrix-Nutzer finden zu können, benötigen wir deine Erlaubnis, Kontaktinformationen an deinen Identitäts-Server zu übermitteln. Dieser Server stellt keine Richtlinie bereit. - Deine Identitätsserver-Richtlinie - Deine Heimserver Richtlinie + Richtlinie deines Identitäts-Servers + Richtlinie deines Heim-Servers ${app_name} Richtlinie Abstimmung erstellen Kontakte öffnen @@ -2340,10 +2340,10 @@ Umfrage bearbeiten Keine Stimmen abgegeben Konto erstellen - Nachrichtenaustausch für dein Team. + Kommunikation für dein Team. Ende-zu-Ende-verschlüsselt und ohne Telefonnummer nutzbar. Keine Werbung oder Datenerfassung. - Wähle wo deine Gespräche liegen, für Kontrolle und Unabhängigkeit. Verbunden mit Matrix. - Sichere und unabhängige Kommunikation, die für die gleiche Vertraulichkeit sorgt, wie ein Gespräch von Angesicht zu Angesicht in deinem eigenen Zuhause. + Wähle, wo deine Unterhaltungen gespeichert werden, um Kontrolle und Unabhängigkeit zu erhalten. Verbunden via Matrix. + Sichere und unabhängige Kommunikation, die für eine Vertraulichkeit sorgt, wie ein Gespräch von Angesicht zu Angesicht in deinen eigenen vier Wänden. Standort Die Verschlüsselung ist fehlerhaft konfiguriert Bitte kontaktiere einen Admin, um die Verschlüsselung zurückzusetzen. @@ -2363,10 +2363,10 @@ Communities Teams Wir helfen dir, in Verbindung zu kommen - Mit wem wirst du am meisten chatten\? + Mit wem wirst du am meisten schreiben\? Link zu Thread kopieren Threads anzeigen - Nachrichtenblasen anzeigen + Nachrichtenblasen Laden der Karte fehlgeschlagen Karte Hinweis: App wird neugestartet @@ -2401,7 +2401,7 @@ Beenden Live-Standort aktiviert Standort teilen - Standort teilen + Diesen Standort teilen Meinen Standort teilen Meinen Standort teilen Live-Standort teilen @@ -2409,19 +2409,19 @@ Threads nähern sich der Beta 🎉 Deaktivieren BETA - Feedback geben + Rückmeldung geben BETA - Threads Beta + Threads-Beta Threads Beta Bildschirm teilen - Ausprobieren + Probiere es aus Live bis %1$s Wähle Deine Benachrichtigungsmethode Vorläufige Implementierung: Standorte bleiben im Nachrichtenverlauf von Räumen erhalten Profil-Tag: h Standortfreigabe aktivieren - Bitte beachten: Dies ist eine Testfunktion mit einer vorübergehenden Implementierung. Das bedeutet, dass Du Deinen Standortverlauf nicht löschen kannst und dass fortgeschrittene Nutzer Deinen Standortverlauf auch dann noch sehen können, wenn Du Deinen Live-Standort nicht mehr mit diesem Raum teilst. + Bitte beachte: Dies ist eine experimentelle Funktion, die eine temporäre Implementierung nutzt. Das bedeutet, dass du deinen Standortverlauf nicht löschen kannst und erfahrene Nutzer ihn sehen können, selbst wenn du deinen Live-Standort nicht mehr mit diesem Raum teilst. Live-Standortfreigabe Aktuelles Gateway: %s Gateway @@ -2464,7 +2464,7 @@ %1$d Minuten %2$d Sekunden %1$s, %2$s, %3$s Die neuesten Profilinformationen (Avatar und Anzeigename) für alle Nachrichten anzeigen. - Aktuelle Benutzerinformationen anzeigen + Aktuelle Profilinformationen Sieht gut aus! einen Anzeigenamen wählen Zurück zum Home-Screen @@ -2480,11 +2480,11 @@ Präsenz Animierte Bilder in der Zeitleiste abspielen, sobald sie sichtbar sind Animierte Bilder automatisch abspielen - Das Endpunkt-Token konnte nicht auf dem Heimserver registriert werden: + Das Endpunkt-Token konnte nicht auf dem Heim-Server registriert werden: \n%1$s - Endpunkt erfolgreich beim Heimserver registriert. + Endpunkt erfolgreich beim Heim-Server registriert. Endpunkt-Registrierung - Dein Heimserver unterstützt derzeit keine Threads, daher kann diese Funktion evtl. nicht richtig funktionieren. Einige Nachrichten mit Threads sind möglicherweise nicht zuverlässig verfügbar. %sMöchtest Du Threads trotzdem aktivieren\? + Dein Heim-Server unterstützt derzeit keine Threads, daher könnte diese Funktion evtl. nicht richtig funktionieren. Einige Nachrichten mit Threads sind möglicherweise nicht zuverlässig verfügbar. %sMöchtest Du Threads trotzdem aktivieren\? Threads helfen dabei, Unterhaltungen beim Thema zu halten und leichter zu verfolgen. %sDie Aktivierung von Threads aktualisiert die App. Dies kann bei einigen Konten länger dauern. Wir nähern uns der Veröffentlichung einer öffentlichen Beta für Threads. \n @@ -2506,7 +2506,7 @@ Beschäftigt Die biometrische Authentifizierung konnte nicht aktiviert werden. Die biometrische Authentifizierung wurde deaktiviert, weil kürzlich eine neue biometrische Authentifizierungsmethode hinzugefügt wurde. Du kannst sie in den Einstellungen wieder aktivieren. - Der Heimserver akzeptiert keine Benutzernamen, die nur aus Ziffern bestehen. + Der Heim-Server akzeptiert keine Benutzernamen, die nur aus Ziffern bestehen. teilten ihren Live-Standort Schritt überspringen Speichern und fortfahren @@ -2521,13 +2521,13 @@ Profil personalisieren ${app_name} ist auch für den Arbeitsplatz geeignet. Die sichersten Organisationen der Welt vertrauen darauf. Threads sind noch in Arbeit, und es stehen neue, aufregende Funktionen an, wie z. B. verbesserte Benachrichtigungen. Wir würden uns sehr über Dein Feedback freuen! - Nachrichten in diesem Chat werden Ende-zu-Ende-verschlüsselt. + Nachrichten in dieser Unterhaltung werden Ende-zu-Ende-verschlüsselt. Bist du ein Mensch\? Bitte lies dir %ss Bedingungen und Richtlinien durch Server-Richtlinien Folge den Anweisungen, die an %s gesendet wurden E-Mail bestätigen - Ergebnisse sind nach Beenden der Abstimmung sichtbar + Ergebnisse werden nach Abschluss der Abstimmung sichtbar sein Prüfe deine E-Mails. Passwort zurücksetzen Gib mindestens 8 Zeichen ein. @@ -2550,12 +2550,12 @@ %d Nachricht gelöscht %d Nachrichten gelöscht - Keine Element Call-Berechtigungsabfragen - Bestätige automatisch Element Call-Widgets und erlaube Kamera- und Mikrofonzugriff + Keine Element-Call-Berechtigungsabfragen + Bestätige automatisch Element-Call-Widgets und erlaube Kamera- und Mikrofonzugriff Los ändern oder - Das Zuhause deiner Gespräche + Der Ort, an dem deine Gespräche stattfinden Das zukünftige Zuhause für deine Gespräche Systemstandard nutzen Automatisch festlegen @@ -2565,9 +2565,9 @@ E-Mail nicht bestätigt, prüfe deinen Posteingang Willkommen zurück! Passwort vergessen - Benutzername / E-Mail / Telefon + Nutzername / E-Mail-Adresse / Telefonnummer Erstelle dein Konto - Serveradresse + Server-URL Wie lautet die Adresse deines Servers\? Das wird eine Art Zuhause für deine Daten Wie lautet die Adresse deines Servers\? Muss 8 oder mehr Zeichen umfassen @@ -2585,7 +2585,7 @@ Raum erstellen Ungelesene Personen - Schreibe deine erste Nachricht, um %s zur Konversation einzuladen + Schreibe deine erste Nachricht, um %s zur Unterhaltung einzuladen Alle Sitzungen anzeigen (V2, in Arbeit) Für bestmögliche Sicherheit verifiziere deine Sitzungen und melde dich von allen ab, die du nicht erkennst oder nutzt. Andere Sitzungen @@ -2595,7 +2595,7 @@ Favoriten Alle Karte laden nicht möglich -\nDieser Heimserver könnte für die Kartendarstellung nicht konfiguriert sein. +\nDieser Heim-Server könnte für die Kartendarstellung nicht konfiguriert sein. Einstellungen öffnen Dieser QR-Code ist fehlerhaft. Bitte versuche es mit einer anderen Methode. Du wirst deinen verschlüsselten Nachrichtenverlauf nicht abrufen können. Um neu zu beginnen, setze deine Sicherung und Verifizierungsschlüssel zurück. @@ -2619,24 +2619,94 @@ Entschuldigung, dieser Raum wurde nicht gefunden. \nBitte versuche es später erneut.%s Einladungen - Nicht verifiziert · Letzte Aktivität %1$s + Nicht verifiziert · Neueste Aktivität %1$s Nicht verifizierte Sitzung - Nicht verifizierte Sitzung + Nicht verifizierte Sitzungen Verbessere deine Kontosicherheit, indem du diese Empfehlungen beherzigst. Sicherheitsempfehlungen Inaktiv seit %1$d+ Tag (%2$s) Inaktiv seit %1$d+ Tagen (%2$s) - Verifiziert · Letzte Aktivität %1$s + Verifiziert · Neueste Aktivität %1$s Verifizierte Sitzung Unbekannter Gerätetyp Nichts Neues. - Spaces sind eine neue Art, Räume und Personen zu organisieren. Erstelle einen Space, um zu beginnen. + Spaces sind eine neue Möglichkeit, Räume und Personen zu gruppieren. Erstelle einen Space, um zu beginnen. Noch keine Spaces. Hier werden deine ungelesenen Nachrichten erscheinen, wenn du welche hast. Es gibt nichts Neues. Alle Unterhaltungen Space wechseln Unterhaltung beginnen - + Filter + Filtern + Subspaces von %s schließen + Subspaces von %s erweitern + Andere können dich als %s finden + Erstelle Unterhaltungen mit der ersten Nachricht + Verzögerte Direktnachrichten + Historie anzeigen + Probiere es aus + Tippe oben rechts, um eine Rückmeldung zu senden. + Rückmeldung geben + Greife auf deine Spaces (unten rechts) schneller und einfacher denn je zu. + Auf Spaces zugreifen + Um dein ${app_name} zu vereinfachen, sind Tabs nun optional. Verwalte sie mit dem Menü oben rechts. + Willkommen in einer neuen Übersicht! + Die Komplettlösung für sichere Kommunikation unter Freunden, in Gruppen oder in Organisationen. Erstelle eine Unterhaltung oder trete einem bestehenden Raum bei, um loszulegen. + Willkommen bei ${app_name}, +\n%s. + Spaces sind eine neue Möglichkeit, Räume und Personen zu gruppieren. Füge einen bestehenden Raum hinzu oder erstelle einen neuen mit der Schaltfläche unten rechts. + %s +\nsieht ein bisschen leer aus. + IP-Adresse + Sitzungsname + Anwendung, Gerät und Aktivitätsinformationen. + Sitzungsdetails + Filter zurücksetzen + Keine inaktiven Sitzungen gefunden. + Keine nicht verifizierten Sitzungen gefunden. + Keine verifizierten Sitzungen gefunden. + + Erwäge, dich aus alten (ein Tag oder mehr), nicht mehr verwendeten Sitzungen abzumelden. + Erwäge, dich aus alten (%1$d Tage oder mehr), nicht mehr verwendeten Sitzungen abzumelden. + + Inaktiv + Für besonders sichere Kommunikation verifiziere deine Sitzungen oder melde dich von ihnen ab, falls du sie nicht mehr identifizieren kannst. + Nicht verifiziert + Verifiziert + + Inaktiv seit %1$d Tag oder länger + Inaktiv seit %1$d Tagen oder länger + + Inaktiv + Nicht bereit für sichere Kommunikation + Nicht verifiziert + Für sichere Kommunikation bereit + Verifiziert + Alle Sitzungen + Gerät + Sitzung + Aktuelle Sitzung + + Erwäge, dich aus alten (ein Tag oder mehr), nicht mehr verwendeten Sitzungen abzumelden. + Erwäge, dich aus alten (%1$d Tage oder mehr), nicht mehr verwendeten Sitzungen abzumelden. + + Inaktive Sitzungen + Nicht verifizierte Sitzungen verifizieren oder abmelden. + Alle anzeigen (%1$d) + Sitzung verifizieren + Diese Sitzung ist für sichere Kommunikation bereit. + Desktop + Hier erscheinen deine neuen Anfragen und Einladungen. + Ein vereinfachtes Element mit optionalen Tabs + Neues Layout aktivieren + Neueste Aktivität + Neueste Aktivität %1$s + Verifiziere deine aktuelle Sitzung für besonders sichere Kommunikation. + Deine aktuelle Sitzung ist für sichere Kommunikation bereit. + Details anzeigen + Für bestmögliche Sicherheit und Zuverlässigkeit verifiziere diese Sitzungen oder melde dich von ihr ab. + Für die bestmögliche Sicherheit, melde dich von allen Sitzungen ab, die du nicht erkennst oder nicht mehr benutzt. + \ No newline at end of file diff --git a/library/ui-strings/src/main/res/values-et/strings.xml b/library/ui-strings/src/main/res/values-et/strings.xml index 9bd1dd23b7..dbdbbdbb00 100644 --- a/library/ui-strings/src/main/res/values-et/strings.xml +++ b/library/ui-strings/src/main/res/values-et/strings.xml @@ -2594,7 +2594,7 @@ Näita kõiki sessioone (V2, WIP) Parima turvalisuse nimel verifitseeri kõik oma sessioonid ning logi välja neist, mida sa enam ei kasuta. Muud sessioonid - Sessionid + Sessioonid Ava kogukondade loend Alusta uut vestlust või loo uus jututuba Inimesed @@ -2659,4 +2659,46 @@ Siin saavad olema sinu tulevased päringud ja kutsed. Ahenda %s alamkogukonnad Näita %s alamkogukondi - + IP-aadress + Viimati kasutusel + Sessiooni nimi + Rakendus, seade ja kasutamise teave. + Sessiooni teave + Eemalda filter + Ei leidu sessioone, mis pole aktiivses kasutuses. + Verifitseerimata sessioone ei leidu. + Verifitseeritud sessioone ei leidu. + + Kaalu vanadest ja kasutamata sessioonidest väljalogimist (vanemad kui %1$d või enam päeva). + Kaalu vanadest ja kasutamata sessioonidest väljalogimist (vanemad kui %1$d või enam päeva). + + Pole pidevas kasutuses + Turvalise sõnumvahetuse nimel verifitseeri kõik oma sessioonid ning logi neist välja, mida sa enam ei kasuta või ei tunne enam ära. + Verifitseerimata + Parima turvalisuse nimel logi välja neist sessioonidest, mida sa enam ei kasuta või ei tunne ära. + Verifitseeritud + Filtreeri + + Pole olnud kasutusel %1$d või enam päeva + Pole olnud kasutusel %1$d või enam päeva + + Pole pidevas kasutuses + Pole valmis turvaliseks sõnumivahetuseks + Verifitseerimata + Valmis turvaliseks sõnumivahetuseks + Verifitseeritud + Kõik sessioonid + Filtreeri + Viimati kasutusel %1$s + Seade + Sessioonid + Praegune sessioon + Parima turvalisuse ja töökindluse nimel verifitseeri see sessioon või logi ta võrgust välja. + Turvalise sõnumivahetuse nimel palun verifitseeri oma praegune sessioon. + See sessioon on valmis turvaliseks sõnumivahetuseks. + Sinu praegune sessioon on valmis turvaliseks sõnumivahetuseks. + Alusta otsevestlust esimese sõnumiga + Võta kasutusele viivitusega otsevestlused + Lihtsustatud Element valikuliste kaartidega + Võta kasutusele rakenduse uus välimus + \ No newline at end of file diff --git a/library/ui-strings/src/main/res/values-fa/strings.xml b/library/ui-strings/src/main/res/values-fa/strings.xml index 400a8121f9..9012bc2ebe 100644 --- a/library/ui-strings/src/main/res/values-fa/strings.xml +++ b/library/ui-strings/src/main/res/values-fa/strings.xml @@ -2700,4 +2700,9 @@ ایجاد پیام خصوصی فقط در نخستین پیام المنتی ساده شده با زبانه‌های انتخابی به کار انداختن چینش جدید + تأیید نشست‌هایتان برای پیام‌رسانی امن بهبود یافته یا خروج از آن‌هایی که تشخیصشان نداده یا دیگر استفاده نمی‌کنید. + + غیرفعّال برای ۱ روز یا بیش‌تر + غیرفعّال برای %1$d روز یا بیش‌تر + \ No newline at end of file diff --git a/library/ui-strings/src/main/res/values-fr/strings.xml b/library/ui-strings/src/main/res/values-fr/strings.xml index 5a19ccf2da..c7100e3a1e 100644 --- a/library/ui-strings/src/main/res/values-fr/strings.xml +++ b/library/ui-strings/src/main/res/values-fr/strings.xml @@ -2668,4 +2668,46 @@ Réduire %s enfants Développer %s enfants Changer d’espace - + Adresse IP + Dernière activité + Nom de la session + Application, appareil et information sur l’activité. + Détails de session + Supprimer les filtres + Aucune session inactive n’a été trouvée. + Aucune session non vérifiée n’a été trouvée. + Aucune session vérifiée n’a été trouvée. + + Pensez à vous déconnecter des anciennes sessions (%1$d jour ou plus) que vous n’utilisez plus. + Pensez à vous déconnecter des anciennes sessions (%1$d jours ou plus) que vous n’utilisez plus. + + Inactif + Vérifiez vos sessions pour améliorer la sécurité de votre messagerie, ou déconnectez celles que vous ne connaissez pas ou n’utilisez plus. + Non vérifié + Pour une meilleure sécurité, déconnectez toutes les sessions que vous ne connaissez pas ou que vous n’utilisez plus. + Vérifié + Filtrer + + Inactif depuis %1$d jour ou plus + Inactif depuis %1$d jours ou plus + + Inactif + Pas prêt pour une messagerie sécurisée + Non vérifié + Prêt pour une messagerie sécurisée + Vérifié + Toutes les sessions + Filtrer + Dernière activité %1$s + Appareil + Session + Cette session + Vérifiez ou déconnectez cette session pour une meilleure sécurité et fiabilité. + Vérifiez votre session pour une sécurité accrue de votre messagerie. + Cette session est prête pour l’envoi de messages sécurisés. + Votre session est prête pour l’envoi de messages sécurisés. + Créer la conversation seulement lors du premier message + Activer les conversations privées différées + Un Element simplifié avec des onglets optionnels + Activer la nouvelle présentation + \ No newline at end of file diff --git a/library/ui-strings/src/main/res/values-hu/strings.xml b/library/ui-strings/src/main/res/values-hu/strings.xml index 3068556fe4..cac0a2eb5d 100644 --- a/library/ui-strings/src/main/res/values-hu/strings.xml +++ b/library/ui-strings/src/main/res/values-hu/strings.xml @@ -2668,4 +2668,46 @@ A Visszaállítási Kulcsot tartsd biztonságos helyen, mint pl. egy jelszókeze %1$d+ napja inaktív (%2$s) Itt láthatók a meghívók és elvégzendő műveletek. - + IP cím + Utolsó tevékenység + Munkamenet neve + Alkalmazás, eszköz és aktivitás információ. + Munkamenet információk + Szűrő törlése + Nincs inaktív munkamenet. + Nincs ellenőrizetlen munkamenet. + Nincs ellenőrzött munkamenet. + + Fontold meg, hogy kijelentkezel a régi munkamenetekből (%1$d napja vagy régebben használtál) amit már nem használsz. + Fontold meg, hogy kijelentkezel a régi munkamenetekből (%1$d napja vagy régebben használtál) amit már nem használsz. + + Inaktív + Erősítse meg a munkameneteit a még biztonságosabb csevegéshez vagy jelentkezzen ki ezekből, ha nem ismeri fel vagy már nem használja őket. + Ellenőrizetlen + A legjobb biztonság érdekében jelentkezz ki minden olyan munkamenetből amit nem ismersz fel vagy régen használtál már. + Hitelesített + Szűrés + + %1$d napja inaktív + %1$d napja inaktív + + Inaktív + Nem áll készen a biztonságos üzenetküldésre + Ellenőrizetlen + Felkészülve a biztonságos üzenetküldésre + Hitelesített + Minden munkamenet + Szűrés + Utolsó aktivitás %1$s + Eszköz + Munkamenet + Jelenlegi munkamenet + A jobb biztonság vagy megbízhatóság érdekében ellenőrizze vagy jelentkezzen ki ebből a munkamenetből. + Az aktuális munkamenet készen áll a biztonságos üzenetküldésre. + Ez a munkamenet beállítva a biztonságos üzenetküldéshez. + Az aktuális munkamenet készen áll a biztonságos üzenetküldésre. + Közvetlen beszélgetés indítása csak az első üzenettel + Késleltetett közvetlen üzenetek engedélyezése + Egyszerűsített Element opcionálisan lapokkal + Új kinézet engedélyezése + \ No newline at end of file diff --git a/library/ui-strings/src/main/res/values-in/strings.xml b/library/ui-strings/src/main/res/values-in/strings.xml index 3b30950bd1..7b103a9131 100644 --- a/library/ui-strings/src/main/res/values-in/strings.xml +++ b/library/ui-strings/src/main/res/values-in/strings.xml @@ -2617,5 +2617,45 @@ Di masa mendatang proses verifikasi ini akan dimutakhirkan. Belum ada space. Tutup %s anak Buka %s anak - Buat Space - + Ubah Space + Alamat IP + Aktivitas terakhir + Nama sesi + Informasi aplikasi, perangkat, dan aktivitas. + Detail sesi + Hapus Saringan + Tidak ditemukan sesi yang tidak aktif. + Tidak ditemukan sesi yang belum diverifikasi. + Tidak ditemukan sesi yang terverifikasi. + + Pertimbangkan untuk mengeluarkan sesi lawas (%1$d hari atau lebih) yang Anda tidak gunakan lagi. + + Tidak aktif + Verifikasi sesi Anda untuk perpesanan aman yang terbaik atau keluarkan sesi yang Anda tidak kenal atau gunakan lagi. + Belum diverifikasi + Untuk keamanan yang terbaik, keluarkan sesi yang Anda tidak kenal atau gunakan lagi. + Terverifikasi + Saring + + Tidak aktif selama %1$d hari atau lebih + + Tidak aktif + Belum siap untuk perpesanan aman + Belum diverifikasi + Siap untuk perpesanan aman + Terverifikasi + Semua sesi + Saring + Aktivitas terakhir %1$s + Perangkat + Sesi + Sesi Saat Ini + Verifikasi atau keluarkan sesi ini untuk keamanan dan keandalan yang terbaik. + Verifikasi sesi Anda saat ini untuk perpesanan aman yang baik. + Sesi ini siap untuk perpesanan aman. + Sesi Anda saat ini siap untuk perpesanan aman. + Buat pesan langsung hanya pada pesan pertama + Aktifkan pesan langsung tangguhan + Sebuah Element yang sederhana dengan fitur tab opsional + Aktifkan tata letak baru + \ No newline at end of file diff --git a/library/ui-strings/src/main/res/values-is/strings.xml b/library/ui-strings/src/main/res/values-is/strings.xml index d25d66bfba..69191e1741 100644 --- a/library/ui-strings/src/main/res/values-is/strings.xml +++ b/library/ui-strings/src/main/res/values-is/strings.xml @@ -1536,7 +1536,7 @@ Yfirfarðu þennan tengil Ef þú frumstillir allt Næstum því búið! Bíð eftir staðfestingu… - Bæta við umræðuefni + Bættu við umræðuefni Sannprófa þessa innskráningu Skrá út úr þessari setu Skilaboð við þennan notanda eru enda-í-enda dulrituð þannig að enginn annar getur lesið þau. @@ -1751,7 +1751,7 @@ Forritarahamur Hreinsa persónuleg gögn Taktu þátt ókeypis ásamt milljónum annarra á stærsta almenningsþjóninum - sleppt þessari spurningu + Sleppa þessari spurningu Örugg skilaboð. Gat ekki tengst við auðkennisþjón Dulritunarlyklarnir þínir eru ekki öryggisafritaðir úr þessari setu. @@ -1990,10 +1990,10 @@ Séð af Sleppa þessu skrefi Vista og halda áfram - Kjörstillingarnar þínar hafa verið vistaðar. + Farðu hvenær sem er í stillingarnar til að breyta notandasniðinu þínu. Nú ertu tilbúin(n)! Hefjumst handa - Þú getur breytt þessu hvenær sem er. + Þú getur breytt þessu hvenær sem er Bættu við auðkennismynd Þú getur breytt þessu síðar Birtingarnafn @@ -2012,4 +2012,206 @@ Prófaðu það Gera óvirkt Upphafleg samstillingarbeiðni - + Velkomin í nýja sýn! + Skoða staðsetningu í rauntíma + Sumar niðurstöður gætu verið faldar þar sem þær eru einkamál, þá þarftu boð til að geta séð þær. + Þú ert eini stjórnandi þessa svæðis. Ef þú yfirgefur það verður enginn annar sem er með stjórn yfir því. + Þú munt ekki geta tekið þátt aftur nema þér verði boðið aftur. + Yfirgefa ekkert + Yfirgefa allt + Efni á þessu svæði + Þetta samnefni er ekki aðgengilegt í augnablikinu. +\nPrófaðu aftur síðar, eða spurðu einhvern stjórnanda hvort þú hafir aðgang. + Fara af spjallrás með uppgefið auðkenni (eða fyrirliggjandi spjallrás ef þetta er núll) + Taka þátt í svæði með uppgefið auðkenni + Gat ekki virkjað auðkenningu með lífkennum. + Annars geturðu sett inn slóð á hvaða auðkennisþjón sem er + Heimaþjónninn þinn (%1$s) stingur upp á að nota %2$s sem auðkenningarþjón fyrir þig + Samþykki notandans hefur ekki verið gefið. + Stilltu fyrst auðkennisþjón. + Þessi aðgerð er ekki möguleg. Heimaþjónninn er úreltur. + Deildu þessum kóða með fólki svo viðkomandi geti skannað hann, bætt þér við og byrjað að spjalla. + Heimaþjónn notandans samþykkir ekki notendanöfn einungis með tölustöfum. + Hindra skjámyndatöku af forritinu + Uppsetning tilkynninga + Mistókst að flytja inn lykla + Næstum því búið! Sýnir hitt tækið gátmerki\? + %s svo fólk viti að um hvað málin snúist. + Sendu fyrstu skilaboðin þín til að bjóða %s að spjalla + Þetta er upphafið á þessu samtali. + Þetta er upphafið á %s. + %s bjó til og stillti spjallrásina. + Dulritunin sem notuð er í þessari spjallrás er ekki studd + Dulritun er rangt stillt + Skilaboð í þessu spjalli verða enda-í-enda dulrituð. + Skilaboð í þessari spjallrás eru enda-í-enda dulrituð. Lærðu meira um þetta og yfirfarðu notendur í notandasniðum þeirra. + Ef þú hættir við núna, geturðu tapað dulrituðum skilaboðum og gögnum ef þú missir aðgang að innskráningum þínum. +\n +\nÞú getur víka sett upp örugga afritun og sýslað með dulritunarlyklana þína í stillingunum. + Gef út útbúna auðkennislykla + Set upp endurheimtu. + Ekki nota lykilorðið fyrir aðganginn þinn. + Lykill skilaboða + Þetta var ekki ég + Beiðnir um lykla + ${app_name} fyrir Android + Næstum því búið! Sýnir %s gátmerki\? + Mistókst að ná í setur + + %d virk seta + %d virkar setur + + Engar dulkóðunarupplýsingar tiltækar + Þú hefur ekki heimild til að virkja dulritun á þessari spjallrás. + Kóði var sendur til: %s + Staðfestu símanúmerið þitt + Staðfestingarkóði + Viltu hýsa þinn eigin netþjón\? + Hvert er vistfang netþjónsins þíns\? + Hvert er vistfang netþjónsins þíns\? Þetta er staður sem geymir öll gögnin þín + Veldu netþjón fyrir þig + Þar sem samtölin þín eru + Þar sem samtölin þín verða + Verður að vera að minnsta kosti 8 stafir + Aðrir geta fundið þig %s + %s aðgangur þinn hefur verið útbúinn + Fara á forsíðuna + Persónugera notandasnið + Ætlarðu að ganga til liðs við fyrirliggjandi netþjón\? + Ekki ennþá viss\? %s + Við hverja muntu helst spjalla\? + ${app_name} er líka frábært fyrir vinnustaðinn. Heimsins öruggustu samtök treysta því. + Enda-í-enda dulritað og ekkert símanúmer nauðsynlegt. Engar auglýsingar eða gagnasöfnun. + Veldu hvar á að geyma samtölin þín, sem gefur þér stjórnina og algert sjálfstæði. Tengt í gegnum Matrix. + Örugg og óháð samskipti sem gefa þér færi á að ræða málin í friði rétt eins og þetta sé maður á mann í heimahúsi. + Skilaboð fyrir teymið þitt. + Skrifaðu stikkorð til að finna viðbrögð. + Opna svæðalista + Ekki er hægt að forskoða þessa spjallrás. Viltu taka þátt í henni\? + Þessi spjallrás er ekki aðgengileg í augnablikinu. +\nPrófaðu aftur síðar, eða spurðu einhvern stjórnanda hvort þú hafir aðgang. + Rangt sniðinn atburður, get ekki birt hann + Atburði eytt af notanda + Nýjir lyklar fyrir örugg skilaboð + Hjálpaðu okkur við að greina vandamál og bæta ${app_name} með því að deila nafnlausum gögnum varðandi notkun. Til að skilja hvernig fólk notar saman mörg tæki, munum við útbúa tilviljanakennt auðkenni, sem tækin þín deila. +\n +\nÞú getur lesið alla skilmála okkar %s. + Spila hreyfimyndir sjálfvirkt + Mistókst að skrá endapunkt á heimaþjóninn: +\n%1$s + Það tókst að skrá endapunkt á heimaþjóninn. + Skráning endapunkts + + %1$s og %2$d í viðbót + %1$s og %2$d í viðbót + + Skoða og uppfæra hlutverk sem krafist er til að breyta ýmsum þáttum svæðisins. + Skoða og uppfæra hlutverk sem krafist er til að breyta ýmsum þáttum spjallrásarinnar. + Tölvupóstfang ekki staðfest, athugaðu pósthólfið þitt + Ekkert nýtt. + Engin svæði ennþá. + Einfaldað Element með valkvæðum flipum + Virkja nýja framsetningu + Kjörstillingar framsetningar + Skipta um svæði + Allar spjallrásir + Prófaðu það + Gefðu umsögn + IP-vistfang + Síðasta virkni + Nafn á setu + Nánar um setuna + Hreinsa síu + Engar óvirkar setur fundust. + Engar óstaðfestar setur fundust. + Engar staðfestar setur fundust. + Óvirkt + Óstaðfest + Staðfest + Sía + Óvirkt + Óstaðfest + Staðfest + Allar setur + Sía + Síðasta virkni %1$s + Tæki + Seta + Núverandi seta + Óstaðfestar setur + Skoða allt (%1$d) + Skoða nánar + Sannprófa setu + Óstaðfest seta + Staðfest seta + Óþekkt tegund tækis + Skjáborð + Vefur + Farsími + Virkja deilingu staðsetninga + Netgátt + Aðferð + Samstilling í bakgrunni + Google þjónustur + Deila staðsetningu + %1$s hætti + Niðurstöður birtast einungis eftir að könnuninni hefur lokið + Engar niðurstöður fundust + Opna stillingar + Afritaðu hann á einkageymslu sem þú átt í tölvuskýi + Vistaðu hann á USB-lykil eða öryggisdisk + Prentaðu hann og geymdu á öruggum stað + Settu inn öryggisfrasa sem aðeins þú þekkir, þetta er notað til að verja leyndarmálin sem þú geymir á netþjóninum þínum. + Settu inn %s til að halda áfram. + Tókst ekki að sannreyna þetta tæki + Aðrar setur + Setur + Notandanafn / tölvupóstfang / símanúmer + Ertu mannvera\? + Endurstilling lykilorðs + Gleymt lykilorð + Senda tölvupóst aftur + Skoðaðu tölvupóstinn þinn + Endursenda kóða + Skrá út öll tæki + Endurstilla lykilorð + Veldu nýtt lykilorð + Nýtt lykilorð + Athugaðu tölvupóstinn þinn. + Símanúmer + Settu inn símanúmerið þitt + Tölvupóstur + Settu inn tölvupóstfangið þitt + Hafðu samband + Slóð netþjóns + Velkomin(n) aftur! + Breyta + Eða + Búa til aðganginn þinn + Við munum hjálpa þér að tengjast + Fara + Þessa spjallrás er ekki hægt að forskoða + Uppfæri gögnin þín… + Fólk + Eftirlæti + Ólesið + Allt + Nota sjálfgefnar kerfisstillingar + Velja handvirkt + Setja sjálfvirkt + Veldu leturstærð + %1$s og %2$s + Boðsgestir + A-Ö + Virkni + Raða eftir + Birta nýlegt + Sýna síur + Næsta + sek + mín + klst + Kanna spjallrásir + Búa til spjallrás + Hefja spjall + \ No newline at end of file diff --git a/library/ui-strings/src/main/res/values-it/strings.xml b/library/ui-strings/src/main/res/values-it/strings.xml index b7b0fe91af..b2f9fa9238 100644 --- a/library/ui-strings/src/main/res/values-it/strings.xml +++ b/library/ui-strings/src/main/res/values-it/strings.xml @@ -2659,4 +2659,46 @@ Riduci contenuto di %s Espandi contenuto di %s Cambia spazio - + Indirizzo IP + Ultima attività + Nome sessione + Applicazione, dispositivo e informazioni di attività. + Dettagli sessione + Annulla filtro + Nessuna sessione inattiva trovata. + Nessuna sessione non verificata trovata. + Nessuna sessione verificata trovata. + + Considera di disconnettere le sessioni vecchie (%1$d giorno o più) che non usi più. + Considera di disconnettere le sessioni vecchie (%1$d giorni o più) che non usi più. + + Inattivo + Verifica le tue sessioni per avere conversazioni più sicure o disconnetti quelle che non riconosci o che non usi più. + Non verificato + Per una maggiore sicurezza, disconnetti tutte le sessioni che non riconosci o che non usi più. + Verificato + Filtra + + Inattivo da %1$d giorno o più + Inattivo da %1$d giorni o più + + Inattivo + Non pronto per messaggi sicuri + Non verificato + Pronto per messaggi sicuri + Verificato + Tutte le sessioni + Filtra + Ultima attività %1$s + Dispositivo + Sessione + Sessione attuale + Verifica o disconnetti questa sessione per una migliore sicurezza e affidabilità. + Verifica la tua sessione attuale per messaggi più sicuri. + Questa sessione è pronta per i messaggi sicuri. + La tua sessione attuale è pronta per i messaggi sicuri. + Attiva messaggi diretti differiti + Crea messaggio diretto solo al primo messaggio + Un Element semplificato con schede opzionali + Attiva nuova disposizione + \ No newline at end of file diff --git a/library/ui-strings/src/main/res/values-lt/strings.xml b/library/ui-strings/src/main/res/values-lt/strings.xml index adfc70c36e..aeba3d53e6 100644 --- a/library/ui-strings/src/main/res/values-lt/strings.xml +++ b/library/ui-strings/src/main/res/values-lt/strings.xml @@ -1406,4 +1406,781 @@ Keisti kambario pavadinimą Keisti istorijos matomumą %s atnaujino čia. - + Atlikite captcha iššūkį + Pasirinkti pasirinktinį namų serverį + Pasirinkti Element Matrix Services + Pasirinkti matrix.org + Jūsų paskyra dar nesukurta. Sustabdyti registracijos procesą\? + Perspėjimas + Šis vartotojo vardas yra užimtas + Toliau + Slaptažodis + Naudotojo vardas + Naudotojo vardas arba el. pašto adresas + Toliau + Siųsti vėl + Įvesti kodą + Ką tik išsiuntėme kodą į %1$s. Įveskite jį toliau, kad patvirtintumėte, kad tai jūs. + Nustatyti telefono numerį + Neatrodo kaip tinkamas el. pašto adresas + Toliau + Patvirtinkite telefono numerį + El. pašto adresas (nebūtinas) + El. pašto adresas + Toliau + Telefono numeris (nebūtinas) + Jūsų slaptažodis buvo nustatytas iš naujo. + Sėkmė! + Patvirtinau savo el. pašto adresą + Bakstelėkite nuorodą ir patvirtinkite naująjį slaptažodį. Paspaudę joje esančią nuorodą, spustelėkite žemiau. + Patvirtinimo el. laiškas buvo išsiųstas į %1$s. + Patikrinkite savo pašto dėžutę + Šis el. paštas nėra susietas su jokia paskyra + Tęsti + Pakeitus slaptažodį bus iš naujo nustatyti visų jūsų sesijų visapusiško šifravimo raktai, todėl užšifruotų pokalbių istorijos nebus galima perskaityti. Prieš iš naujo nustatydami slaptažodį, sukurkite raktų atsarginę kopiją arba eksportuokite kambario raktus iš kitos sesijos. + Perspėjimas! + Naujas slaptažodis + El. paštas + Toliau + Į jūsų pašto dėžutę bus išsiųstas patvirtinimo el. laiškas, naujo slaptažodžio nustatymo patvirtinimui. + Iš naujo nustatyti slaptažodį %1$s + Šis el. paštas nesusijęs su jokia paskyra. + Programa negali sukurti paskyros šiame namų serveryje. +\n +\nAr norite užsiregistruoti naudodami žiniatinklio klientą\? + Atsiprašome, šis serveris nepriima naujų paskyrų. + Programa negali prisijungti prie šio namų serverio. Namų serveris palaiko šiuos prisijungimo tipus: %1$s. +\n +\nAr norite prisijungti naudodami žiniatinklio klientą\? + Įkeliant puslapį įvyko klaida: %1$s (%2$d) + Įveskite norimo naudoti serverio adresą + Įveskite adresą Modular Element arba serverio kurį norite naudoti + Aukščiausios kokybės talpinimas organizacijoms + Adresas + Element Matrix Services Adresas + Išvalyti istoriją + Tęsti su vienkartiniu prisijungimu + Prisijungti + Registruotis + Prisijungti prie %1$s + Prisijungti prie pasirinktinio serverio + Prisijungti prie Element Matrix Services + Prisijungti prie %1$s + Tęsti + vienkartinis prisijungimas + Prisijungti su %s + Užsiregistruoti su %s + Tęsti su %s + Arba + Pasirinktiniai & išplėstiniai nustatymai + Kitas + Sužinoti daugiau + Aukščiausios kokybės talpinimas organizacijoms + Nemokamai prisijunkite prie milijonų žmonių didžiausiame viešajame serveryje + Kaip ir el. paštas, paskyros turi vienus namus, nors galite bendrauti su bet kuo + Pasirinkti serverį + Aš jau turiu paskyrą + Sukurti paskyrą + Pradėkite + Išplėskite ir pritaikykite savo patirtį + Saugokite pokalbių privatumą naudodami šifravimą + Bendraukite su žmonėmis tiesiogiai arba grupėse + Tai jūsų pokalbis. Priklauso jums. + Praleisti šį žingsnį + Išsaugoti ir tęsti + Bet kada eikite į nustatymus norint atnaujinti savo profilį + Atrodo gerai! + Pirmyn + Laikas prie vardo pridėti veidą + Pridėti profilio nuotrauką + Jūs tai galite pakeisti vėliau + Rodomas vardas + Pasirinkite rodomą vardą + Vartotojo vardas / el. paštas / telefonas + Ar esate žmogus\? + Vykdykite nurodymus, išsiųstus adresu %s + Pamiršau slaptažodį + Slaptažodžio nustatymas iš naujo + Iš naujo siųsti el. laišką + Negavote el. laiško\? + Vykdykite nurodymus, išsiųstus adresu %s + Patvirtinkite savo el. pašto adresą + Iš naujo siųsti kodą + Kodas buvo išsiųstas į %s + Patvirtinkite savo telefono numerį + Atjungti visus prietaisus + Iš naujo nustatyti slaptažodį + Draugai ir šeima + Padėsime jums užmegzti ryšį + Su kuo daugiausiai bendrausite\? + ${app_name} taip pat puikiai tinka darbo vietoje. Ja pasitiki saugiausios pasaulio organizacijos. + Visapusiškai užšifruota ir nereikia telefono numerio. Jokių reklamų ar duomenų rinkimo. + Pasirinkite, kur bus saugomi jūsų pokalbiai, taip suteikdami jums galimybę kontroliuoti ir būti nepriklausomiems. Sujungta naudojant Matrix. + Saugus ir nepriklausomas bendravimas, suteikiantis tiek pat privatumo, kiek ir pokalbis akis į akį jūsų namuose. + Bandykite dar kartą, kai sutiksite su savo namų serverio nuostatomis ir sąlygomis. + Išsamūs žurnalai padės kūrėjams, nes siųsdami piktą purtymą pateiksite daugiau žurnalų. Net ir įjungus šią funkciją, programa nerenka žinučių turinio ar kitų privačių duomenų. + Įjungti išsamius žurnalus. + Sutikite su tapatybės serverio (%s) paslaugų teikimo sąlygomis, kad galėtumėte būti atrandami pagal el. pašto adresą arba telefono numerį. + Šiuo metu bendrinate el. pašto adresus arba telefono numerius tapatybės serveryje %1$s. Norėdami nustoti juos bendrinti, turėsite iš naujo prisijungti prie %2$s. + Tekstinė žinutė buvo išsiųsta adresu %s. Įveskite joje esantį patvirtinimo kodą. + Pasirinktame tapatybės serveryje nėra jokių paslaugų teikimo sąlygų. Tęskite tik tuo atveju, jei pasitikite paslaugos savininku + Tapatybės serveris neturi paslaugų teikimo sąlygų + Įveskite tapatybės serverio url + Nepavyko prisijungti prie tapatybės serverio + Įveskite tapatybės serverio URL + Ar sutinkate siųsti šią informaciją\? + Jei norite atrasti esamus kontaktus, į tapatybės serverį reikia nusiųsti kontaktinę informaciją (el. paštus ir telefono numerius). Prieš išsiunčiant duomenis, siekiant užtikrinti privatumą, juos sutriname. + Pateikti atsiliepimą + Pateikti atsiliepimą + Atsiliepimo nepavyko išsiųsti (%s) + Ačiū, jūsų atsiliepimas sėkmingai išsiųstas + Jei turite papildomų klausimų, galite susisiekti su manimi + Atsiliepimas + BETA + Pasiūlymo nepavyko išsiųsti (%s) + Ačiū, pasiūlymas sėkmingai išsiųstas + Aprašykite savo pasiūlymą čia + Žemiau parašykite savo pasiūlymą. + Pateikti pasiūlymą + Versijos + Gaukite pagalbos naudojant ${app_name} + Pagalba ir parama + Pagalba + Teisės aktai + Pagalba & Apie + Balsas & Vaizdas + Profilio žyma: + Formatas: + Url: + session_name: + app_display_name: + push_key: + app_id: + Jūs jau žiūrite šią temą! + Jūs jau žiūrite šį kambarį! + Importuoti šifravimo raktus iš failo \"%1$s\". + Įvyko klaida gaunant raktų atsarginės kopijos duomenis + Įvyko klaida gaunant pasitikėjimo informaciją + Kambarys sukurtas, tačiau kai kurie kvietimai nebuvo išsiųsti dėl šios priežasties: +\n +\n%s + Kiekvienas galės prisijungti prie šio kambario + Viešas + Tema + Kambario tema (nebūtina) + Pavadinimas + Kambario pavadinimas + Eiti + SUKURTI + Tiesioginės žinutės + Kambariai + Šio kambario negalima peržiūrėti. Ar norite prie jo prisijungti\? + Šiuo metu į šį kambarį patekti negalima. +\nPabandykite vėliau arba paprašykite kambario admino patikrinti, ar turite prieigą. + Šio kambario negalima peržiūrėti + Atnaujinami jūsų duomenys… + Prašome palaukti… + Keisti tinklą + Tinklo nėra. Patikrinkite interneto ryšį. + Sukurti naują kambarį + Neteisingai suformuotas įvykis, negalima rodyti + Įvykis moderuotas kambario admino + Naudotojo ištrintas įvykis + Žinutė pašalinta + Reakcijos + Peržiūrėti reakcijas + Pridėti reakciją + Reakcijos + Žmonės + Parankiniai + Neperskaityti + Visi + Čia bus rodomi jūsų kambariai. Bakstelėkite \"+\" apačioje dešinėje, kad rastumėte esamus kambarius arba pradėtumėte kurti savo. + Kambariai + Jūsų tiesioginių žinučių pokalbiai bus rodomi čia. Bakstelėkite \"+\" apačioje dešinėje, kad pradėtumėte keletą. + Pokalbiai + Neturite daugiau neperskaitytų žinučių + Jūs viską pasivijote! + Pakvietė %s + Išsiuntė jums kvietimą + Pakartoti + Peržiūrėti kambaryje + Atsakyti temoje + Atsakyti + Redaguoti + Atrodo, kad bandote prisijungti prie kito namų serverio. Ar norite atsijungti\? + Jūs nenaudojate jokio tapatybės serverio + Nežinoma klaida + %s nori patvirtinti jūsų sesiją + Patvirtinimo užklausa + Supratau + Patvirtinta! + Parašas + Algoritmas + Versija + + Kuriama atsarginė %d rakto kopija… + Kuriama atsarginė %d raktų kopija… + Kuriama atsarginė %d raktų kopija… + + Visų raktų atsarginė kopija sukurta + Nustatyti saugią atsarginę kopiją + Kuriama raktų atsarginė kopija. Tai gali užtrukti kelias minutes… + Valdyti raktų atsarginėje kopijoje + Nauji saugių žinučių raktai + Naudoti raktų atsarginę kopiją + Niekada nepraraskite užšifruotų žinučių + Apsisaugokite nuo užšifruotų žinučių ir duomenų praradimo + Saugi atsarginė kopija + Išjungta + Kad ištaisyti Matrix programėlių valdymą + Įj./Išj. markdown + Prašymas dalytis raktais + Atsiprašome, šis kambarys nerastas. +\nPrašome bandyti vėliau.%s + Jei norite tęsti, turite sutikti su šios paslaugos sąlygomis. + Nėra aktyvių valdiklių + Užklausoje trūksta user_id. + Užklausoje trūksta room_id. + Galios lygis turi būti teigiamas sveikasis skaičius. + Nepavyko išsiųsti užklausos. + Nepavyko sukurti valdiklio. + Skaityti DRM apsaugotą mediją + Šis valdiklis nori naudoti šiuos išteklius: + Palikti dabartinę konferenciją ir pereiti į kitą\? + Atsiprašome, bandant prisijungti prie konferencijos įvyko klaida + Atsiprašome, konferenciniai skambučiai su Jitsi nepalaikomi senuose įrenginiuose (įrenginiuose su žemesne nei 6.0 Android OS) + Valdiklio ID + Jūsų tema + Jūsų naudotojo ID + Jūsų avataro URL + Jūsų rodomas vardas + Atšaukti prieigą man + Atidaryti naršyklėje + Iš naujo įkelti valdiklį + Nepavyko įkelti valdiklio. +\n%s + Naudojant jį duomenys gali būti bendrinami su %s: + Naudojant jį gali būti nustatyti slapukai ir bendrinami duomenys su %s: + Šį valdiklį pridėjo: + Įkelti valdiklį + Valdiklis + Aktyvūs valdikliai + PERŽIŪRĖTI + + %d aktyvus valdiklis + %d aktyvūs valdikliai + %d aktyvių valdiklių + + Ar tikrai norite ištrinti valdiklį iš šio kambario\? + Milžiniškas + Didžiausias + Didesnis + Didelis + Vidutinis + Mažas + Mažytis + Šrifto dydis + Naudoti sistemos numatytąjį + Pasirinkti rankiniu būdu + Nustatyti automatiškai + Pasirinkti šrifto dydį + %1$s: %2$s %3$s + %1$s: %2$s + ** Nepavyko išsiųsti - atidarykite kambarį + + Naujas pakvietimas + Naujos žinutės + Kambarys + Naujas įvykis + %1$s ir %2$s + %1$s esantys %2$s ir %3$s + %1$s esantys %2$s + + %d pranešimas + %d pranešimai + %d pranešimų + + + %1$s: %2$d žinutė + %1$s: %2$d žinutės + %1$s: %2$d žinučių + + + %d pakvietimas + %d pakvietimai + %d pakvietimų + + + %d kambarys + %d kambariai + %d kambarių + + + %d neperskaityta pranešta žinutė + %d neperskaitytos praneštos žinutės + %d neperskaitytų praneštų žinučių + + Šis serveris jau yra sąraše + Negalima rasti šio serverio arba jo kambarių sąrašo + Įveskite naujo serverio, kurį norite patyrinėti, pavadinimą. + Pridėti naują serverį + Jūsų serveris + Visi vietiniai %s kambariai + Visi kambariai %s serveryje + Serverio pavadinimas + Pasirinkti kambarių katalogą + Jei jie nesutampa, gali kilti pavojus jūsų komunikacijos saugumui. + Patvirtinti + nežinomas ip + Patvirtinta + Nepatvirtinta + + %1$d/%2$d raktas importuotas sėkmingai. + %1$d/%2$d raktai importuoti sėkmingai. + %1$d/%2$d raktų importuota sėkmingai. + + Niekada nesiųsti užšifruotų žinučių į nepatvirtintas sesijas iš šios sesijos. + Šifruoti tik į patvirtintas sesijas + Importuoti + Importuoti raktus iš vietinio failo + Importuoti kambarių raktus + Importuoti šifruotų kambarių raktus + Užšifruotų žinučių atkūrimas + Raktai sėkmingai eksportuoti + Sukurkite slaptafrazę eksportuojamiems raktams užšifruoti. Norėdami importuoti raktus, turėsite įvesti tą pačią slaptafrazę. + Eksportuoti + Eksportuoti raktus į vietinį failą + Eksportuoti kambarių raktus + Eksportuoti šifruotų kambarių raktus + Sesijos raktas + Viešas pavadinimas + Iššifravimo klaida + Nuspręskite, kas gali rasti ir prisijungti prie šio kambario. + Nepavyko gauti dabartinio kambarių katalogo matomumo (%1$s). + Paskelbti šį kambarį viešai %1$s kambarių kataloge\? + Panaikinti šio adreso skelbimą + Paskelbti šį adresą + Pridėti vietinį adresą + Šis kambarys neturi vietinių adresų + Nustatykite šio kambario adresus, kad naudotojai galėtų rasti šį kambarį per jūsų namų serverį (%1$s) + Vietiniai adresai + Naujas skelbiamas adresas (pvz., #pseudonimas:serveris) + Kitų paskelbtų adresų dar nėra. + Kitų paskelbtų adresų dar nėra, pridėkite juos žemiau. + Ištrinti adresą \"%1$s\"\? + Panaikinti adreso \"%1$s\" skelbimą\? + Paskelbti + Paskelbti naują adresą rankiniu būdu + Kiti paskelbti adresai: + Tai yra pagrindinis adresas + Paskelbtus adresus gali naudoti bet kas bet kuriame serveryje, prisijungimui prie jūsų kambario. Norint paskelbti adresą, pirmiausia nustatykite jį kaip vietinį adresą. + Paskelbti adresai + Žetono registracija + Pridėti paskyrą + [%1$s] +\nŠi klaida yra nekontroliuojama ${app_name}. Telefone nėra Google paskyros. Atidarykite paskyrų tvarkytuvę ir pridėkite Google paskyrą. + Šifravimas neteisingai sukonfigūruotas + Šifravimas nėra įjungtas + Šiame pokalbyje žinutės bus visapusiškai užšifruojamos. + Šiame pokalbyje žinutės yra visapusiškai užšifruotos. + Šiame kambaryje žinutės yra visapusiškai užšifruotos. Sužinokite daugiau ir patvirtinkite naudotojus jų profilyje. + Šifravimas įjungtas + Šiame kambaryje naudojamas šifravimas nepalaikomas + Jau beveik! Laukiama patvirtinimo… + Jau beveik! Ar kitas prietaisas rodo varnelę\? + "Tema: " + Pridėkite temą + Siųskite pirmąją žinutę kad pakviestumėte %s į pokalbį + Tai yra jūsų tiesioginių žinučių su %s istorijos pradžia. + Tai šio pokalbio pradžia. + Tai yra %s pradžia. + Jūs prisijungėte. + %s prisijungė. + Sukūrėte ir sukonfigūravote kambarį. + %s sukūrė ir sukonfigūravo kambarį. + Nepavyko importuoti raktų + Laukiama %s… + Ši paskyra buvo deaktyvuota. + Žinutė… + Tikrinamas atsarginės kopijos raktas + Įveskite atkūrimo raktą + Tai netinkamas atkūrimo raktas + Naudoti failą + Norėdami tęsti, įveskite savo %s + Patvirtinkite save ir kitus, kad pokalbiai būtų saugūs + Galimas šifravimo patobulinimas + Tikrinamas atsarginės kopijos raktas (%s) + FCM žetonas sėkmingai užregistruotas namų serveryje. + Naudoti botus, tiltus, valdiklius ir lipdukų paketus + Keisti tapatybės serverį + Siųsti el. paštus ir telefono numerius + Konfigūruoti tapatybės serverį + Atjungti tapatybės serverį + Tapatybės serveris + Patvirtinimo kodas neteisingas. + Kodas + Atrodo, kad serveris neatsako per ilgai, tai gali būti dėl prasto ryšio arba serverio klaidos. Pabandykite dar kartą po kurio laiko. + %s perskaitė + %1$s ir %2$s perskaitė + %1$s, %2$s ir %3$s perskaitė + + %1$s, %2$s ir %3$d kitas perskaitė + %1$s, %2$s ir %3$d kiti perskaitė + %1$s, %2$s ir %3$d kitų perskaitė + + Peršokti į apačią + Uždaryti raktų atsarginės kopijos antraštę + Sukurti naują kambarį + Sukurti naują pokalbį arba kambarį + Sukurti naują tiesioginį pokalbį + Uždaryti kambario kūrimo meniu… + Atidaryti kambario kūrimo meniu + Atidaryti navigacijos stalčių + Siųsti priedą + + %d naudotojas perskaitė + %d naudotojai perskaitė + %d naudotojų perskaitė + + Failas yra per didelis, kad jį būtų galima įkelti. + Pridėti paveikslėlį iš + Šis turinys buvo praneštas kaip nepadorus. +\n +\nJei nenorite matyti daugiau šio naudotojo turinio, galite jį ignoruoti kad paslėpti jo žinutes. + Pranešta kaip nepadorus turinys + Apie šį turinį buvo pranešta kaip apie šlamštą. +\n +\nJei nenorite matyti daugiau šio naudotojo turinio, galite jį ignoruoti kad paslėpti jo žinutes. + Pranešta kaip šlamštas + Buvo pranešta apie šį turinį. +\n +\nJei nenorite matyti daugiau šio naudotojo turinio, galite jį ignoruoti kad paslėpti jo žinutes. + Turinys praneštas + IGNORUOTI NAUDOTOJĄ + PRANEŠTI + Pranešimo apie šį turinį priežastis + Pranešti apie šį turinį + Pasirinktinis pranešimas… + Tai nepadoru + Tai šlamštas + Šiame kambaryje nėra failų + %1$s %2$s + FAILAI + Šiame kambaryje nėra medijos + MEDIJA + %1$d iš %2$d + Nepavyko tvarkyti bendrinimo duomenų + Pasukti ir apkarpyti + Vietovė + Apklausa + Lipdukas + Galerija + Kamera + Kontaktas + Failas + Įveskite raktažodžius, reakcijos radimui. + Spoileris + Siunčia duotą žinutę kaip spoilerį + Nepadarėte jokių pakeitimų + %1$s nepadarė jokių pakeitimų + %1$s padarė šį kambarį tik pakviestiems. + Paviešinote kambarį visiems, kurie žino nuorodą. + %1$s paviešino kambarį visiems, kurie žino nuorodą. + Ilgai spauskite ant kambario, kad pamatytumėte daugiau parinkčių + Jūs neignoruojate jokių naudotojų + Pašalinti iš žemo prioriteto + Pridėti prie žemo prioriteto + Pašalinti iš parankinių + Pridėti prie parankinių + Ignoruoti naudotoją + Visos žinutės (triukšmingas) + Nutildyti + Tik paminėjimai + Visos žinutės + Nustatymai + Kambario nustatymai + Išeiti iš kambario + Padarėte šitai tik pakviestiems. + %1$s padarė šitai tik pakviestiems. + Padarėte šį kambarį tik pakviestiems. + Žinučių siuntimas jūsų komandai. + Saugus žinučių siuntimas. + Jūs viską kontroliuojate. + Turėkite savo pokalbius. + Neperskaitytos žinutės + Dar nesate tikri\? %s + Bendruomenės + Komandos + Redaguoti + Arba + Kur laikomi jūsų pokalbiai + Kur bus laikomi jūsų pokalbiai + Turi būti ne mažiau kaip 8 simboliai + Kiti gali jus atrasti %s + Sukurti savo paskyrą + Jūsų paskyra %s buvo sukurta + Sveikiname! + Pasiimkite mane namo + Suasmeninti profilį + Prisijungti prie serverio + Norite prisijungti prie esamo serverio\? + Praleisti šį klausimą + Sveiki sugrįžę! + Perskaitykite %s sąlygas ir taisykles + Serverio politikos + Patikrinkite savo el. paštą. + Susisiekite su mumis + Element Matrix Services (EMS) yra tvirta ir patikima talpinimo paslauga, skirta greitam ir saugiam bendravimui realiuoju laiku. Sužinokite, kaip <a href=\"${ftue_ems_url}\">element.io/ems</a> + Norite turėti savo serverį\? + %s atsiųs jums patvirtinimo nuorodą + Serverio URL + Patvirtinimo kodas + Koks yra jūsų serverio adresas\? + Koks yra jūsų serverio adresas\? Tai tarsi visų jūsų duomenų namai + Pasirinkti savo serverį + Telefono numeris + %s turi patvirtinti jūsų paskyrą + Įveskite savo telefono numerį + El. paštas + %s turi patvirtinti jūsų paskyrą + Įveskite savo el. paštą + Įsitikinkite, kad jis yra 8 ar daugiau simbolių. + Pasirinkite naują slaptažodį + Naujas slaptažodis + Pranešimų tikslai + olm versija + Naudokite integracijų tvarkyklę botams, tiltams, valdikliams ir lipdukų paketams tvarkyti. +\nIntegracijų valdytojai gauna konfigūracijos duomenis ir gali keisti valdiklius, siųsti kvietimus į kambarius ir nustatyti galios lygius jūsų vardu. + Telefonų knygos šalis + Vietiniai kontaktai + Prisegti kambarius su praleistais pranešimais + Pradžios ekranas + Nuorodų peržiūra pokalbyje, kai jūsų namų serveris palaiko šią funkciją. + Įterptinė URL peržiūra + Prisegti kambarius su neperskaitytomis žinutėmis + Integracijos + Kriptografijos raktų valdymas + Kriptografija + Padėkite mums nustatyti problemas ir tobulinti ${app_name} dalydamiesi anoniminiais naudojimo duomenimis. Kad suprastume, kaip žmonės naudojasi keliais įrenginiais, sugeneruosime atsitiktinį identifikatorių, kuriuo dalijasi jūsų įrenginiai. +\n +\nGalite perskaityti visas mūsų sąlygas %s. + Jei įjungta, kitiems naudotojams visada atrodysite neprisijungę, net jei naudosite programą. + Neprisijungęs režimas + Esamumas + Amžinai + 1 mėnuo + 1 savaitė + 3 dienos + Groti užrakto garsą + Pasirinkti + Numatytasis medijos šaltinis + Pasirinkti + Numatytasis glaudinimas + Medija + Pasirinkti šalį + Sutikote siųsti el. paštus ir telefono numerius į šį tapatybės serverį, kad būtų galima atrasti kitus naudotojus iš jūsų kontaktų. + Siųsti el. paštus ir telefono numerius į %s + Duoti sutikimą + Atšaukti mano sutikimą + Jūsų kontaktai yra privatūs. Kad galėtume rasti naudotojus iš jūsų kontaktų, mums reikia jūsų leidimo siųsti kontaktinę informaciją į jūsų tapatybės serverį. + Išsiuntėme jums patvirtinimo el. laišką į %s, pirmiausia patikrinkite savo el. paštą ir spustelėkite patvirtinimo nuorodą + Išsiuntėme jums patvirtinimo el. laišką į %s, patikrinkite savo el. paštą ir spustelėkite patvirtinimo nuorodą + Atrandami telefono numeriai + Atsijungimas nuo tapatybės serverio reiškia, kad jūsų negalės rasti kiti naudotojai ir negalėsite pakviesti kitų el. paštu ar telefonu. + Pridėjus telefono numerį bus rodomos atradimo parinktys. + Pridėjus el. pašto adresą, bus rodomos atradimo parinktys. + Atrandami el. pašto adresai + Šiuo metu nenaudojate tapatybės serverio. Norėdami atrasti esamus žinomus kontaktus ir būti jų atrandami, sukonfigūruokite jį žemiau. + Šiuo metu naudojate %1$s, esamų kontaktų atradimui, kuriuos pažįstate, ir kad būtumėte jų atrandami. + Tapatybės serveris nepateikė jokios politikos + BETA + Temos yra nebaigtas darbas, kuriame bus naujų, įdomių būsimų funkcijų, pvz., patobulinti pranešimai. Norėtume išgirsti jūsų atsiliepimus! + Temų Beta atsiliepimai + Tvarkyti el. paštus ir telefono numerius susietus su jūsų Matrix paskyra + El. paštai ir telefono numeriai + Rodyti visas žinutes nuo %s\? + Jūsų slaptažodis buvo atnaujintas + Slaptažodis nėra tinkamas + Nepavyko atnaujinti slaptažodžio + Naujas slaptažodis + Dabartinis slaptažodis + Keisti slaptažodį + Slaptažodis + Šis telefono numeris jau naudojamas. + Šis el. pašto adresas jau naudojamas. + Patikrinkite savo el. paštą ir spustelėkite jame esančią nuorodą. Kai tai padarysite, spauskite tęsti. + Padėkite tobulinti ${app_name} + ${app_name} renka anoniminę analizę, kad galėtume tobulinti programą. + Pasirinkti kalbą + Kalba + Siųsti analitikos duomenis + Analitika + Tvarkyti atradimo nustatymus. + Atradimas + Deaktyvuoti mano paskyrą + Tai pakeis dabartinį raktą arba frazę. + Generuoti naują saugumo raktą arba nustatyti naują esamos atsarginės kopijos saugumo frazę. + Apsisaugokite nuo užšifruotų žinučių ir duomenų praradimo, darydami šifravimo raktų atsargines kopijas serveryje. + Nustatyti šiame įrenginyje + Nustatyti saugią atsarginę kopiją iš naujo + Nustatyti saugią atsarginę kopiją + Saugi atsarginė kopija + Pridėti žinutės kompozitoriuje mygtuką jaustukų klaviatūros atidarymui + Rodyti jaustukų klaviatūrą + Programinės klaviatūros mygtukas Enter išsiųs žinutę, o ne pridės eilutės pertrauką + Siųsti žinutę su enter + Medijos peržiūra prieš siunčiant + Vibruoti paminėjus naudotoją + Įtraukiami avataro ir rodomojo vardo keitimai. + Rodyti paskyrų įvykius + Kvietimai, pašalinimai ir užblokavimai nėra įtakojami. + Rodyti prisijungimo ir išėjimo įvykius + Paleisti animuotus paveikslėlius laiko juostoje, kai tik jie tampa matomi + Automatinis animuotų vaizdų paleidimas + Naudokite /confetti komandą arba siųskite žinutę, kurioje yra ❄️ arba 🎉 + Rodyti pokalbio efektus + Spustelėkite ant skaitymo kvitų, kad pamatytumėte išsamų sąrašą. + Rodyti skaitymo kvitus + Rodyti laiko žymas 12 valandų formatu + Leidimas naudotis kontaktais + Rodyti laiko žymas visoms žinutėms + Prieš siunčiant žinutes, suformatuoti jas naudojant Markdown sintakse. Tai leidžia atlikti išplėstinį formatavimą, pavyzdžiui, naudoti žvaigždutes tekstui kursyvu rodyti. + Markdown formatavimas + Naudotojo sąsaja + Leisti kitiems naudotojams žinoti, kad rašote. + Norėdami tai daryti, Įjunkite \'Leisti integracijas\' nustatymuose. + Siųsti pranešimus apie rašymą + Trečiųjų šalių bibliotekos + Jūsų tapatybės serverio politika + Jūsų namų serverio politika + ${app_name} politika + Integracijų tvarkyklė + Leisti integracijas + Tapatybės serveris + Namų serveris + Prisijungta kaip + Autentifikacija + %1$s @ %2$s + Paskutinį kartą matytas + Atnaujinti viešą pavadinimą + Viešas pavadinimas + Deaktyvuoti paskyrą + ID + Tai galite bet kada išjungti nustatymuose + Mes <b>nesidalijame</b> informacija su trečiosiomis šalimis + Mes <b>neįrašome ir neprofiliuojame</b> jokių paskyros duomenų + čia + Integracijos yra išjungtos + Šis serveris nepateikia jokios politikos. + Išsiuntėte duomenis skambučiui nustatyti. + Slėpti tapatybės serverio politiką + Rodyti tapatybės serverio politiką + Failas %1$s buvo atsiųstas! + Suglaudinamas vaizdo įrašas %d%% + Suglaudinamas paveikslėlis… + Siunčiamas failas (%1$s / %2$s) + Siunčiama miniatiūra (%1$s / %2$s) + Užšifruojamas failas… + Užšifruojama miniatiūra… + Nerandate to, ko ieškote\? + Laukiama… + Filtruoti pokalbius… + Redagavimų nerasta + Žinutės redagavimai + (redaguota) + Pagrindiniame ekrane pridėti specialų skirtuką neperskaitytiems pranešimams. + Įjungti perbraukimą, kad atsakytumėte laiko juostoje + Ieškoti pavadinimo + Ieškoti pagal vardą, ID arba paštą + Pavadinimas arba ID (#pavyzdys:matrix.org) + Peržiūrėti kambarių katalogą + Siųsti naują tiesioginę žinutę + Tiesioginės žinutės + Sukurti naują kambarį + Pasiūlymai + Žinomi naudotojai + Kuriamas kambarys… + QR kodas + Pridėti pagal QR kodą + Būkite atrandami kitų + Paslaugų teikimo sąlygos + Peržiūrėti redagavimo istoriją + Nuoroda nukopijuota į iškarpinę + Atidaryti atradimo nustatymus + Rodyti pilną istoriją užšifruotuose kambariuose + Rodyti paslėptus įvykius laiko juostoje + Iš naujo nustatyti pranešimų metodą + Registruoti žetoną + Sistemos nustatymai + Nėra registruotų tiesioginių pranešimų vartų + Nėra nustatytų tiesioginų pranešimų taisyklių + Tiesioginių pranešimų taisyklės + Saugumas & Privatumas + Nuostatos + Bendrieji + Kiti trečiųjų šalių pranešimai + Matrix SDK versija + Kambario nustatymai + Rodyti pašalintų žinučių vietoje užrašą + Rodyti pašalintas žinutes + ištrinti iš serverio atsarginę šifravimo raktų kopiją\? Atkūrimo rakto nebegalėsite naudoti užšifruotai žinučių istorijai skaityti. + Ištrinti atsarginę kopiją + Tikrinama atsarginės kopijos būsena + Atsarginė kopija ištrinama… + Jei norite naudoti atsarginę raktų kopiją šioje sesijoje, dabar atkurkite naudodami slaptažodį arba atkūrimo raktą. + Atsarginė kopija turi netinkamą parašą iš nepatvirtintos sesijos %s + Atsarginė kopija turi netinkamą parašą iš patvirtintos sesijos %s + Įjungti sistemos kamerą, vietoj pritaikytos kameros ekrano. + Naudoti vietinę kamerą + Patvirtinkite palygindami šiuos duomenis su naudotojo nustatymais kitoje sesijoje: + Tvarkyti raktų atsarginę kopiją + Tema + Atšaukti nustatymą pagrindiniu adresu + Nustatyti kaip pagrindinį adresą + Tai eksperimentinės funkcijos, kurios gali netikėtai sugesti. Naudokite atsargiai. + Laboratorijos + Kambario versija + Šio kambario vidinis ID + Išplėstiniai + + %d užblokuotas naudotojas + %d užblokuoti naudotojai + %d užblokuotų naudotojų + + Užblokuoti naudotojai + Bet kas gali rasti kambarį ir prisijungti + Viešas + Tik pakviesti žmonės gali rasti ir prisijungti + Privatus (tik su kvietimais) + Privatus + Nežinomas prieigos nustatymas (%s) + Bet kas gali pasibelsti į kambarį, o nariai gali priimti arba atmesti + Tik nariai (nuo jų prisijungimo) + Tik nariai (nuo jų pakvietimo) + Tik nariai (nuo šios parinkties pasirinkimo momento) + Bet kas + Leisti svečiams prisijungti + Pranešti man apie + Peržiūrėti ir tvarkyti šio kambario adresus bei jo matomumą kambarių kataloge. + Kas gali prieiti\? + Pakeitimai, kas gali skaityti istoriją, bus taikomi tik būsimoms šio kambario žinutėms. Esamos istorijos matomumas išliks nepakitęs. + Kas gali skaityti istoriją\? + Kambario istorijos skaitomumas + Paskyros nustatymai + Tema + Kambario adresai + Kambario prieiga + Pranešimus galite tvarkyti %1$s. + Atkreipkite dėmesį, kad pranešimai apie paminėjimus ir raktinius žodžius užšifruotuose kambariuose, nėra prieinami mobiliuosiuose įrenginiuose. + Pranešimų konfigūracija + Įjungus šį nustatymą, prie visų veiksmų pridedamas žymuo FLAG_SECURE. Iš naujo paleiskite programą, kad pakeitimas įsigaliotų. + Neleisti programos ekrano nuotraukų + Biometrinis autentifikavimas buvo išjungtas, nes neseniai buvo pridėtas naujas biometrinis autentifikavimo metodas. Jį vėl galite įjungti nustatymuose. + Nepavyko įjungti biometrinio autentifikavimo. + Atidaryti nustatymus + Sukurti AŽ tik po pirmos žinutės + Įjungti atidėtas AŽ + Supaprastintas Element su nebūtinais skirtukais + Įjungti naują išdėstymą + \ No newline at end of file diff --git a/library/ui-strings/src/main/res/values-pl/strings.xml b/library/ui-strings/src/main/res/values-pl/strings.xml index b7b73eb9e6..c9bac8977b 100644 --- a/library/ui-strings/src/main/res/values-pl/strings.xml +++ b/library/ui-strings/src/main/res/values-pl/strings.xml @@ -732,7 +732,7 @@ Wysyłaj wiadomości za pomocą klawisza enter Przycisk enter na klawiaturze programowej wyśle wiadomość zamiast wprowadzania łamanania linii Ustawienia wyszukiwania - Ustal jak inni mogą odnaleść twoje konto. + Ustal jak inni mogą odnaleźć twoje konto. Media Domyślne źródło mediów Odzyskiwanie zaszyfrowanych wiadomości @@ -2732,4 +2732,16 @@ Niestety, ten pokój nie został znaleziony. \nSpróbuj ponownie później.%s Zaproszenia - + Tutaj pojawią się rozmowy które nie zostały jeszcze odczytane. + Brak nowych wiadomości. + Zmień przestrzeń + Stwórz prywatny chat dopiero po wysłaniu pierwszej wiadomości + Włącz odroczone prywatne chaty + Odświeżony wygląd Element z opcjonalnymi kartami + Włącz nowy układ + Przestrzenie to nowa metoda na grupowanie razem wielu pokoi i osób. Dodaj tu już istniejący pokój lub stwórz nowy używając przycisku w prawym-dolnym rogu. + Jest to nowa metoda na grupowanie razem wielu pokoi i osób. + %s +\nwygląda nieco pusto. + Brak przestrzeni. + \ No newline at end of file diff --git a/library/ui-strings/src/main/res/values-pt-rBR/strings.xml b/library/ui-strings/src/main/res/values-pt-rBR/strings.xml index 817c7646df..108ecc7e38 100644 --- a/library/ui-strings/src/main/res/values-pt-rBR/strings.xml +++ b/library/ui-strings/src/main/res/values-pt-rBR/strings.xml @@ -473,7 +473,7 @@ Você tem certeza que você quer começar uma chamada de vídeo\? Tirar foto Tirar vídeo - Chamar + Chamada Banir usuária(o) vai removê-la(o) desta sala e preveni-la(o) de se juntar de novo. Todas as mensagens Adicionar a tela de Início @@ -2460,7 +2460,7 @@ Threads ajudam manThreads ajudam manter suas conversas em-tópico e fáceis de rastrear. %sHabilitar threads vai refrescar o app. Isto pode tomar mais tempo para algumas contas. Threads Beta Saber mais - Teste aí + Experimentar Compartilhamento de tela está em progresso ${app_name} Compartilhamento de Tela Parar compartilhamento de tela @@ -2633,15 +2633,15 @@ Desculpe, esta sala não tem sido encontrada. \nPor favor retente mais tarde.%s Convites - Teste aí + Experimentar Toque na direita topo para ver a opção para feedback. - Dar Feedback - Acessar seus Espaços (direito fundo) mais rápido e fácio que jamais antes. - Acessar Espaços + Dê Feedback + Acesse seus Espaços (direita fundo) mais rápido e fácil que jamais antes. + Acesse Espaços Para simplificar seu ${app_name}, abas são agora opcionais. Gerencie-as usando o menu direito topo. Boas-vindas a uma nova visão! Isto é onde suas mensagens não-lidas vão aparecer, quando você tiver algumas. - Nada a reportar. + Nada para reportar. O app de chat seguro tudo-em-um para equipes, amigas(os) e organizações. Crie um chat, ou junte-se a uma sala existe, para começar. Boas-vindas a ${app_name}, \n%s. @@ -2658,8 +2658,8 @@ Melhore a segurança de sua conta ao seguir estas recomendações. Recomendações de segurança - Inativa(o) por %1$d+ dia (%2$s) - Inativa(o) por %1$d+ dias (%2$s) + Inativa por %1$d+ dia (%2$s) + Inativa por %1$d+ dias (%2$s) Isto é onde suas novas requisições e convites vão estar. Nada novo. @@ -2668,4 +2668,46 @@ Colapsar filhos de %s Expandir filhos de %s Mudar Espaço + Não-verificadas + Verificadas + Não-verificadas + Verificadas + Inativas + + Inativas por %1$d dia ou mais longo + Inativas por %1$d dias ou mais longo + + Inativas + Endereço de IP + Última atividade + Nome de sessão + Informação de aplicativo, dispositivo, e atividade. + Detalhes de sessão + Limpar Filtro + Nenhuma sessão inativa encontrada. + Nenhuma sessão não-verificada encontrada. + Nenhuma sessão verificada encontrada. + + Considere fazer signout de sessões antigas (%1$d dia ou mais) que você não usa mais. + Considere fazer signout de sessões antigas (%1$d dias ou mais) que você não usa mais. + + Verifique suas sessões para mensageria segura melhorada ou faça signout daquelas que você não reconhece ou usa mais. + Para melhor segurança, faça signout de qualquer sessão que você não reconhece ou usa mais. + Filtrar + Pronta para mensageria segura + Não pronta para mensageria segura + Todas as sessões + Filtrar + Última atividade %1$s + Dispositivo + Sessão + Sessão Atual + Verifique ou faça signout desta sessão para melhor segurança e fiabilidade. + Verifique sua sessão atual para mensageria segura melhorada. + Esta sessão está pronta para mensageria segura. + Sua sessão atual está pronta para mensageria segura. + Criar DM somente em primeira mensagem + Habilitar DMs diferidas + Um Element simplificado com abas opcionais + Habilitar novo layout diff --git a/library/ui-strings/src/main/res/values-ru/strings.xml b/library/ui-strings/src/main/res/values-ru/strings.xml index 7c9d073035..c8eee49d96 100644 --- a/library/ui-strings/src/main/res/values-ru/strings.xml +++ b/library/ui-strings/src/main/res/values-ru/strings.xml @@ -273,7 +273,7 @@ Фильтр названий комнат Приглашения Маловажные - Беседы + Личные сообщения Только Matrix контакты Нет результатов Комнаты @@ -452,7 +452,7 @@ Чтобы убедиться, что этой сессии можно доверять, обратитесь к ее владельцу, используя другие способы (например, лично или по телефону), и спросите, соответствует ли ключ, который он видит в настройках для этой сессии: Если они не совпадают, безопасность вашего общения может быть поставлена под угрозу. Выбор каталога комнат - Имя сервера + Название сервера Все комнаты на сервере %s Все местные комнаты %s Пользовательский интерфейс @@ -907,16 +907,16 @@ Событие удалено пользователем Событие модерируется администратором комнаты Некорректное событие, не могу отобразить - Создать новую комнату + Создать комнату Нет сети. Пожалуйста, проверьте подключение к Интернету. Изменить - Изменить сеть + Изменить сервер Пожалуйста, подождите… Эту комнату нельзя предварительно просмотреть Комнаты Личные сообщения СОЗДАТЬ - Имя + Название Публичная Каждый сможет присоединиться к этой комнате Произошла ошибка при получении информации о доверии @@ -927,7 +927,7 @@ Вы уже просмотрели эту комнату! Общее Предпочтения - Безопасность и конфиденциальность + Безопасность Правила push-уведомлений app_id: push_key: @@ -956,11 +956,11 @@ Изменения не найдены Отфильтровать беседы… Не можете найти нужное\? - Создать новую комнату - Отправить новое личное сообщение - Просмотр каталога комнат - Имя или ID (#example:matrix.org) - Включить жест смахивания для ответа в ленте сообщений + Создать комнату + Отправить личное сообщение + Каталог комнат + Название или ID (#example:matrix.org) + Жест смахивания для ответа в ленте сообщений Ссылка скопирована в буфер обмена Создаем комнату… История изменений @@ -1039,7 +1039,7 @@ Использовать камеру Использовать микрофон Получать доступ к медиа, защищённым DRM - Создать новую комнату + Создать комнату Файл Камера Галерея @@ -1390,7 +1390,7 @@ Вы приняли Подтверждение отправлено Запрос на подтверждение - Подтвердите эту сессию + Заверьте эту сессию Сканируйте код с помощью устройства другого пользователя, чтобы безопасно проверить друг друга Сканировать их код Невозможно сканировать @@ -1450,7 +1450,7 @@ %d сессии активны %d сессий активно - Подтвердите это устройство + Заверьте эту сессию Используйте существующую сессию для подтверждения этой, предоставив ей доступ к зашифрованным сообщениям. Инструменты для разработчиков Данные учётной записи @@ -1473,13 +1473,13 @@ Безопасное резервное копирование Эта сессия является надежной для безопасного обмена сообщениями, поскольку вы подтвердили ее: Подтвердите эту сессию, чтобы пометить её доверенной и предоставить ей доступ к зашифрованным сообщениям. Если вы не входили в эту сессию, ваша учетная запись может быть скомпрометирована: - Проверить - Проверено + Заверить + Заверено Предупреждение Не удалось получить список сессий Сессии - Доверенные - Недоверенные + Заверенная + Незаверенная Эта сессия является доверенной для безопасного обмена сообщениями, так как %1$s (%2$s) проверил(а) его: %1$s (%2$s) вошел(ла), используя новую сессию: Пока этот пользователь не доверяет этой сессии, сообщения, отправленные в обе стороны, помечаются предупреждениями. Кроме того, вы можете подтвердить сессию вручную. @@ -2037,7 +2037,7 @@ Вы здесь единственный человек. Если вы уйдёте, никто не сможет присоединиться в будущем, включая вас. Покинуть Добавить комнаты - Исследуйте комнаты + Обзор комнат %d человек, которого вы знаете, уже присоединился %d людей, которых вы знаете, уже присоединились @@ -2116,7 +2116,7 @@ Сканируйте код с помощью другого устройства или переключитесь и сканируйте с помощью этого устройства Адрес пространства Файл слишком большой для загрузки. - Поиск по имени + Поиск по названию Сжатие видео %d%% Сжатие изображения… Оставить отзыв @@ -2374,11 +2374,11 @@ Опрос Создать опрос Перезапустите приложение, чтобы изменения вступили в силу. - Включить математику LaTeX + Математика LaTeX Ваша система будет автоматически отправлять журналы при возникновении ошибки невозможности расшифровки Автоматически сообщать об ошибках расшифровки. Шифрование неправильно настроено - Изменить цвет отображаемого имени + Изменить цвет имени Восстановить шифрование Обратитесь к администратору, чтобы восстановить шифрование до рабочего состояния. Шифрование настроено неправильно. @@ -2435,7 +2435,7 @@ Не удалось загрузить карту Карта Примечание: приложение будет перезапущено - Включить обсуждения сообщений + Обсуждения сообщений Подключиться к серверу Хотите присоединиться к существующему серверу\? Пропустить вопрос @@ -2507,7 +2507,7 @@ Идёт отправка местоположения Осталось %1$s Обновлено %1$s назад - Включить функцию \"Поделиться трансляцией местоположения\" + Функция \"Поделиться трансляцией местоположения\" ${app_name} Трансляция местоположения Транслировать до %1$s Трансляция завершена @@ -2665,8 +2665,8 @@ Сессии Создать беседу или комнату Показать все сессии (V2, в разработке) - Люди - Настройки макета + ЛС + Настройки вида Фильтры Недавние Избранные @@ -2676,7 +2676,7 @@ Активности Сортировать по Обзор комнат - Начать беседу + Отправить ЛС Создать комнату Посмотреть все (%1$d) Повысьте безопасность учётной записи, следуя этим рекомендациям. @@ -2693,4 +2693,53 @@ Добро пожаловать в ${app_name}, \n%s. Оставить отзыв - + Название сессии + Неактивные + IP-адрес + Последняя активность + Сведения о сессии + Для лучшей безопасности выйдите из всех сессий, которые более не признаёте или не используете. + Заверенные + Все сессии + Последняя активность %1$s + Устройство + Сессия + Текущая сессия + Заверить сессию + Подробности + Эта сессия готова к безопасному обмену сообщениями. + Текущая сессия готова к безопасному обмену сообщениями. + Веб-браузер + Пространства — это новый способ организации комнат и людей. Создайте пространство, чтобы начать. + Новый вид + Нечего отображать. + Здесь будут отображаться непрочитанные сообщения, когда таковые будут. + Присущий системе + Смена пространства + Упрощённый Element с дополнительными вкладками + Добро пожаловать в новый вид! + %s +\nвыглядит слегка пустовато. + Попробовать + Сведения о приложении, устройстве и активности. + Подтвердите текущую сессию для более безопасного обмена сообщениями. + Пока нет пространств. + Подтвердите свои сессии для более безопасного обмена сообщениями или выйдите из тех, которые более не признаёте или не используете. + Подтвердите или выйдите из незаверенных сессий. + Подтвердите или выйдите из этой сессии для лучшей безопасности и надёжности. + Ничего нового. + Заверенных сессий не обнаружено. + Незаверенных сессий не обнаружено. + Неактивных сессий не обнаружено. + Очистить фильтр + Не готовы к безопасному обмену сообщениями + Готовы к безопасному обмену сообщениями + + Неактивны %1$d день или дольше + Неактивны %1$d дня или дольше + Неактивны %1$d дней или дольше + Неактивны %1$d дней или дольше + + Незаверенные + Фильтр + \ No newline at end of file diff --git a/library/ui-strings/src/main/res/values-sk/strings.xml b/library/ui-strings/src/main/res/values-sk/strings.xml index 9eb22e3ae3..f37af1a654 100644 --- a/library/ui-strings/src/main/res/values-sk/strings.xml +++ b/library/ui-strings/src/main/res/values-sk/strings.xml @@ -2720,4 +2720,48 @@ Zbaliť %s podpriestory Rozbaliť %s podpriestory Zmeniť priestor - + IP adresa + Posledná aktivita + Názov relácie + Informácie o aplikácii, zariadení a činnosti. + Podrobnosti o relácii + Zrušiť filter + Nenašli sa žiadne neaktívne relácie. + Nenašli sa žiadne neoverené relácie. + Nenašli sa žiadne overené relácie. + + Zvážte odhlásenie zo starých relácií (%1$d deň alebo viac), ktoré už nepoužívate. + Zvážte odhlásenie zo starých relácií (%1$d dni alebo viac), ktoré už nepoužívate. + Zvážte odhlásenie zo starých relácií (%1$d dní alebo viac), ktoré už nepoužívate. + + Neaktívne + Overte si relácie pre vylepšené bezpečné zasielanie správ alebo sa odhláste z tých, ktoré už nepoznáte alebo nepoužívate. + Neoverené + V záujme čo najlepšieho zabezpečenia sa odhláste z každej relácie, ktorú už nepoznáte alebo nepoužívate. + Overené + Filter + + Neaktívny už %1$d deň alebo dlhšie + Neaktívny už %1$d dni alebo dlhšie + Neaktívny už %1$d dní alebo dlhšie + + Neaktívne + Nie je pripravené na bezpečné zasielanie správ + Neoverené + Pripravené na bezpečné zasielanie správ + Overené + Všetky relácie + Filter + Posledná aktivita %1$s + Zariadenie + Relácia + Aktuálna relácia + V záujme čo najvyššej bezpečnosti a spoľahlivosti túto reláciu overte alebo sa z nej odhláste. + Overte svoju aktuálnu reláciu pre vylepšené bezpečné zasielanie správ. + Táto relácia je pripravená na bezpečné zasielanie správ. + Vaša aktuálna relácia je pripravená na bezpečné zasielanie správ. + Vytvoriť priamu správu len pri prvej správe + Povoliť odložené priame správy + Zjednodušený Element s voliteľnými kartami + Zapnúť nové usporiadanie + \ No newline at end of file diff --git a/library/ui-strings/src/main/res/values-uk/strings.xml b/library/ui-strings/src/main/res/values-uk/strings.xml index 3e511f8459..c4f1658f6b 100644 --- a/library/ui-strings/src/main/res/values-uk/strings.xml +++ b/library/ui-strings/src/main/res/values-uk/strings.xml @@ -818,7 +818,7 @@ URL-адреса аватара Ваше показуване ім\'я Скасувати доступ для мене - Відкрити в переглядачі + Відкрити у браузері Перезавантажити віджет Не вдалося завантажити віджет. \n%s @@ -1196,7 +1196,7 @@ Використати файл Скористатись парольною фразою відновлення або ключем Скористатись відновлювальними парольною фразою або ключем - Використовуйте найостаннішій ${app_name} на ваших інших пристроях, ${app_name} Web, ${app_name} для комп\'ютерів, ${app_name} iOS, ${app_name} для Android, або будь-який інший, здатний до перехресного підписування, Matrix-клієнт + Використовуйте найостаннішій ${app_name} на ваших інших пристроях, ${app_name} браузері, ${app_name} комп\'ютерах, ${app_name} iOS, ${app_name} Android, або будь-який інший, здатний до перехресного підписування, Matrix-клієнт Використовуйте найостаннішій ${app_name} на ваших інших пристроях: Якщо ви не можете доступитись до чинного сеансу Використайте чинний сеанс, щоб звірити цей сеанс, таким чином надавши йому доступ до зашифрованих повідомлень. @@ -2021,7 +2021,7 @@ Не вдалося отримати доступ до безпечного сховища ${app_name} iOS \n${app_name} Android - ${app_name} для переглядача + ${app_name} для браузера \n${app_name} для ПК Не вдалося зберегти медіафайл Це не дійсний ключ відновлення @@ -2701,7 +2701,7 @@ Відкрити налаштування Усі бесіди Показати всі сеанси (V2, WIP) - Для найкращої безпеки перевірте свої сеанси та вийдіть з усіх сеансів, які ви більше не розпізнаєте або не використовуєте. + Звірте свої сеанси та вийдіть з усіх сеансів, які ви більше не розпізнаєте або не використовуєте для кращої безпеки. Інші сеанси Сеанси Відкрити список кімнат @@ -2772,4 +2772,50 @@ Згорнути дочірні елементи %s Розгорнути дочірні елементи %s Змінити простір - + IP-адреса + Остання активність + Назва сеансу + Відомості про застосунок, пристрій та діяльність. + Подробиці сеансу + Очистити фільтр + Неактивних сеансів не знайдено. + Не знайдено не звірених сеансів. + Знайдені не звірені сеанси. + + Подумайте про те, щоб вийти зі старих сеансів (%1$d день або довше), якими ви більше не користуєтесь. + Подумайте про те, щоб вийти зі старих сеансів (%1$d дні або довше), якими ви більше не користуєтесь. + Подумайте про те, щоб вийти зі старих сеансів (%1$d днів або довше), якими ви більше не користуєтесь. + Подумайте про те, щоб вийти зі старих сеансів (%1$d днів або довше), якими ви більше не користуєтесь. + + Неактивний + Звірте свої сеанси для посилення безпеки обміну повідомленнями або вийдіть з тих, які ви більше не впізнаєте або не використовуєте. + Не звірений + Для кращої безпеки виходьте з будь-якого сеансу, який ви більше не впізнаєте або не використовуєте. + Звірений + Фільтрувати + + Неактивний %1$d день або довше + Неактивний %1$d дні або довше + Неактивний %1$d днів або довше + Неактивний %1$d днів або довше + + Неактивний + Не готовий до безпечного обміну повідомленнями + Не звірений + Звірений + Готовий до безпечного обміну повідомленнями + Усі сеанси + Фільтрувати + Остання активність %1$s + Пристрій + Сеанс + Поточний сеанс + Звірте або вийдіть з цього сеансу для кращої безпеки та надійності. + Звірте свій поточний сеанс для посилення безпеки обміну повідомленнями. + Цей сеанс готовий до безпечного обміну повідомленнями. + Ваш поточний сеанс готовий до безпечного обміну повідомленнями. + Створюйте приватні повідомлення лише за надсилання першого повідомлення + Увімкнути відкладені приватні повідомлення + Спрощений Element з опціональними вкладками + Увімкнути новий вигляд + \ No newline at end of file diff --git a/library/ui-strings/src/main/res/values-zh-rCN/strings.xml b/library/ui-strings/src/main/res/values-zh-rCN/strings.xml index db1dab92e2..eba96e82c3 100644 --- a/library/ui-strings/src/main/res/values-zh-rCN/strings.xml +++ b/library/ui-strings/src/main/res/values-zh-rCN/strings.xml @@ -2604,4 +2604,24 @@ 提供反馈 点击右上角查看反馈选项。 试用 - + 空间是对房间和人进行分组的新方式。创建一个空间来开始吧。 + 启用新布局 + IP地址 + 验证你的会话以增强消息传输的安全性,或从那些你不认识或不再使用的会话登出。 + 尚未准备好安全收发消息 + 准备好安全收发消息 + 已验证 + 全部会话 + 筛选 + 上次活跃%1$s + 设备 + 会话 + 当前会话 + 验证你的会话以增强消息传输的安全性。 + 访问你的空间(右下角)比以前更快、更容易。 + 此会话已准备好安全地收发消息。 + 你当前的会话已准备好安全地收发消息。 + 仅在首条消息创建私聊消息 + 启用延迟的私聊消息 + 简化的Element,带有可选的标签 + \ No newline at end of file diff --git a/library/ui-strings/src/main/res/values-zh-rTW/strings.xml b/library/ui-strings/src/main/res/values-zh-rTW/strings.xml index 78caa2cc2e..876084d566 100644 --- a/library/ui-strings/src/main/res/values-zh-rTW/strings.xml +++ b/library/ui-strings/src/main/res/values-zh-rTW/strings.xml @@ -2616,4 +2616,44 @@ 折疊 %s 個子空間 展開 %s 個子空間 變更空間 - + IP 位置 + 最後活動 + 工作階段名稱 + 應用程式、裝置與活動資訊。 + 工作階段詳細資訊 + 清除過濾條件 + 找不到不活躍的工作階段。 + 找不到未驗證的工作階段。 + 找不到已驗證的工作階段。 + + 閒置%1$d天或更久 + + + 考慮登出您不再使用的舊工作階段(%1$d天或更久)。 + + 不活躍 + 驗證您的工作階段以強化安全通訊或從您無法識別或不再使用的工作階段登出。 + 未驗證 + 為取得最佳安全性,請從任何您無法識別或不再使用的工作階段登出。 + 已驗證 + 過濾 + 不活躍 + 尚未準備好安全通訊 + 未驗證 + 準備好安全通訊 + 已驗證 + 所有工作階段 + 過濾 + 最後活動 %1$s + 裝置 + 工作階段 + 目前的工作階段 + 驗證或從此工作階段登出以取得最佳安全性與可靠性。 + 驗證您目前的工作階段以強化安全通訊。 + 此工作階段已準備好安全通訊。 + 您目前的工作階段已準備好安全通訊。 + 僅在第一則訊息上建立直接訊息 + 啟用延期直接訊息 + 包含選擇性分頁的簡潔 Element + 啟用新佈局 + \ No newline at end of file diff --git a/library/ui-strings/src/main/res/values/strings.xml b/library/ui-strings/src/main/res/values/strings.xml index 4ff7aae750..71ccf5b234 100644 --- a/library/ui-strings/src/main/res/values/strings.xml +++ b/library/ui-strings/src/main/res/values/strings.xml @@ -284,8 +284,8 @@ %1$s turned on end-to-end encryption. You turned on end-to-end encryption. - %1$s turned on end-to-end encryption (unrecognised algorithm %2$s). - You turned on end-to-end encryption (unrecognised algorithm %1$s). + %1$s turned on end-to-end encryption (unrecognized algorithm %2$s). + You turned on end-to-end encryption (unrecognized algorithm %1$s). System Default @@ -406,6 +406,7 @@ Reset Learn more Next + Got it Copied to clipboard @@ -423,7 +424,7 @@ Notifications - Favourites + Favorites People Rooms @@ -773,7 +774,7 @@ Shows all threads from current room My Threads Shows all threads you’ve participated in - Keep discussions organised with threads + Keep discussions organized with threads Threads help keep your conversations on-topic and easy to track. Tip: Long tap a message and use “%s”. @@ -818,7 +819,7 @@ Show the application info in the system settings. Email addresses - No email has been added to your account + No email address has been added to your account Phone numbers Remove %s? Ensure that you have clicked on the link in the email we have sent to you. @@ -827,7 +828,7 @@ Notification importance by event Email notification - To receive email with notification, please associate an email to your Matrix account + To receive email with notification, please associate an email address to your Matrix account Enable email notifications for %s @@ -1093,7 +1094,7 @@ Show all messages from %s? Emails and phone numbers - Manage emails and phone numbers linked to your Matrix account + Manage email addresses and phone numbers linked to your Matrix account Choose a country @@ -1233,6 +1234,9 @@ Import Encrypt to verified sessions only Never send encrypted messages to unverified sessions from this session. + Never send encrypted messages to unverified sessions in this room. + ⚠ There are unverified devices in this room, they won’t be able to decrypt messages you send. + 🔒 You have enabled encrypt to verified sessions only for all rooms in Security Settings. %1$d/%2$d key imported with success. %1$d/%2$d keys imported with success. @@ -1641,7 +1645,7 @@ All Unreads - Favourites + Favorites People Reactions @@ -1800,20 +1804,20 @@ You are currently using %1$s to discover and be discoverable by existing contacts you know. You are not currently using an identity server. To discover and be discoverable by existing contacts you know, configure one below. Discoverable email addresses - Discovery options will appear once you have added an email. + Discovery options will appear once you have added an email address. Discovery options will appear once you have added a phone number. Disconnecting from your identity server will mean you won’t be discoverable by other users and you won’t be able to invite others by email or phone. Discoverable phone numbers - We sent you a confirm email to %s, check your email and click on the confirmation link - We sent you a confirm email to %s, please first check your email and click on the confirmation link + We sent an email to %s, check your email and click on the confirmation link + We sent an email to %s, please first check your email and click on the confirmation link Send emails and phone numbers - You have given your consent to send emails and phone numbers to this identity server to discover other users from your contacts. + You have given your consent to send email addresses and phone numbers to this identity server to discover other users from your contacts. Your contacts are private. To discover users from your contacts, we need your permission to send contact info to your identity server. Revoke my consent Give consent - Send emails and phone numbers to %s - To discover existing contacts, you need to send contact info (emails and phone numbers) to your identity server. We hash your data before sending for privacy. + Send email addresses and phone numbers to %s + To discover existing contacts, you need to send contact info (email addresses and phone numbers) to your identity server. We hash your data before sending for privacy. Do you agree to send this info? Enter an identity server URL @@ -1843,7 +1847,7 @@ Close the create room menu… Create a new direct conversation Create a new conversation or room - Create a new room + Create a new room Open spaces list Close keys backup banner Jump to bottom @@ -1871,6 +1875,7 @@ "Sticker" Poll Location + Voice Broadcast Rotate and crop Couldn\'t handle share data @@ -2037,7 +2042,7 @@ It\'s your conversation. Own it. Chat with people directly or in groups Keep conversations private with encryption - Extend & customise your experience + Extend & customize your experience Get started Create account I already have an account @@ -2080,7 +2085,7 @@ Sorry, this server isn’t accepting new accounts. The application is not able to create an account on this homeserver.\n\nDo you want to signup using a web client? - This email is not associated to any account. + This email address is not associated to any account. Reset password on %1$s @@ -2093,7 +2098,7 @@ Changing your password will reset any end-to-end encryption keys on all of your sessions, making encrypted chat history unreadable. Set up Key Backup or export your room keys from another session before resetting your password. Continue - This email is not linked to any account + This email address is not linked to any account Check your inbox @@ -2110,7 +2115,7 @@ Your password is not yet changed.\n\nStop the password change process? Set email address - Set an email to recover your account. Later, you can optionally allow people you know to discover you by your email. + Set an email address to recover your account. Later, you can optionally allow people you know to discover you by your this address. Email Email (optional) Next @@ -2261,8 +2266,8 @@ Shared their live location Waiting… - %s cancelled - You cancelled + %s canceled + You canceled %s accepted You accepted Verification Sent @@ -2366,9 +2371,6 @@ Manage Sessions Sign out of this session Sessions - Other sessions - For best security, verify your sessions and sign out from any session that you don’t recognize or use anymore. - Server name Server version Server file upload limit @@ -2407,7 +2409,7 @@ This session is trusted for secure messaging because %1$s (%2$s) verified it: %1$s (%2$s) signed in using a new session: - Until this user trusts this session, messages sent to and from it are labelled with warnings. Alternatively, you can manually verify it. + Until this user trusts this session, messages sent to and from it are labeled with warnings. Alternatively, you can manually verify it. Initialize CrossSigning @@ -2476,9 +2478,9 @@ One of the following may be compromised:\n\n- Your password\n- Your homeserver\n- This device, or the other device\n- The internet connection either device is using\n\nWe recommend you change your password & recovery key in Settings immediately. - Verification has been cancelled. You can start verification again. + Verification has been canceled. You can start verification again. This QR code looks malformed. Please try to verify with another method. - Verification Cancelled + Verification Canceled Recovery Passphrase Message Key @@ -2579,6 +2581,9 @@ Prevent screenshots of the application Enabling this setting adds the FLAG_SECURE to all Activities. Restart the application for the change to take effect. + Incognito keyboard + "Request that the keyboard should not update any personalized data such as typing history and dictionary based on what you've typed in conversations. Notice that some keyboards may not respect this setting." + Could not save media file Set a new account password… @@ -2675,7 +2680,7 @@ Please first configure an identity server. Please first accepts the terms of the identity server in the settings. - For your privacy, ${app_name} only supports sending hashed user emails and phone number. + For your privacy, ${app_name} only supports sending hashed user email addresses and phone numbers. The association has failed. There is no current association with this identifier. The user consent has not been provided. @@ -2914,7 +2919,7 @@ Who are you working with? Make sure the right people have access to %s. Just me - A private space to organise your rooms + A private space to organize your rooms Me and teammates A private space for you & your teammates Public @@ -3072,7 +3077,7 @@ This invite to this space was sent to %s which is not associated with your account - Link this email with your account + Link this email address with your account %s in Settings to receive invites directly in ${app_name}. @@ -3179,6 +3184,7 @@ Open contacts Create poll Share location + Start a voice broadcast Show less @@ -3229,6 +3235,8 @@ Show All Sessions (V2, WIP) + Other sessions + For best security, verify your sessions and sign out from any session that you don’t recognize or use anymore. Mobile Web Desktop @@ -3302,6 +3310,14 @@ Session name Custom session names can help you recognize your devices more easily. Please be aware that session names are also visible to people you communicate with. + Inactive sessions + Inactive sessions are sessions you have not used in some time, but they continue to receive encryption keys.\n\nRemoving inactive sessions improves security and performance, and makes it easier for you to identify if a new session is suspicious. + Unverified sessions + Unverified sessions are sessions that have logged in with your credentials but not been cross-verified.\n\nYou should make especially certain that you recognise these sessions as they could represent an unauthorised use of your account. + Verified sessions + Verified sessions have logged in with your credentials and then been verified, either using your secure passphrase or by cross-verifying.\n\nThis means they hold encryption keys for your previous messages, and confirm to other users you are communicating with that these sessions are really you. + Renaming sessions + Other users in direct messages and rooms that you join are able to view a full list of your sessions.\n\nThis provides them with confidence that they are really speaking to you, but it also means they can see the session name you enter here. %s\nis looking a little empty. diff --git a/library/ui-styles/src/main/res/values/dimens.xml b/library/ui-styles/src/main/res/values/dimens.xml index 758dd6e978..0fb03f0ea3 100644 --- a/library/ui-styles/src/main/res/values/dimens.xml +++ b/library/ui-styles/src/main/res/values/dimens.xml @@ -50,9 +50,9 @@ 28dp - 62dp - 300dp - 12dp + 6dp + 350sp + 8dp 0.05 diff --git a/library/ui-styles/src/main/res/values/stylable_sessions_list_header_view.xml b/library/ui-styles/src/main/res/values/stylable_sessions_list_header_view.xml index d3b931e44a..098ec263fc 100644 --- a/library/ui-styles/src/main/res/values/stylable_sessions_list_header_view.xml +++ b/library/ui-styles/src/main/res/values/stylable_sessions_list_header_view.xml @@ -4,6 +4,7 @@ + diff --git a/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/common/CryptoTestHelper.kt b/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/common/CryptoTestHelper.kt index 7b5ee97ae4..74292daf15 100644 --- a/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/common/CryptoTestHelper.kt +++ b/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/common/CryptoTestHelper.kt @@ -313,7 +313,7 @@ class CryptoTestHelper(val testHelper: CommonTestHelper) { val incomingRequest = bobVerificationService.getExistingVerificationRequests(alice.myUserId).first { it.requestInfo?.fromDevice == alice.sessionParams.deviceId } - bobVerificationService.readyPendingVerification(listOf(VerificationMethod.SAS), alice.myUserId, incomingRequest.transactionId!!) + bobVerificationService.readyPendingVerificationInDMs(listOf(VerificationMethod.SAS), alice.myUserId, roomId, incomingRequest.transactionId!!) var requestID: String? = null // wait for it to be readied @@ -365,7 +365,7 @@ class CryptoTestHelper(val testHelper: CommonTestHelper) { } testHelper.retryPeriodically { - alice.cryptoService().crossSigningService().isUserTrusted(bob.myUserId) + bob.cryptoService().crossSigningService().isUserTrusted(alice.myUserId) } } diff --git a/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/E2eeConfigTest.kt b/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/E2eeConfigTest.kt new file mode 100644 index 0000000000..8b12092b79 --- /dev/null +++ b/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/E2eeConfigTest.kt @@ -0,0 +1,132 @@ +/* + * Copyright 2022 The Matrix.org Foundation C.I.C. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.matrix.android.sdk.internal.crypto + +import androidx.test.filters.LargeTest +import org.amshove.kluent.shouldBe +import org.junit.FixMethodOrder +import org.junit.Test +import org.junit.runner.RunWith +import org.junit.runners.JUnit4 +import org.junit.runners.MethodSorters +import org.matrix.android.sdk.InstrumentedTest +import org.matrix.android.sdk.api.session.crypto.MXCryptoError +import org.matrix.android.sdk.api.session.getRoom +import org.matrix.android.sdk.api.session.room.timeline.getLastMessageContent +import org.matrix.android.sdk.common.CommonTestHelper.Companion.runCryptoTest + +@RunWith(JUnit4::class) +@FixMethodOrder(MethodSorters.JVM) +@LargeTest +class E2eeConfigTest : InstrumentedTest { + + @Test + fun testBlacklistUnverifiedDefault() = runCryptoTest(context()) { cryptoTestHelper, _ -> + val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom(true) + + cryptoTestData.firstSession.cryptoService().getGlobalBlacklistUnverifiedDevices() shouldBe false + cryptoTestData.firstSession.cryptoService().isRoomBlacklistUnverifiedDevices(cryptoTestData.roomId) shouldBe false + cryptoTestData.secondSession!!.cryptoService().getGlobalBlacklistUnverifiedDevices() shouldBe false + cryptoTestData.secondSession!!.cryptoService().isRoomBlacklistUnverifiedDevices(cryptoTestData.roomId) shouldBe false + } + + @Test + fun testCantDecryptIfGlobalUnverified() = runCryptoTest(context()) { cryptoTestHelper, testHelper -> + val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom(true) + + cryptoTestData.firstSession.cryptoService().setGlobalBlacklistUnverifiedDevices(true) + + val roomAlicePOV = cryptoTestData.firstSession.roomService().getRoom(cryptoTestData.roomId)!! + + val sentMessage = testHelper.sendTextMessage(roomAlicePOV, "you are blocked", 1).first() + + val roomBobPOV = cryptoTestData.secondSession!!.roomService().getRoom(cryptoTestData.roomId)!! + // ensure other received + testHelper.retryPeriodically { + roomBobPOV.timelineService().getTimelineEvent(sentMessage.eventId) != null + } + + cryptoTestHelper.ensureCannotDecrypt(listOf(sentMessage.eventId), cryptoTestData.secondSession!!, cryptoTestData.roomId) + } + + @Test + fun testCanDecryptIfGlobalUnverifiedAndUserTrusted() = runCryptoTest(context()) { cryptoTestHelper, testHelper -> + val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom(true) + + cryptoTestHelper.initializeCrossSigning(cryptoTestData.firstSession) + cryptoTestHelper.initializeCrossSigning(cryptoTestData.secondSession!!) + + cryptoTestHelper.verifySASCrossSign(cryptoTestData.firstSession, cryptoTestData.secondSession!!, cryptoTestData.roomId) + + cryptoTestData.firstSession.cryptoService().setGlobalBlacklistUnverifiedDevices(true) + + val roomAlicePOV = cryptoTestData.firstSession.roomService().getRoom(cryptoTestData.roomId)!! + + val sentMessage = testHelper.sendTextMessage(roomAlicePOV, "you can read", 1).first() + + val roomBobPOV = cryptoTestData.secondSession!!.roomService().getRoom(cryptoTestData.roomId)!! + // ensure other received + testHelper.retryPeriodically { + roomBobPOV.timelineService().getTimelineEvent(sentMessage.eventId) != null + } + + cryptoTestHelper.ensureCanDecrypt( + listOf(sentMessage.eventId), + cryptoTestData.secondSession!!, + cryptoTestData.roomId, + listOf(sentMessage.getLastMessageContent()!!.body) + ) + } + + @Test + fun testCantDecryptIfPerRoomUnverified() = runCryptoTest(context()) { cryptoTestHelper, testHelper -> + val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom(true) + + val roomAlicePOV = cryptoTestData.firstSession.roomService().getRoom(cryptoTestData.roomId)!! + + val beforeMessage = testHelper.sendTextMessage(roomAlicePOV, "you can read", 1).first() + + val roomBobPOV = cryptoTestData.secondSession!!.roomService().getRoom(cryptoTestData.roomId)!! + // ensure other received + testHelper.retryPeriodically { + roomBobPOV.timelineService().getTimelineEvent(beforeMessage.eventId) != null + } + + cryptoTestHelper.ensureCanDecrypt( + listOf(beforeMessage.eventId), + cryptoTestData.secondSession!!, + cryptoTestData.roomId, + listOf(beforeMessage.getLastMessageContent()!!.body) + ) + + cryptoTestData.firstSession.cryptoService().setRoomBlockUnverifiedDevices(cryptoTestData.roomId, true) + + val afterMessage = testHelper.sendTextMessage(roomAlicePOV, "you are blocked", 1).first() + + // ensure received + testHelper.retryPeriodically { + cryptoTestData.secondSession?.getRoom(cryptoTestData.roomId)?.timelineService()?.getTimelineEvent(afterMessage.eventId)?.root != null + } + + cryptoTestHelper.ensureCannotDecrypt( + listOf(afterMessage.eventId), + cryptoTestData.secondSession!!, + cryptoTestData.roomId, + MXCryptoError.ErrorType.KEYS_WITHHELD + ) + } +} diff --git a/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/E2eeSanityTests.kt b/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/E2eeSanityTests.kt index 544fe90a73..a36ba8ac02 100644 --- a/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/E2eeSanityTests.kt +++ b/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/E2eeSanityTests.kt @@ -33,6 +33,10 @@ import org.junit.runner.RunWith import org.junit.runners.JUnit4 import org.junit.runners.MethodSorters import org.matrix.android.sdk.InstrumentedTest +import org.matrix.android.sdk.api.auth.UIABaseAuth +import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor +import org.matrix.android.sdk.api.auth.UserPasswordAuth +import org.matrix.android.sdk.api.auth.registration.RegistrationFlowResponse import org.matrix.android.sdk.api.crypto.MXCryptoConfig import org.matrix.android.sdk.api.session.Session import org.matrix.android.sdk.api.session.crypto.MXCryptoError @@ -61,7 +65,10 @@ import org.matrix.android.sdk.common.CommonTestHelper import org.matrix.android.sdk.common.CommonTestHelper.Companion.runCryptoTest import org.matrix.android.sdk.common.CommonTestHelper.Companion.runSessionTest import org.matrix.android.sdk.common.SessionTestParams +import org.matrix.android.sdk.common.TestConstants import org.matrix.android.sdk.mustFail +import timber.log.Timber +import kotlin.coroutines.Continuation import kotlin.coroutines.resume // @Ignore("This test fails with an unhandled exception thrown from a coroutine which terminates the entire test run.") @@ -607,6 +614,85 @@ class E2eeSanityTests : InstrumentedTest { ) } + @Test + fun test_EncryptionDoesNotHinderVerification() = runCryptoTest(context()) { cryptoTestHelper, testHelper -> + val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom() + + val aliceSession = cryptoTestData.firstSession + val bobSession = cryptoTestData.secondSession + + val aliceAuthParams = UserPasswordAuth( + user = aliceSession.myUserId, + password = TestConstants.PASSWORD + ) + val bobAuthParams = UserPasswordAuth( + user = bobSession!!.myUserId, + password = TestConstants.PASSWORD + ) + + testHelper.waitForCallback { + aliceSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor { + override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation) { + promise.resume(aliceAuthParams) + } + }, it) + } + + testHelper.waitForCallback { + bobSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor { + override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation) { + promise.resume(bobAuthParams) + } + }, it) + } + + // add a second session for bob but not cross signed + + val secondBobSession = testHelper.logIntoAccount(bobSession.myUserId, SessionTestParams(true)) + + aliceSession.cryptoService().setGlobalBlacklistUnverifiedDevices(true) + + // The two bob session should not be able to decrypt any message + + val roomFromAlicePOV = aliceSession.getRoom(cryptoTestData.roomId)!! + Timber.v("#TEST: Send a first message that should be withheld") + val sentEvent = sendMessageInRoom(testHelper, roomFromAlicePOV, "Hello")!! + + // wait for it to be synced back the other side + Timber.v("#TEST: Wait for message to be synced back") + testHelper.retryPeriodically { + bobSession.roomService().getRoom(cryptoTestData.roomId)?.timelineService()?.getTimelineEvent(sentEvent) != null + } + + testHelper.retryPeriodically { + secondBobSession.roomService().getRoom(cryptoTestData.roomId)?.timelineService()?.getTimelineEvent(sentEvent) != null + } + + // bob should not be able to decrypt + Timber.v("#TEST: Ensure cannot be decrytped") + cryptoTestHelper.ensureCannotDecrypt(listOf(sentEvent), bobSession, cryptoTestData.roomId) + cryptoTestHelper.ensureCannotDecrypt(listOf(sentEvent), secondBobSession, cryptoTestData.roomId) + + // let's try to verify, it should work even if bob devices are untrusted + Timber.v("#TEST: Do the verification") + cryptoTestHelper.verifySASCrossSign(aliceSession, bobSession, cryptoTestData.roomId) + + Timber.v("#TEST: Send a second message, outbound session should have rotated and only bob 1rst session should decrypt") + + val secondEvent = sendMessageInRoom(testHelper, roomFromAlicePOV, "World")!! + Timber.v("#TEST: Wait for message to be synced back") + testHelper.retryPeriodically { + bobSession.roomService().getRoom(cryptoTestData.roomId)?.timelineService()?.getTimelineEvent(secondEvent) != null + } + + testHelper.retryPeriodically { + secondBobSession.roomService().getRoom(cryptoTestData.roomId)?.timelineService()?.getTimelineEvent(secondEvent) != null + } + + cryptoTestHelper.ensureCanDecrypt(listOf(secondEvent), bobSession, cryptoTestData.roomId, listOf("World")) + cryptoTestHelper.ensureCannotDecrypt(listOf(secondEvent), secondBobSession, cryptoTestData.roomId) + } + private suspend fun VerificationService.readOldVerificationCodeAsync(scope: CoroutineScope, userId: String): Deferred { return scope.async { suspendCancellableCoroutine { continuation -> diff --git a/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/crosssigning/XSigningTest.kt b/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/crosssigning/XSigningTest.kt index 2bb04a1faa..c4fb896934 100644 --- a/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/crosssigning/XSigningTest.kt +++ b/matrix-sdk-android/src/androidTest/java/org/matrix/android/sdk/internal/crypto/crosssigning/XSigningTest.kt @@ -25,7 +25,6 @@ import org.junit.Assert.assertNull import org.junit.Assert.assertTrue import org.junit.Assert.fail import org.junit.FixMethodOrder -import org.junit.Ignore import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.MethodSorters @@ -42,13 +41,13 @@ import org.matrix.android.sdk.common.CommonTestHelper.Companion.runCryptoTest import org.matrix.android.sdk.common.CommonTestHelper.Companion.runSessionTest import org.matrix.android.sdk.common.SessionTestParams import org.matrix.android.sdk.common.TestConstants +import timber.log.Timber import kotlin.coroutines.Continuation import kotlin.coroutines.resume @RunWith(AndroidJUnit4::class) @FixMethodOrder(MethodSorters.NAME_ASCENDING) @LargeTest -@Ignore class XSigningTest : InstrumentedTest { @Test @@ -214,4 +213,104 @@ class XSigningTest : InstrumentedTest { val result = aliceSession.cryptoService().crossSigningService().checkDeviceTrust(bobUserId, bobSecondDeviceId, null) assertTrue("Bob second device should be trusted from alice POV", result.isCrossSignedVerified()) } + + @Test + fun testWarnOnCrossSigningReset() = runCryptoTest(context()) { cryptoTestHelper, testHelper -> + val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom() + + val aliceSession = cryptoTestData.firstSession + val bobSession = cryptoTestData.secondSession + + val aliceAuthParams = UserPasswordAuth( + user = aliceSession.myUserId, + password = TestConstants.PASSWORD + ) + val bobAuthParams = UserPasswordAuth( + user = bobSession!!.myUserId, + password = TestConstants.PASSWORD + ) + + testHelper.waitForCallback { + aliceSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor { + override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation) { + promise.resume(aliceAuthParams) + } + }, it) + } + testHelper.waitForCallback { + bobSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor { + override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation) { + promise.resume(bobAuthParams) + } + }, it) + } + + cryptoTestHelper.verifySASCrossSign(aliceSession, bobSession, cryptoTestData.roomId) + + testHelper.retryPeriodically { + aliceSession.cryptoService().crossSigningService().isUserTrusted(bobSession.myUserId) + } + + testHelper.retryPeriodically { + aliceSession.cryptoService().crossSigningService().checkUserTrust(bobSession.myUserId).isVerified() + } + + aliceSession.cryptoService() + // Ensure also that bob device is trusted + testHelper.retryPeriodically { + val deviceInfo = aliceSession.cryptoService().getUserDevices(bobSession.myUserId).firstOrNull() + Timber.v("#TEST device:${deviceInfo?.shortDebugString()} trust ${deviceInfo?.trustLevel}") + deviceInfo?.trustLevel?.crossSigningVerified == true + } + + val currentBobMSK = aliceSession.cryptoService().crossSigningService() + .getUserCrossSigningKeys(bobSession.myUserId)!! + .masterKey()!!.unpaddedBase64PublicKey!! + + testHelper.waitForCallback { + bobSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor { + override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation) { + promise.resume(bobAuthParams) + } + }, it) + } + + testHelper.retryPeriodically { + val newBobMsk = aliceSession.cryptoService().crossSigningService() + .getUserCrossSigningKeys(bobSession.myUserId) + ?.masterKey()?.unpaddedBase64PublicKey + newBobMsk != null && newBobMsk != currentBobMSK + } + + // trick to force event to sync + bobSession.roomService().getRoom(cryptoTestData.roomId)!!.typingService().userIsTyping() + + // assert that bob is not trusted anymore from alice s + testHelper.retryPeriodically { + val trust = aliceSession.cryptoService().crossSigningService().checkUserTrust(bobSession.myUserId) + !trust.isVerified() + } + + // trick to force event to sync + bobSession.roomService().getRoom(cryptoTestData.roomId)!!.typingService().userStopsTyping() + bobSession.roomService().getRoom(cryptoTestData.roomId)!!.typingService().userIsTyping() + + testHelper.retryPeriodically { + val info = aliceSession.cryptoService().crossSigningService().getUserCrossSigningKeys(bobSession.myUserId) + info?.wasTrustedOnce == true + } + + // trick to force event to sync + bobSession.roomService().getRoom(cryptoTestData.roomId)!!.typingService().userStopsTyping() + bobSession.roomService().getRoom(cryptoTestData.roomId)!!.typingService().userIsTyping() + + testHelper.retryPeriodically { + !aliceSession.cryptoService().crossSigningService().isUserTrusted(bobSession.myUserId) + } + + // Ensure also that bob device are not trusted + testHelper.retryPeriodically { + aliceSession.cryptoService().getUserDevices(bobSession.myUserId).first().trustLevel?.crossSigningVerified != true + } + } } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/CryptoService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/CryptoService.kt index e0e662c789..d2aa8020e8 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/CryptoService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/CryptoService.kt @@ -61,6 +61,8 @@ interface CryptoService { fun isRoomBlacklistUnverifiedDevices(roomId: String?): Boolean + fun getLiveBlockUnverifiedDevices(roomId: String): LiveData + fun setWarnOnUnknownDevices(warn: Boolean) fun setDeviceVerification(trustLevel: DeviceTrustLevel, userId: String, deviceId: String) @@ -77,6 +79,8 @@ interface CryptoService { fun setGlobalBlacklistUnverifiedDevices(block: Boolean) + fun getLiveGlobalCryptoConfig(): LiveData + /** * Enable or disable key gossiping. * Default is true. @@ -100,7 +104,7 @@ interface CryptoService { */ fun isShareKeysOnInviteEnabled(): Boolean - fun setRoomUnBlacklistUnverifiedDevices(roomId: String) + fun setRoomUnBlockUnverifiedDevices(roomId: String) fun getDeviceTrackingStatus(userId: String): Int @@ -112,7 +116,7 @@ interface CryptoService { suspend fun exportRoomKeys(password: String): ByteArray - fun setRoomBlacklistUnverifiedDevices(roomId: String) + fun setRoomBlockUnverifiedDevices(roomId: String, block: Boolean) fun getCryptoDeviceInfo(userId: String, deviceId: String?): CryptoDeviceInfo? diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/GlobalCryptoConfig.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/GlobalCryptoConfig.kt new file mode 100644 index 0000000000..6405652a68 --- /dev/null +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/GlobalCryptoConfig.kt @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2022 The Matrix.org Foundation C.I.C. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.matrix.android.sdk.api.session.crypto + +data class GlobalCryptoConfig( + val globalBlockUnverifiedDevices: Boolean, + val globalEnableKeyGossiping: Boolean, + val enableKeyForwardingOnInvite: Boolean, +) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/crosssigning/MXCrossSigningInfo.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/crosssigning/MXCrossSigningInfo.kt index 9604decd62..30a2cfd719 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/crosssigning/MXCrossSigningInfo.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/crosssigning/MXCrossSigningInfo.kt @@ -18,7 +18,8 @@ package org.matrix.android.sdk.api.session.crypto.crosssigning data class MXCrossSigningInfo( val userId: String, - val crossSigningKeys: List + val crossSigningKeys: List, + val wasTrustedOnce: Boolean ) { fun isTrusted(): Boolean = masterKey()?.trustLevel?.isVerified() == true && diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/model/DeviceInfo.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/model/DeviceInfo.kt index b144069b99..500d016002 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/model/DeviceInfo.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/model/DeviceInfo.kt @@ -52,9 +52,17 @@ data class DeviceInfo( * The last ip address. */ @Json(name = "last_seen_ip") - val lastSeenIp: String? = null + val lastSeenIp: String? = null, + + @Json(name = "org.matrix.msc3852.last_seen_user_agent") + val unstableLastSeenUserAgent: String? = null, + + @Json(name = "last_seen_user_agent") + val lastSeenUserAgent: String? = null, ) : DatedObject { override val date: Long get() = lastSeenTs ?: 0 + + fun getBestLastSeenUserAgent() = lastSeenUserAgent ?: unstableLastSeenUserAgent } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/model/UserVerificationLevel.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/model/UserVerificationLevel.kt new file mode 100644 index 0000000000..e3c7057b6b --- /dev/null +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/crypto/model/UserVerificationLevel.kt @@ -0,0 +1,28 @@ +/* + * Copyright 2022 The Matrix.org Foundation C.I.C. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.matrix.android.sdk.api.session.crypto.model + +enum class UserVerificationLevel { + + VERIFIED_ALL_DEVICES_TRUSTED, + + VERIFIED_WITH_DEVICES_UNTRUSTED, + + UNVERIFIED_BUT_WAS_PREVIOUSLY, + + WAS_NEVER_VERIFIED, +} diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/events/model/EventType.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/events/model/EventType.kt index 84c25776e7..3ad4f3a87f 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/events/model/EventType.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/session/events/model/EventType.kt @@ -128,4 +128,17 @@ object EventType { type == CALL_REJECT || type == CALL_REPLACES } + + fun isVerificationEvent(type: String): Boolean { + return when (type) { + KEY_VERIFICATION_START, + KEY_VERIFICATION_ACCEPT, + KEY_VERIFICATION_KEY, + KEY_VERIFICATION_MAC, + KEY_VERIFICATION_CANCEL, + KEY_VERIFICATION_DONE, + KEY_VERIFICATION_READY -> true + else -> false + } + } } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DefaultCryptoService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DefaultCryptoService.kt index 901700cac6..9c3e0ba1c5 100755 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DefaultCryptoService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/DefaultCryptoService.kt @@ -40,6 +40,7 @@ import org.matrix.android.sdk.api.failure.Failure import org.matrix.android.sdk.api.listeners.ProgressListener import org.matrix.android.sdk.api.logger.LoggerTag import org.matrix.android.sdk.api.session.crypto.CryptoService +import org.matrix.android.sdk.api.session.crypto.GlobalCryptoConfig import org.matrix.android.sdk.api.session.crypto.MXCryptoError import org.matrix.android.sdk.api.session.crypto.NewSessionListener import org.matrix.android.sdk.api.session.crypto.OutgoingKeyRequest @@ -1163,6 +1164,10 @@ internal class DefaultCryptoService @Inject constructor( return cryptoStore.getGlobalBlacklistUnverifiedDevices() } + override fun getLiveGlobalCryptoConfig(): LiveData { + return cryptoStore.getLiveGlobalCryptoConfig() + } + /** * Tells whether the client should encrypt messages only for the verified devices * in this room. @@ -1171,39 +1176,28 @@ internal class DefaultCryptoService @Inject constructor( * @param roomId the room id * @return true if the client should encrypt messages only for the verified devices. */ -// TODO add this info in CryptoRoomEntity? override fun isRoomBlacklistUnverifiedDevices(roomId: String?): Boolean { - return roomId?.let { cryptoStore.getRoomsListBlacklistUnverifiedDevices().contains(it) } + return roomId?.let { cryptoStore.getBlockUnverifiedDevices(roomId) } ?: false } /** - * Manages the room black-listing for unverified devices. + * A live status regarding sharing keys for unverified devices in this room. * - * @param roomId the room id - * @param add true to add the room id to the list, false to remove it. + * @return Live status */ - private fun setRoomBlacklistUnverifiedDevices(roomId: String, add: Boolean) { - val roomIds = cryptoStore.getRoomsListBlacklistUnverifiedDevices().toMutableList() - - if (add) { - if (roomId !in roomIds) { - roomIds.add(roomId) - } - } else { - roomIds.remove(roomId) - } - - cryptoStore.setRoomsListBlacklistUnverifiedDevices(roomIds) + override fun getLiveBlockUnverifiedDevices(roomId: String): LiveData { + return cryptoStore.getLiveBlockUnverifiedDevices(roomId) } /** * Add this room to the ones which don't encrypt messages to unverified devices. * * @param roomId the room id + * @param block if true will block sending keys to unverified devices */ - override fun setRoomBlacklistUnverifiedDevices(roomId: String) { - setRoomBlacklistUnverifiedDevices(roomId, true) + override fun setRoomBlockUnverifiedDevices(roomId: String, block: Boolean) { + cryptoStore.blockUnverifiedDevicesInRoom(roomId, block) } /** @@ -1211,8 +1205,8 @@ internal class DefaultCryptoService @Inject constructor( * * @param roomId the room id */ - override fun setRoomUnBlacklistUnverifiedDevices(roomId: String) { - setRoomBlacklistUnverifiedDevices(roomId, false) + override fun setRoomUnBlockUnverifiedDevices(roomId: String) { + setRoomBlockUnverifiedDevices(roomId, false) } /** diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/algorithms/megolm/MXMegolmEncryption.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/algorithms/megolm/MXMegolmEncryption.kt index fca6fab66c..0b7af9f4d7 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/algorithms/megolm/MXMegolmEncryption.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/algorithms/megolm/MXMegolmEncryption.kt @@ -31,6 +31,8 @@ import org.matrix.android.sdk.api.session.events.model.Content import org.matrix.android.sdk.api.session.events.model.EventType import org.matrix.android.sdk.api.session.events.model.content.RoomKeyWithHeldContent import org.matrix.android.sdk.api.session.events.model.content.WithHeldCode +import org.matrix.android.sdk.api.session.room.model.message.MessageContent +import org.matrix.android.sdk.api.session.room.model.message.MessageType import org.matrix.android.sdk.internal.crypto.DeviceListManager import org.matrix.android.sdk.internal.crypto.InboundGroupSessionHolder import org.matrix.android.sdk.internal.crypto.MXOlmDevice @@ -92,7 +94,18 @@ internal class MXMegolmEncryption( ): Content { val ts = clock.epochMillis() Timber.tag(loggerTag.value).v("encryptEventContent : getDevicesInRoom") - val devices = getDevicesInRoom(userIds) + + /** + * When using in-room messages and the room has encryption enabled, + * clients should ensure that encryption does not hinder the verification. + * For example, if the verification messages are encrypted, clients must ensure that all the recipient’s + * unverified devices receive the keys necessary to decrypt the messages, + * even if they would normally not be given the keys to decrypt messages in the room. + */ + val shouldSendToUnverified = isVerificationEvent(eventType, eventContent) + + val devices = getDevicesInRoom(userIds, forceDistributeToUnverified = shouldSendToUnverified) + Timber.tag(loggerTag.value).d("encrypt event in room=$roomId - devices count in room ${devices.allowedDevices.toDebugCount()}") Timber.tag(loggerTag.value).v("encryptEventContent ${clock.epochMillis() - ts}: getDevicesInRoom ${devices.allowedDevices.toDebugString()}") val outboundSession = ensureOutboundSession(devices.allowedDevices) @@ -107,6 +120,11 @@ internal class MXMegolmEncryption( } } + private fun isVerificationEvent(eventType: String, eventContent: Content) = + EventType.isVerificationEvent(eventType) || + (eventType == EventType.MESSAGE && + eventContent.get(MessageContent.MSG_TYPE_JSON_KEY) == MessageType.MSGTYPE_VERIFICATION_REQUEST) + private fun notifyWithheldForSession(devices: MXUsersDevicesMap, outboundSession: MXOutboundSessionInfo) { // offload to computation thread cryptoCoroutineScope.launch(coroutineDispatchers.computation) { @@ -416,15 +434,17 @@ internal class MXMegolmEncryption( * This method must be called in getDecryptingThreadHandler() thread. * * @param userIds the user ids whose devices must be checked. + * @param forceDistributeToUnverified If true the unverified devices will be included in valid recipients even if + * such devices are blocked in crypto settings */ - private suspend fun getDevicesInRoom(userIds: List): DeviceInRoomInfo { + private suspend fun getDevicesInRoom(userIds: List, forceDistributeToUnverified: Boolean = false): DeviceInRoomInfo { // We are happy to use a cached version here: we assume that if we already // have a list of the user's devices, then we already share an e2e room // with them, which means that they will have announced any new devices via // an m.new_device. val keys = deviceListManager.downloadKeys(userIds, false) val encryptToVerifiedDevicesOnly = cryptoStore.getGlobalBlacklistUnverifiedDevices() || - cryptoStore.getRoomsListBlacklistUnverifiedDevices().contains(roomId) + cryptoStore.getBlockUnverifiedDevices(roomId) val devicesInRoom = DeviceInRoomInfo() val unknownDevices = MXUsersDevicesMap() @@ -444,7 +464,7 @@ internal class MXMegolmEncryption( continue } - if (!deviceInfo.isVerified && encryptToVerifiedDevicesOnly) { + if (!deviceInfo.isVerified && encryptToVerifiedDevicesOnly && !forceDistributeToUnverified) { devicesInRoom.withHeldDevices.setObject(userId, deviceId, WithHeldCode.UNVERIFIED) continue } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/crosssigning/DefaultCrossSigningService.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/crosssigning/DefaultCrossSigningService.kt index d405bdce27..f4796155c6 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/crosssigning/DefaultCrossSigningService.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/crosssigning/DefaultCrossSigningService.kt @@ -60,7 +60,7 @@ import javax.inject.Inject @SessionScope internal class DefaultCrossSigningService @Inject constructor( - @UserId private val userId: String, + @UserId private val myUserId: String, @SessionId private val sessionId: String, private val cryptoStore: IMXCryptoStore, private val deviceListManager: DeviceListManager, @@ -127,7 +127,7 @@ internal class DefaultCrossSigningService @Inject constructor( } // Recover local trust in case private key are there? - setUserKeysAsTrusted(userId, checkUserTrust(userId).isVerified()) + setUserKeysAsTrusted(myUserId, checkUserTrust(myUserId).isVerified()) } } catch (e: Throwable) { // Mmm this kind of a big issue @@ -167,9 +167,13 @@ internal class DefaultCrossSigningService @Inject constructor( } override fun onSuccess(data: InitializeCrossSigningTask.Result) { - val crossSigningInfo = MXCrossSigningInfo(userId, listOf(data.masterKeyInfo, data.userKeyInfo, data.selfSignedKeyInfo)) + val crossSigningInfo = MXCrossSigningInfo( + myUserId, + listOf(data.masterKeyInfo, data.userKeyInfo, data.selfSignedKeyInfo), + true + ) cryptoStore.setMyCrossSigningInfo(crossSigningInfo) - setUserKeysAsTrusted(userId, true) + setUserKeysAsTrusted(myUserId, true) cryptoStore.storePrivateKeysInfo(data.masterKeyPK, data.userKeyPK, data.selfSigningKeyPK) crossSigningOlm.masterPkSigning = OlmPkSigning().apply { initWithSeed(data.masterKeyPK.fromBase64()) } crossSigningOlm.userPkSigning = OlmPkSigning().apply { initWithSeed(data.userKeyPK.fromBase64()) } @@ -266,7 +270,7 @@ internal class DefaultCrossSigningService @Inject constructor( uskKeyPrivateKey: String?, sskPrivateKey: String? ): UserTrustResult { - val mxCrossSigningInfo = getMyCrossSigningKeys() ?: return UserTrustResult.CrossSigningNotConfigured(userId) + val mxCrossSigningInfo = getMyCrossSigningKeys() ?: return UserTrustResult.CrossSigningNotConfigured(myUserId) var masterKeyIsTrusted = false var userKeyIsTrusted = false @@ -330,7 +334,7 @@ internal class DefaultCrossSigningService @Inject constructor( val checkSelfTrust = checkSelfTrust() if (checkSelfTrust.isVerified()) { cryptoStore.storePrivateKeysInfo(masterKeyPrivateKey, uskKeyPrivateKey, sskPrivateKey) - setUserKeysAsTrusted(userId, true) + setUserKeysAsTrusted(myUserId, true) } return checkSelfTrust } @@ -351,7 +355,7 @@ internal class DefaultCrossSigningService @Inject constructor( * . */ override fun isUserTrusted(otherUserId: String): Boolean { - return cryptoStore.getCrossSigningInfo(userId)?.isTrusted() == true + return cryptoStore.getCrossSigningInfo(otherUserId)?.isTrusted() == true } override fun isCrossSigningVerified(): Boolean { @@ -363,7 +367,7 @@ internal class DefaultCrossSigningService @Inject constructor( */ override fun checkUserTrust(otherUserId: String): UserTrustResult { Timber.v("## CrossSigning checkUserTrust for $otherUserId") - if (otherUserId == userId) { + if (otherUserId == myUserId) { return checkSelfTrust() } // I trust a user if I trust his master key @@ -371,16 +375,14 @@ internal class DefaultCrossSigningService @Inject constructor( // TODO what if the master key is signed by a device key that i have verified // First let's get my user key - val myCrossSigningInfo = cryptoStore.getCrossSigningInfo(userId) + val myCrossSigningInfo = cryptoStore.getCrossSigningInfo(myUserId) - checkOtherMSKTrusted(myCrossSigningInfo, cryptoStore.getCrossSigningInfo(otherUserId)) - - return UserTrustResult.Success + return checkOtherMSKTrusted(myCrossSigningInfo, cryptoStore.getCrossSigningInfo(otherUserId)) } fun checkOtherMSKTrusted(myCrossSigningInfo: MXCrossSigningInfo?, otherInfo: MXCrossSigningInfo?): UserTrustResult { val myUserKey = myCrossSigningInfo?.userKey() - ?: return UserTrustResult.CrossSigningNotConfigured(userId) + ?: return UserTrustResult.CrossSigningNotConfigured(myUserId) if (!myCrossSigningInfo.isTrusted()) { return UserTrustResult.KeysNotTrusted(myCrossSigningInfo) @@ -391,7 +393,7 @@ internal class DefaultCrossSigningService @Inject constructor( ?: return UserTrustResult.UnknownCrossSignatureInfo(otherInfo?.userId ?: "") val masterKeySignaturesMadeByMyUserKey = otherMasterKey.signatures - ?.get(userId) // Signatures made by me + ?.get(myUserId) // Signatures made by me ?.get("ed25519:${myUserKey.unpaddedBase64PublicKey}") if (masterKeySignaturesMadeByMyUserKey.isNullOrBlank()) { @@ -417,9 +419,9 @@ internal class DefaultCrossSigningService @Inject constructor( // Special case when it's me, // I have to check that MSK -> USK -> SSK // and that MSK is trusted (i know the private key, or is signed by a trusted device) - val myCrossSigningInfo = cryptoStore.getCrossSigningInfo(userId) + val myCrossSigningInfo = cryptoStore.getCrossSigningInfo(myUserId) - return checkSelfTrust(myCrossSigningInfo, cryptoStore.getUserDeviceList(userId)) + return checkSelfTrust(myCrossSigningInfo, cryptoStore.getUserDeviceList(myUserId)) } fun checkSelfTrust(myCrossSigningInfo: MXCrossSigningInfo?, myDevices: List?): UserTrustResult { @@ -429,7 +431,7 @@ internal class DefaultCrossSigningService @Inject constructor( // val myCrossSigningInfo = cryptoStore.getCrossSigningInfo(userId) val myMasterKey = myCrossSigningInfo?.masterKey() - ?: return UserTrustResult.CrossSigningNotConfigured(userId) + ?: return UserTrustResult.CrossSigningNotConfigured(myUserId) // Is the master key trusted // 1) check if I know the private key @@ -453,7 +455,7 @@ internal class DefaultCrossSigningService @Inject constructor( olmPkSigning?.releaseSigning() } else { // Maybe it's signed by a locally trusted device? - myMasterKey.signatures?.get(userId)?.forEach { (key, value) -> + myMasterKey.signatures?.get(myUserId)?.forEach { (key, value) -> val potentialDeviceId = key.removePrefix("ed25519:") val potentialDevice = myDevices?.firstOrNull { it.deviceId == potentialDeviceId } // cryptoStore.getUserDevice(userId, potentialDeviceId) if (potentialDevice != null && potentialDevice.isVerified) { @@ -475,14 +477,14 @@ internal class DefaultCrossSigningService @Inject constructor( } val myUserKey = myCrossSigningInfo.userKey() - ?: return UserTrustResult.CrossSigningNotConfigured(userId) + ?: return UserTrustResult.CrossSigningNotConfigured(myUserId) val userKeySignaturesMadeByMyMasterKey = myUserKey.signatures - ?.get(userId) // Signatures made by me + ?.get(myUserId) // Signatures made by me ?.get("ed25519:${myMasterKey.unpaddedBase64PublicKey}") if (userKeySignaturesMadeByMyMasterKey.isNullOrBlank()) { - Timber.d("## CrossSigning checkUserTrust false for $userId, USK not signed by MSK") + Timber.d("## CrossSigning checkUserTrust false for $myUserId, USK not signed by MSK") return UserTrustResult.KeyNotSigned(myUserKey) } @@ -498,14 +500,14 @@ internal class DefaultCrossSigningService @Inject constructor( } val mySSKey = myCrossSigningInfo.selfSigningKey() - ?: return UserTrustResult.CrossSigningNotConfigured(userId) + ?: return UserTrustResult.CrossSigningNotConfigured(myUserId) val ssKeySignaturesMadeByMyMasterKey = mySSKey.signatures - ?.get(userId) // Signatures made by me + ?.get(myUserId) // Signatures made by me ?.get("ed25519:${myMasterKey.unpaddedBase64PublicKey}") if (ssKeySignaturesMadeByMyMasterKey.isNullOrBlank()) { - Timber.d("## CrossSigning checkUserTrust false for $userId, SSK not signed by MSK") + Timber.d("## CrossSigning checkUserTrust false for $myUserId, SSK not signed by MSK") return UserTrustResult.KeyNotSigned(mySSKey) } @@ -555,14 +557,14 @@ internal class DefaultCrossSigningService @Inject constructor( override fun trustUser(otherUserId: String, callback: MatrixCallback) { cryptoCoroutineScope.launch(coroutineDispatchers.crypto) { - Timber.d("## CrossSigning - Mark user $userId as trusted ") + Timber.d("## CrossSigning - Mark user $otherUserId as trusted ") // We should have this user keys val otherMasterKeys = getUserCrossSigningKeys(otherUserId)?.masterKey() if (otherMasterKeys == null) { callback.onFailure(Throwable("## CrossSigning - Other master signing key is not known")) return@launch } - val myKeys = getUserCrossSigningKeys(userId) + val myKeys = getUserCrossSigningKeys(myUserId) if (myKeys == null) { callback.onFailure(Throwable("## CrossSigning - CrossSigning is not setup for this account")) return@launch @@ -586,16 +588,22 @@ internal class DefaultCrossSigningService @Inject constructor( } cryptoStore.setUserKeysAsTrusted(otherUserId, true) - // TODO update local copy with new signature directly here? kind of local echo of trust? - Timber.d("## CrossSigning - Upload signature of $userId MSK signed by USK") + Timber.d("## CrossSigning - Upload signature of $otherUserId MSK signed by USK") val uploadQuery = UploadSignatureQueryBuilder() - .withSigningKeyInfo(otherMasterKeys.copyForSignature(userId, userPubKey, newSignature)) + .withSigningKeyInfo(otherMasterKeys.copyForSignature(myUserId, userPubKey, newSignature)) .build() uploadSignaturesTask.configureWith(UploadSignaturesTask.Params(uploadQuery)) { this.executionThread = TaskThread.CRYPTO this.callback = callback }.executeBy(taskExecutor) + + // Local echo for device cross trust, to avoid having to wait for a notification of key change + cryptoStore.getUserDeviceList(otherUserId)?.forEach { device -> + val updatedTrust = checkDeviceTrust(device.userId, device.deviceId, device.trustLevel?.isLocallyVerified() ?: false) + Timber.v("## CrossSigning - update trust for device ${device.deviceId} of user $otherUserId , verified=$updatedTrust") + cryptoStore.setDeviceTrust(device.userId, device.deviceId, updatedTrust.isCrossSignedVerified(), updatedTrust.isLocallyVerified()) + } } } @@ -604,20 +612,20 @@ internal class DefaultCrossSigningService @Inject constructor( cryptoStore.markMyMasterKeyAsLocallyTrusted(true) checkSelfTrust() // re-verify all trusts - onUsersDeviceUpdate(listOf(userId)) + onUsersDeviceUpdate(listOf(myUserId)) } } override fun trustDevice(deviceId: String, callback: MatrixCallback) { cryptoCoroutineScope.launch(coroutineDispatchers.crypto) { // This device should be yours - val device = cryptoStore.getUserDevice(userId, deviceId) + val device = cryptoStore.getUserDevice(myUserId, deviceId) if (device == null) { callback.onFailure(IllegalArgumentException("This device [$deviceId] is not known, or not yours")) return@launch } - val myKeys = getUserCrossSigningKeys(userId) + val myKeys = getUserCrossSigningKeys(myUserId) if (myKeys == null) { callback.onFailure(Throwable("CrossSigning is not setup for this account")) return@launch @@ -639,7 +647,7 @@ internal class DefaultCrossSigningService @Inject constructor( } val toUpload = device.copy( signatures = mapOf( - userId + myUserId to mapOf( "ed25519:$ssPubKey" to newSignature @@ -661,8 +669,8 @@ internal class DefaultCrossSigningService @Inject constructor( val otherDevice = cryptoStore.getUserDevice(otherUserId, otherDeviceId) ?: return DeviceTrustResult.UnknownDevice(otherDeviceId) - val myKeys = getUserCrossSigningKeys(userId) - ?: return legacyFallbackTrust(locallyTrusted, DeviceTrustResult.CrossSigningNotConfigured(userId)) + val myKeys = getUserCrossSigningKeys(myUserId) + ?: return legacyFallbackTrust(locallyTrusted, DeviceTrustResult.CrossSigningNotConfigured(myUserId)) if (!myKeys.isTrusted()) return legacyFallbackTrust(locallyTrusted, DeviceTrustResult.KeysNotTrusted(myKeys)) @@ -717,7 +725,7 @@ internal class DefaultCrossSigningService @Inject constructor( fun checkDeviceTrust(myKeys: MXCrossSigningInfo?, otherKeys: MXCrossSigningInfo?, otherDevice: CryptoDeviceInfo): DeviceTrustResult { val locallyTrusted = otherDevice.trustLevel?.isLocallyVerified() - myKeys ?: return legacyFallbackTrust(locallyTrusted, DeviceTrustResult.CrossSigningNotConfigured(userId)) + myKeys ?: return legacyFallbackTrust(locallyTrusted, DeviceTrustResult.CrossSigningNotConfigured(myUserId)) if (!myKeys.isTrusted()) return legacyFallbackTrust(locallyTrusted, DeviceTrustResult.KeysNotTrusted(myKeys)) @@ -805,7 +813,7 @@ internal class DefaultCrossSigningService @Inject constructor( cryptoStore.setUserKeysAsTrusted(otherUserId, trusted) // If it's me, recheck trust of all users and devices? val users = ArrayList() - if (otherUserId == userId && currentTrust != trusted) { + if (otherUserId == myUserId && currentTrust != trusted) { // notify key requester outgoingKeyRequestManager.onSelfCrossSigningTrustChanged(trusted) cryptoStore.updateUsersTrust { diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/crosssigning/UpdateTrustWorker.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/crosssigning/UpdateTrustWorker.kt index 6d845ec59e..fffc6707d7 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/crosssigning/UpdateTrustWorker.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/crosssigning/UpdateTrustWorker.kt @@ -161,6 +161,7 @@ internal class UpdateTrustWorker(context: Context, params: WorkerParameters, ses // i have all the new trusts, update DB trusts.forEach { val verified = it.value?.isVerified() == true + Timber.v("[$myUserId] ## CrossSigning - Updating user trust: ${it.key} to $verified") updateCrossSigningKeysTrust(cryptoRealm, it.key, verified) } @@ -259,21 +260,27 @@ internal class UpdateTrustWorker(context: Context, params: WorkerParameters, ses cryptoRealm.where(CrossSigningInfoEntity::class.java) .equalTo(CrossSigningInfoEntityFields.USER_ID, userId) .findFirst() - ?.crossSigningKeys - ?.forEach { info -> - // optimization to avoid trigger updates when there is no change.. - if (info.trustLevelEntity?.isVerified() != verified) { - Timber.d("## CrossSigning - Trust change for $userId : $verified") - val level = info.trustLevelEntity - if (level == null) { - info.trustLevelEntity = cryptoRealm.createObject(TrustLevelEntity::class.java).also { - it.locallyVerified = verified - it.crossSignedVerified = verified + ?.let { userKeyInfo -> + userKeyInfo + .crossSigningKeys + .forEach { key -> + // optimization to avoid trigger updates when there is no change.. + if (key.trustLevelEntity?.isVerified() != verified) { + Timber.d("## CrossSigning - Trust change for $userId : $verified") + val level = key.trustLevelEntity + if (level == null) { + key.trustLevelEntity = cryptoRealm.createObject(TrustLevelEntity::class.java).also { + it.locallyVerified = verified + it.crossSignedVerified = verified + } + } else { + level.locallyVerified = verified + level.crossSignedVerified = verified + } + } } - } else { - level.locallyVerified = verified - level.crossSignedVerified = verified - } + if (verified) { + userKeyInfo.wasUserVerifiedOnce = true } } } @@ -299,8 +306,18 @@ internal class UpdateTrustWorker(context: Context, params: WorkerParameters, ses getCrossSigningInfo(cryptoRealm, userId)?.isTrusted() == true } + val resetTrust = listToCheck + .filter { userId -> + val crossSigningInfo = getCrossSigningInfo(cryptoRealm, userId) + crossSigningInfo?.isTrusted() != true && crossSigningInfo?.wasTrustedOnce == true + } + return if (allTrustedUserIds.isEmpty()) { - RoomEncryptionTrustLevel.Default + if (resetTrust.isEmpty()) { + RoomEncryptionTrustLevel.Default + } else { + RoomEncryptionTrustLevel.Warning + } } else { // If one of the verified user as an untrusted device -> warning // If all devices of all verified users are trusted -> green @@ -327,11 +344,15 @@ internal class UpdateTrustWorker(context: Context, params: WorkerParameters, ses if (hasWarning) { RoomEncryptionTrustLevel.Warning } else { - if (listToCheck.size == allTrustedUserIds.size) { - // all users are trusted and all devices are verified - RoomEncryptionTrustLevel.Trusted + if (resetTrust.isEmpty()) { + if (listToCheck.size == allTrustedUserIds.size) { + // all users are trusted and all devices are verified + RoomEncryptionTrustLevel.Trusted + } else { + RoomEncryptionTrustLevel.Default + } } else { - RoomEncryptionTrustLevel.Default + RoomEncryptionTrustLevel.Warning } } } @@ -344,7 +365,8 @@ internal class UpdateTrustWorker(context: Context, params: WorkerParameters, ses userId = userId, crossSigningKeys = xsignInfo.crossSigningKeys.mapNotNull { crossSigningKeysMapper.map(userId, it) - } + }, + wasTrustedOnce = xsignInfo.wasUserVerifiedOnce ) } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/IMXCryptoStore.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/IMXCryptoStore.kt index 56eba25249..21e3342365 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/IMXCryptoStore.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/IMXCryptoStore.kt @@ -18,6 +18,7 @@ package org.matrix.android.sdk.internal.crypto.store import androidx.lifecycle.LiveData import androidx.paging.PagedList +import org.matrix.android.sdk.api.session.crypto.GlobalCryptoConfig import org.matrix.android.sdk.api.session.crypto.NewSessionListener import org.matrix.android.sdk.api.session.crypto.OutgoingKeyRequest import org.matrix.android.sdk.api.session.crypto.OutgoingRoomKeyRequestState @@ -120,11 +121,26 @@ internal interface IMXCryptoStore { fun getRoomsListBlacklistUnverifiedDevices(): List /** - * Updates the rooms ids list in which the messages are not encrypted for the unverified devices. + * A live status regarding sharing keys for unverified devices in this room. * - * @param roomIds the room ids list + * @return Live status */ - fun setRoomsListBlacklistUnverifiedDevices(roomIds: List) + fun getLiveBlockUnverifiedDevices(roomId: String): LiveData + + /** + * Tell if unverified devices should be blacklisted when sending keys. + * + * @return true if should not send keys to unverified devices + */ + fun getBlockUnverifiedDevices(roomId: String): Boolean + + /** + * Define if encryption keys should be sent to unverified devices in this room. + * + * @param roomId the roomId + * @param block if true will not send keys to unverified devices + */ + fun blockUnverifiedDevicesInRoom(roomId: String, block: Boolean) /** * Get the current keys backup version. @@ -516,6 +532,9 @@ internal interface IMXCryptoStore { fun getCrossSigningPrivateKeys(): PrivateKeysInfo? fun getLiveCrossSigningPrivateKeys(): LiveData> + fun getGlobalCryptoConfig(): GlobalCryptoConfig + fun getLiveGlobalCryptoConfig(): LiveData + fun saveBackupRecoveryKey(recoveryKey: String?, version: String?) fun getKeyBackupRecoveryKeyInfo(): SavedKeyBackupKeyInfo? diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStore.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStore.kt index 3b8fa4cacd..e97cf437c6 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStore.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStore.kt @@ -29,6 +29,7 @@ import io.realm.kotlin.where import org.matrix.android.sdk.api.crypto.MXCRYPTO_ALGORITHM_MEGOLM import org.matrix.android.sdk.api.extensions.tryOrNull import org.matrix.android.sdk.api.logger.LoggerTag +import org.matrix.android.sdk.api.session.crypto.GlobalCryptoConfig import org.matrix.android.sdk.api.session.crypto.NewSessionListener import org.matrix.android.sdk.api.session.crypto.OutgoingKeyRequest import org.matrix.android.sdk.api.session.crypto.OutgoingRoomKeyRequestState @@ -445,6 +446,38 @@ internal class RealmCryptoStore @Inject constructor( } } + override fun getGlobalCryptoConfig(): GlobalCryptoConfig { + return doWithRealm(realmConfiguration) { realm -> + realm.where().findFirst() + ?.let { + GlobalCryptoConfig( + globalBlockUnverifiedDevices = it.globalBlacklistUnverifiedDevices, + globalEnableKeyGossiping = it.globalEnableKeyGossiping, + enableKeyForwardingOnInvite = it.enableKeyForwardingOnInvite + ) + } ?: GlobalCryptoConfig(false, false, false) + } + } + + override fun getLiveGlobalCryptoConfig(): LiveData { + val liveData = monarchy.findAllMappedWithChanges( + { realm: Realm -> + realm + .where() + }, + { + GlobalCryptoConfig( + globalBlockUnverifiedDevices = it.globalBlacklistUnverifiedDevices, + globalEnableKeyGossiping = it.globalEnableKeyGossiping, + enableKeyForwardingOnInvite = it.enableKeyForwardingOnInvite + ) + } + ) + return Transformations.map(liveData) { + it.firstOrNull() ?: GlobalCryptoConfig(false, false, false) + } + } + override fun storePrivateKeysInfo(msk: String?, usk: String?, ssk: String?) { Timber.v("## CRYPTO | *** storePrivateKeysInfo ${msk != null}, ${usk != null}, ${ssk != null}") doRealmTransaction(realmConfiguration) { realm -> @@ -1053,25 +1086,6 @@ internal class RealmCryptoStore @Inject constructor( } ?: false } - override fun setRoomsListBlacklistUnverifiedDevices(roomIds: List) { - doRealmTransaction(realmConfiguration) { - // Reset all - it.where() - .findAll() - .forEach { room -> - room.blacklistUnverifiedDevices = false - } - - // Enable those in the list - it.where() - .`in`(CryptoRoomEntityFields.ROOM_ID, roomIds.toTypedArray()) - .findAll() - .forEach { room -> - room.blacklistUnverifiedDevices = true - } - } - } - override fun getRoomsListBlacklistUnverifiedDevices(): List { return doWithRealm(realmConfiguration) { it.where() @@ -1083,6 +1097,37 @@ internal class RealmCryptoStore @Inject constructor( } } + override fun getLiveBlockUnverifiedDevices(roomId: String): LiveData { + val liveData = monarchy.findAllMappedWithChanges( + { realm: Realm -> + realm.where() + .equalTo(CryptoRoomEntityFields.ROOM_ID, roomId) + }, + { + it.blacklistUnverifiedDevices + } + ) + return Transformations.map(liveData) { + it.firstOrNull() ?: false + } + } + + override fun getBlockUnverifiedDevices(roomId: String): Boolean { + return doWithRealm(realmConfiguration) { realm -> + realm.where() + .equalTo(CryptoRoomEntityFields.ROOM_ID, roomId) + .findFirst() + ?.blacklistUnverifiedDevices ?: false + } + } + + override fun blockUnverifiedDevicesInRoom(roomId: String, block: Boolean) { + doRealmTransaction(realmConfiguration) { realm -> + CryptoRoomEntity.getById(realm, roomId) + ?.blacklistUnverifiedDevices = block + } + } + override fun getDeviceTrackingStatuses(): Map { return doWithRealm(realmConfiguration) { it.where() @@ -1611,7 +1656,8 @@ internal class RealmCryptoStore @Inject constructor( userId = userId, crossSigningKeys = xsignInfo.crossSigningKeys.mapNotNull { crossSigningKeysMapper.map(userId, it) - } + }, + wasTrustedOnce = xsignInfo.wasUserVerifiedOnce ) } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStoreMigration.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStoreMigration.kt index 426d50a54f..de2b74308d 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStoreMigration.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/RealmCryptoStoreMigration.kt @@ -35,6 +35,7 @@ import org.matrix.android.sdk.internal.crypto.store.db.migration.MigrateCryptoTo import org.matrix.android.sdk.internal.crypto.store.db.migration.MigrateCryptoTo016 import org.matrix.android.sdk.internal.crypto.store.db.migration.MigrateCryptoTo017 import org.matrix.android.sdk.internal.crypto.store.db.migration.MigrateCryptoTo018 +import org.matrix.android.sdk.internal.crypto.store.db.migration.MigrateCryptoTo019 import org.matrix.android.sdk.internal.util.database.MatrixRealmMigration import org.matrix.android.sdk.internal.util.time.Clock import javax.inject.Inject @@ -49,7 +50,7 @@ internal class RealmCryptoStoreMigration @Inject constructor( private val clock: Clock, ) : MatrixRealmMigration( dbName = "Crypto", - schemaVersion = 18L, + schemaVersion = 19L, ) { /** * Forces all RealmCryptoStoreMigration instances to be equal. @@ -77,5 +78,6 @@ internal class RealmCryptoStoreMigration @Inject constructor( if (oldVersion < 16) MigrateCryptoTo016(realm).perform() if (oldVersion < 17) MigrateCryptoTo017(realm).perform() if (oldVersion < 18) MigrateCryptoTo018(realm).perform() + if (oldVersion < 19) MigrateCryptoTo019(realm).perform() } } diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/migration/MigrateCryptoTo019.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/migration/MigrateCryptoTo019.kt new file mode 100644 index 0000000000..9d2eb60a60 --- /dev/null +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/migration/MigrateCryptoTo019.kt @@ -0,0 +1,59 @@ +/* + * Copyright (c) 2022 The Matrix.org Foundation C.I.C. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.matrix.android.sdk.internal.crypto.store.db.migration + +import io.realm.DynamicRealm +import io.realm.DynamicRealmObject +import org.matrix.android.sdk.api.session.crypto.crosssigning.KeyUsage +import org.matrix.android.sdk.internal.crypto.store.db.model.CrossSigningInfoEntityFields +import org.matrix.android.sdk.internal.crypto.store.db.model.KeyInfoEntityFields +import org.matrix.android.sdk.internal.crypto.store.db.model.TrustLevelEntityFields +import org.matrix.android.sdk.internal.util.database.RealmMigrator + +/** + * This migration is adding support for trusted flags on megolm sessions. + * We can't really assert the trust of existing keys, so for the sake of simplicity we are going to + * mark existing keys as safe. + * This migration can take long depending on the account + */ +internal class MigrateCryptoTo019(realm: DynamicRealm) : RealmMigrator(realm, 18) { + + override fun doMigrate(realm: DynamicRealm) { + realm.schema.get("CrossSigningInfoEntity") + ?.addField(CrossSigningInfoEntityFields.WAS_USER_VERIFIED_ONCE, Boolean::class.java) + ?.transform { dynamicObject -> + + val knowKeys = dynamicObject.getList(CrossSigningInfoEntityFields.CROSS_SIGNING_KEYS.`$`) + val msk = knowKeys.firstOrNull { + it.getList(KeyInfoEntityFields.USAGES.`$`, String::class.java).orEmpty().contains(KeyUsage.MASTER.value) + } + val ssk = knowKeys.firstOrNull { + it.getList(KeyInfoEntityFields.USAGES.`$`, String::class.java).orEmpty().contains(KeyUsage.SELF_SIGNING.value) + } + val isTrusted = isDynamicKeyInfoTrusted(msk?.get(KeyInfoEntityFields.TRUST_LEVEL_ENTITY.`$`)) && + isDynamicKeyInfoTrusted(ssk?.get(KeyInfoEntityFields.TRUST_LEVEL_ENTITY.`$`)) + + dynamicObject.setBoolean(CrossSigningInfoEntityFields.WAS_USER_VERIFIED_ONCE, isTrusted) + } + } + + private fun isDynamicKeyInfoTrusted(keyInfo: DynamicRealmObject?): Boolean { + if (keyInfo == null) return false + return !keyInfo.isNull(TrustLevelEntityFields.CROSS_SIGNED_VERIFIED) && keyInfo.getBoolean(TrustLevelEntityFields.CROSS_SIGNED_VERIFIED) && + !keyInfo.isNull(TrustLevelEntityFields.LOCALLY_VERIFIED) && keyInfo.getBoolean(TrustLevelEntityFields.LOCALLY_VERIFIED) + } +} diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/model/CrossSigningInfoEntity.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/model/CrossSigningInfoEntity.kt index 5aba9bb9ba..033b7662c5 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/model/CrossSigningInfoEntity.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/crypto/store/db/model/CrossSigningInfoEntity.kt @@ -25,6 +25,7 @@ import org.matrix.android.sdk.internal.extensions.clearWith internal open class CrossSigningInfoEntity( @PrimaryKey var userId: String? = null, + var wasUserVerifiedOnce: Boolean = false, var crossSigningKeys: RealmList = RealmList() ) : RealmObject() { diff --git a/tools/danger/dangerfile.js b/tools/danger/dangerfile.js index 6314ec8f68..1a36474470 100644 --- a/tools/danger/dangerfile.js +++ b/tools/danger/dangerfile.js @@ -70,6 +70,7 @@ const signOff = "Signed-off-by:" // Please add new names following the alphabetical order. const allowList = [ + "amitkma", "aringenbach", "BillCarsonFr", "bmarty", diff --git a/vector-app/build.gradle b/vector-app/build.gradle index a4bc105a1d..7dcd6a648e 100644 --- a/vector-app/build.gradle +++ b/vector-app/build.gradle @@ -410,7 +410,7 @@ dependencies { androidTestImplementation libs.mockk.mockkAndroid androidTestUtil libs.androidx.orchestrator androidTestImplementation libs.androidx.fragmentTesting - androidTestImplementation "org.jetbrains.kotlin:kotlin-reflect:1.7.10" + androidTestImplementation "org.jetbrains.kotlin:kotlin-reflect:1.7.20" debugImplementation libs.androidx.fragmentTesting debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.9.1' } diff --git a/vector-app/src/androidTest/java/im/vector/app/ui/robot/RoomSettingsRobot.kt b/vector-app/src/androidTest/java/im/vector/app/ui/robot/RoomSettingsRobot.kt index 2c57dd058d..62c34e1b66 100644 --- a/vector-app/src/androidTest/java/im/vector/app/ui/robot/RoomSettingsRobot.kt +++ b/vector-app/src/androidTest/java/im/vector/app/ui/robot/RoomSettingsRobot.kt @@ -34,18 +34,18 @@ class RoomSettingsRobot { fun crawl() { // Room settings - clickListItem(R.id.matrixProfileRecyclerView, 3) + clickListItem(R.id.matrixProfileRecyclerView, 4) navigateToRoomParameters() pressBack() // Notifications - clickListItem(R.id.matrixProfileRecyclerView, 5) + clickListItem(R.id.matrixProfileRecyclerView, 6) pressBack() assertDisplayed(R.id.roomProfileAvatarView) // People - clickListItem(R.id.matrixProfileRecyclerView, 7) + clickListItem(R.id.matrixProfileRecyclerView, 8) assertDisplayed(R.id.inviteUsersButton) navigateToRoomPeople() // Fab @@ -56,7 +56,7 @@ class RoomSettingsRobot { assertDisplayed(R.id.roomProfileAvatarView) // Uploads - clickListItem(R.id.matrixProfileRecyclerView, 9) + clickListItem(R.id.matrixProfileRecyclerView, 10) // File tab clickOn(R.string.uploads_files_title) waitUntilViewVisible(withText(R.string.uploads_media_title)) @@ -73,12 +73,12 @@ class RoomSettingsRobot { // Advanced // Room addresses - clickListItem(R.id.matrixProfileRecyclerView, 15) + clickListItem(R.id.matrixProfileRecyclerView, 16) waitUntilViewVisible(withText(R.string.room_alias_published_alias_title)) pressBack() // Room permissions - clickListItem(R.id.matrixProfileRecyclerView, 17) + clickListItem(R.id.matrixProfileRecyclerView, 18) waitUntilViewVisible(withText(R.string.room_permissions_change_room_avatar)) clickOn(R.string.room_permissions_change_room_avatar) waitUntilDialogVisible(withId(android.R.id.button2)) @@ -95,7 +95,7 @@ class RoomSettingsRobot { } private fun leaveRoom(block: DialogRobot.() -> Unit) { - clickListItem(R.id.matrixProfileRecyclerView, 13) + clickListItem(R.id.matrixProfileRecyclerView, 14) waitUntilDialogVisible(withId(android.R.id.button2)) val dialogRobot = DialogRobot() block(dialogRobot) diff --git a/vector-app/src/debug/java/im/vector/app/features/debug/features/DebugFeaturesStateFactory.kt b/vector-app/src/debug/java/im/vector/app/features/debug/features/DebugFeaturesStateFactory.kt index 9118dea1e3..b927d66b69 100644 --- a/vector-app/src/debug/java/im/vector/app/features/debug/features/DebugFeaturesStateFactory.kt +++ b/vector-app/src/debug/java/im/vector/app/features/debug/features/DebugFeaturesStateFactory.kt @@ -90,6 +90,11 @@ class DebugFeaturesStateFactory @Inject constructor( key = DebugFeatureKeys.newDeviceManagementEnabled, factory = VectorFeatures::isNewDeviceManagementEnabled ), + createBooleanFeature( + label = "Enable Voice Broadcast", + key = DebugFeatureKeys.voiceBroadcastEnabled, + factory = VectorFeatures::isVoiceBroadcastEnabled + ), ) ) } diff --git a/vector-app/src/debug/java/im/vector/app/features/debug/features/DebugVectorFeatures.kt b/vector-app/src/debug/java/im/vector/app/features/debug/features/DebugVectorFeatures.kt index c01c058fc6..c347accfc3 100644 --- a/vector-app/src/debug/java/im/vector/app/features/debug/features/DebugVectorFeatures.kt +++ b/vector-app/src/debug/java/im/vector/app/features/debug/features/DebugVectorFeatures.kt @@ -79,6 +79,9 @@ class DebugVectorFeatures( override fun isNewDeviceManagementEnabled(): Boolean = read(DebugFeatureKeys.newDeviceManagementEnabled) ?: vectorFeatures.isNewDeviceManagementEnabled() + override fun isVoiceBroadcastEnabled(): Boolean = read(DebugFeatureKeys.voiceBroadcastEnabled) + ?: vectorFeatures.isVoiceBroadcastEnabled() + fun override(value: T?, key: Preferences.Key) = updatePreferences { if (value == null) { it.remove(key) @@ -140,4 +143,5 @@ object DebugFeatureKeys { val startDmOnFirstMsg = booleanPreferencesKey("start-dm-on-first-msg") val newAppLayoutEnabled = booleanPreferencesKey("new-app-layout-enabled") val newDeviceManagementEnabled = booleanPreferencesKey("new-device-management-enabled") + val voiceBroadcastEnabled = booleanPreferencesKey("voice-broadcast-enabled") } diff --git a/vector-config/src/main/java/im/vector/app/config/Analytics.kt b/vector-config/src/main/java/im/vector/app/config/Analytics.kt index 7fdc78dc8a..d944a84f94 100644 --- a/vector-config/src/main/java/im/vector/app/config/Analytics.kt +++ b/vector-config/src/main/java/im/vector/app/config/Analytics.kt @@ -27,9 +27,9 @@ sealed interface Analytics { object Disabled : Analytics /** - * Analytics integration via PostHog. + * Analytics integration via PostHog and Sentry. */ - data class PostHog( + data class Enabled( /** * The PostHog instance url. */ @@ -44,5 +44,15 @@ sealed interface Analytics { * A URL to more information about the analytics collection. */ val policyLink: String, + + /** + * The Sentry DSN url. + */ + val sentryDSN: String, + + /** + * Environment for Sentry. + */ + val sentryEnvironment: String ) : Analytics } diff --git a/vector-config/src/main/java/im/vector/app/config/Config.kt b/vector-config/src/main/java/im/vector/app/config/Config.kt index f660799d06..c91987dbfd 100644 --- a/vector-config/src/main/java/im/vector/app/config/Config.kt +++ b/vector-config/src/main/java/im/vector/app/config/Config.kt @@ -68,25 +68,29 @@ object Config { * The analytics configuration to use for the Debug build type. * Can be disabled by providing Analytics.Disabled */ - val DEBUG_ANALYTICS_CONFIG = Analytics.PostHog( + val DEBUG_ANALYTICS_CONFIG = Analytics.Enabled( postHogHost = "https://posthog.element.dev", postHogApiKey = "phc_VtA1L35nw3aeAtHIx1ayrGdzGkss7k1xINeXcoIQzXN", policyLink = "https://element.io/cookie-policy", + sentryDSN = "https://f6acc9cfc2024641b28c87ad95e73e66@sentry.tools.element.io/49", + sentryEnvironment = "DEBUG" ) /** * The analytics configuration to use for the Release build type. * Can be disabled by providing Analytics.Disabled */ - val RELEASE_ANALYTICS_CONFIG = Analytics.PostHog( + val RELEASE_ANALYTICS_CONFIG = Analytics.Enabled( postHogHost = "https://posthog.hss.element.io", postHogApiKey = "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO", policyLink = "https://element.io/cookie-policy", + sentryDSN = "https://f6acc9cfc2024641b28c87ad95e73e66@sentry.tools.element.io/49", + sentryEnvironment = "RELEASE" ) /** * The analytics configuration to use for the Nightly build type. * Can be disabled by providing Analytics.Disabled */ - val NIGHTLY_ANALYTICS_CONFIG = RELEASE_ANALYTICS_CONFIG + val NIGHTLY_ANALYTICS_CONFIG = RELEASE_ANALYTICS_CONFIG.copy(sentryEnvironment = "NIGHTLY") } diff --git a/vector/build.gradle b/vector/build.gradle index ff0d907212..0ddee2428a 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -183,6 +183,7 @@ dependencies { } implementation libs.markwon.core implementation libs.markwon.extLatex + implementation libs.markwon.imageGlide implementation libs.markwon.inlineParser implementation libs.markwon.html implementation 'com.googlecode.htmlcompressor:htmlcompressor:1.5.2' @@ -230,6 +231,7 @@ dependencies { implementation('com.posthog.android:posthog:1.1.2') { exclude group: 'com.android.support', module: 'support-annotations' } + implementation libs.sentry.sentryAndroid // UnifiedPush implementation 'com.github.UnifiedPush:android-connector:2.1.0' @@ -289,6 +291,7 @@ dependencies { testImplementation libs.tests.junit testImplementation libs.tests.kluent testImplementation libs.mockk.mockk + testImplementation libs.androidx.coreTesting // Plant Timber tree for test testImplementation libs.tests.timberJunitRule testImplementation libs.airbnb.mavericksTesting @@ -317,5 +320,5 @@ dependencies { androidTestImplementation libs.mockk.mockkAndroid androidTestUtil libs.androidx.orchestrator debugImplementation libs.androidx.fragmentTesting - androidTestImplementation "org.jetbrains.kotlin:kotlin-reflect:1.7.10" + androidTestImplementation "org.jetbrains.kotlin:kotlin-reflect:1.7.20" } diff --git a/vector/src/androidTest/java/im/vector/app/features/RoomMemberListControllerTest.kt b/vector/src/androidTest/java/im/vector/app/features/RoomMemberListControllerTest.kt new file mode 100644 index 0000000000..73174e4b34 --- /dev/null +++ b/vector/src/androidTest/java/im/vector/app/features/RoomMemberListControllerTest.kt @@ -0,0 +1,128 @@ +/* + * Copyright (c) 2022 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.features + +import com.airbnb.mvrx.Success +import im.vector.app.core.epoxy.profiles.ProfileMatrixItemWithPowerLevelWithPresence +import im.vector.app.features.roomprofile.members.RoomMemberListCategories +import im.vector.app.features.roomprofile.members.RoomMemberListController +import im.vector.app.features.roomprofile.members.RoomMemberListViewState +import io.mockk.every +import io.mockk.mockk +import kotlinx.coroutines.test.runTest +import org.amshove.kluent.shouldBeEqualTo +import org.junit.Test +import org.matrix.android.sdk.api.session.crypto.model.UserVerificationLevel +import org.matrix.android.sdk.api.session.room.model.Membership +import org.matrix.android.sdk.api.session.room.model.RoomMemberSummary +import org.matrix.android.sdk.api.session.room.model.RoomSummary +import kotlin.coroutines.resume +import kotlin.coroutines.suspendCoroutine + +class RoomMemberListControllerTest { + + @Test + fun testControllerUserVerificationLevel() = runTest { + val roomListController = RoomMemberListController( + avatarRenderer = mockk { + }, + stringProvider = mockk { + every { getString(any()) } answers { + this.args[0].toString() + } + }, + colorProvider = mockk { + every { getColorFromAttribute(any()) } returns 0x0 + }, + roomMemberSummaryFilter = mockk(relaxed = true) { + every { test(any()) } returns true + } + ) + + val fakeRoomSummary = RoomSummary( + roomId = "!roomId", + displayName = "Fake Room", + topic = "A topic", + isEncrypted = true, + encryptionEventTs = 0, + typingUsers = emptyList(), + ) + + val state = RoomMemberListViewState( + roomId = "!roomId", + roomSummary = Success(fakeRoomSummary), + areAllMembersLoaded = true, + roomMemberSummaries = Success( + listOf( + RoomMemberListCategories.USER to listOf( + RoomMemberSummary( + membership = Membership.JOIN, + userId = "@alice:example.com" + ), + RoomMemberSummary( + membership = Membership.JOIN, + userId = "@bob:example.com" + ), + RoomMemberSummary( + membership = Membership.JOIN, + userId = "@carl:example.com" + ), + RoomMemberSummary( + membership = Membership.JOIN, + userId = "@massy:example.com" + ) + ) + ) + ), + trustLevelMap = Success( + mapOf( + "@alice:example.com" to UserVerificationLevel.UNVERIFIED_BUT_WAS_PREVIOUSLY, + "@bob:example.com" to UserVerificationLevel.VERIFIED_ALL_DEVICES_TRUSTED, + "@carl:example.com" to UserVerificationLevel.WAS_NEVER_VERIFIED, + "@massy:example.com" to UserVerificationLevel.VERIFIED_WITH_DEVICES_UNTRUSTED, + ) + ) + ) + + suspendCoroutine { continuation -> + roomListController.setData(state) + roomListController.addModelBuildListener { + continuation.resume(it) + } + } + + val models = roomListController.adapter.copyOfModels + + val profileItems = models.filterIsInstance() + + profileItems.firstOrNull { + it.matrixItem.id == "@alice:example.com" + }!!.userVerificationLevel shouldBeEqualTo UserVerificationLevel.UNVERIFIED_BUT_WAS_PREVIOUSLY + + profileItems.firstOrNull { + it.matrixItem.id == "@bob:example.com" + }!!.userVerificationLevel shouldBeEqualTo UserVerificationLevel.VERIFIED_ALL_DEVICES_TRUSTED + + profileItems.firstOrNull { + it.matrixItem.id == "@carl:example.com" + }!!.userVerificationLevel shouldBeEqualTo UserVerificationLevel.WAS_NEVER_VERIFIED + + profileItems.firstOrNull { + it.matrixItem.id == "@massy:example.com" + }!!.userVerificationLevel shouldBeEqualTo UserVerificationLevel.VERIFIED_WITH_DEVICES_UNTRUSTED + } +} diff --git a/vector/src/androidTest/java/im/vector/app/features/html/EventHtmlRendererTest.kt b/vector/src/androidTest/java/im/vector/app/features/html/EventHtmlRendererTest.kt index 41c0f51322..a2e489dd70 100644 --- a/vector/src/androidTest/java/im/vector/app/features/html/EventHtmlRendererTest.kt +++ b/vector/src/androidTest/java/im/vector/app/features/html/EventHtmlRendererTest.kt @@ -18,6 +18,7 @@ package im.vector.app.features.html import androidx.core.text.toSpannable import androidx.test.platform.app.InstrumentationRegistry +import im.vector.app.core.di.ActiveSessionHolder import im.vector.app.core.resources.ColorProvider import im.vector.app.core.utils.toTestSpan import im.vector.app.features.settings.VectorPreferences @@ -36,11 +37,13 @@ class EventHtmlRendererTest { private val fakeVectorPreferences = mockk().also { every { it.latexMathsIsEnabled() } returns false } + private val fakeSessionHolder = mockk() private val renderer = EventHtmlRenderer( MatrixHtmlPluginConfigure(ColorProvider(context), context.resources), context, - fakeVectorPreferences + fakeVectorPreferences, + fakeSessionHolder, ) @Test diff --git a/vector/src/main/AndroidManifest.xml b/vector/src/main/AndroidManifest.xml index b16e4505a6..f079d3429e 100644 --- a/vector/src/main/AndroidManifest.xml +++ b/vector/src/main/AndroidManifest.xml @@ -35,14 +35,6 @@ - - - - @@ -77,6 +69,9 @@ + + + throw IllegalStateException("Unhandled build type: ${BuildConfig.BUILD_TYPE}") } return when (config) { - Analytics.Disabled -> AnalyticsConfig(isEnabled = false, "", "", "") - is Analytics.PostHog -> AnalyticsConfig( + Analytics.Disabled -> AnalyticsConfig(isEnabled = false, "", "", "", "", "") + is Analytics.Enabled -> AnalyticsConfig( isEnabled = true, postHogHost = config.postHogHost, postHogApiKey = config.postHogApiKey, - policyLink = config.policyLink + policyLink = config.policyLink, + sentryDSN = config.sentryDSN, + sentryEnvironment = config.sentryEnvironment ) } } diff --git a/vector/src/main/java/im/vector/app/core/di/MavericksViewModelModule.kt b/vector/src/main/java/im/vector/app/core/di/MavericksViewModelModule.kt index 62e7140742..38b62e1511 100644 --- a/vector/src/main/java/im/vector/app/core/di/MavericksViewModelModule.kt +++ b/vector/src/main/java/im/vector/app/core/di/MavericksViewModelModule.kt @@ -89,6 +89,7 @@ import im.vector.app.features.settings.crosssigning.CrossSigningSettingsViewMode import im.vector.app.features.settings.devices.DeviceVerificationInfoBottomSheetViewModel import im.vector.app.features.settings.devices.DevicesViewModel import im.vector.app.features.settings.devices.v2.details.SessionDetailsViewModel +import im.vector.app.features.settings.devices.v2.more.SessionLearnMoreViewModel import im.vector.app.features.settings.devices.v2.othersessions.OtherSessionsViewModel import im.vector.app.features.settings.devices.v2.overview.SessionOverviewViewModel import im.vector.app.features.settings.devices.v2.rename.RenameSessionViewModel @@ -659,4 +660,9 @@ interface MavericksViewModelModule { @IntoMap @MavericksViewModelKey(RenameSessionViewModel::class) fun renameSessionViewModelFactory(factory: RenameSessionViewModel.Factory): MavericksAssistedViewModelFactory<*, *> + + @Binds + @IntoMap + @MavericksViewModelKey(SessionLearnMoreViewModel::class) + fun sessionLearnMoreViewModelFactory(factory: SessionLearnMoreViewModel.Factory): MavericksAssistedViewModelFactory<*, *> } diff --git a/vector/src/main/java/im/vector/app/core/epoxy/profiles/BaseProfileMatrixItem.kt b/vector/src/main/java/im/vector/app/core/epoxy/profiles/BaseProfileMatrixItem.kt index 9c5ad49339..ef22aba624 100644 --- a/vector/src/main/java/im/vector/app/core/epoxy/profiles/BaseProfileMatrixItem.kt +++ b/vector/src/main/java/im/vector/app/core/epoxy/profiles/BaseProfileMatrixItem.kt @@ -26,7 +26,7 @@ import im.vector.app.core.epoxy.onClick import im.vector.app.core.extensions.setTextOrHide import im.vector.app.features.displayname.getBestName import im.vector.app.features.home.AvatarRenderer -import org.matrix.android.sdk.api.session.crypto.model.RoomEncryptionTrustLevel +import org.matrix.android.sdk.api.session.crypto.model.UserVerificationLevel import org.matrix.android.sdk.api.util.MatrixItem abstract class BaseProfileMatrixItem(@LayoutRes layoutId: Int) : VectorEpoxyModel(layoutId) { @@ -35,7 +35,7 @@ abstract class BaseProfileMatrixItem(@LayoutRes la @EpoxyAttribute var editable: Boolean = true @EpoxyAttribute - var userEncryptionTrustLevel: RoomEncryptionTrustLevel? = null + var userVerificationLevel: UserVerificationLevel? = null @EpoxyAttribute(EpoxyAttribute.Option.DoNotHash) var clickListener: ClickListener? = null @@ -53,6 +53,6 @@ abstract class BaseProfileMatrixItem(@LayoutRes la holder.subtitleView.setTextOrHide(matrixId) holder.editableView.isVisible = editable avatarRenderer.render(matrixItem, holder.avatarImageView) - holder.avatarDecorationImageView.render(userEncryptionTrustLevel) + holder.avatarDecorationImageView.renderUser(userVerificationLevel) } } diff --git a/vector/src/main/java/im/vector/app/core/ui/views/ShieldImageView.kt b/vector/src/main/java/im/vector/app/core/ui/views/ShieldImageView.kt index 4642fb8525..1990859668 100644 --- a/vector/src/main/java/im/vector/app/core/ui/views/ShieldImageView.kt +++ b/vector/src/main/java/im/vector/app/core/ui/views/ShieldImageView.kt @@ -24,6 +24,7 @@ import androidx.core.view.isVisible import im.vector.app.R import im.vector.app.features.home.room.detail.timeline.item.E2EDecoration import org.matrix.android.sdk.api.session.crypto.model.RoomEncryptionTrustLevel +import org.matrix.android.sdk.api.session.crypto.model.UserVerificationLevel class ShieldImageView @JvmOverloads constructor( context: Context, @@ -102,6 +103,35 @@ class ShieldImageView @JvmOverloads constructor( } } } + + fun renderUser(userVerificationLevel: UserVerificationLevel?, borderLess: Boolean = false) { + isVisible = userVerificationLevel != null + when (userVerificationLevel) { + UserVerificationLevel.VERIFIED_ALL_DEVICES_TRUSTED -> { + contentDescription = context.getString(R.string.a11y_trust_level_trusted) + setImageResource( + if (borderLess) R.drawable.ic_shield_trusted_no_border + else R.drawable.ic_shield_trusted + ) + } + UserVerificationLevel.UNVERIFIED_BUT_WAS_PREVIOUSLY, + UserVerificationLevel.VERIFIED_WITH_DEVICES_UNTRUSTED -> { + contentDescription = context.getString(R.string.a11y_trust_level_warning) + setImageResource( + if (borderLess) R.drawable.ic_shield_warning_no_border + else R.drawable.ic_shield_warning + ) + } + UserVerificationLevel.WAS_NEVER_VERIFIED -> { + contentDescription = context.getString(R.string.a11y_trust_level_default) + setImageResource( + if (borderLess) R.drawable.ic_shield_black_no_border + else R.drawable.ic_shield_black + ) + } + null -> Unit + } + } } @DrawableRes diff --git a/vector/src/main/java/im/vector/app/core/utils/PermissionsTools.kt b/vector/src/main/java/im/vector/app/core/utils/PermissionsTools.kt index 9ad95d3c55..a287626671 100644 --- a/vector/src/main/java/im/vector/app/core/utils/PermissionsTools.kt +++ b/vector/src/main/java/im/vector/app/core/utils/PermissionsTools.kt @@ -42,6 +42,7 @@ val PERMISSIONS_FOR_ROOM_AVATAR = listOf(Manifest.permission.CAMERA) val PERMISSIONS_FOR_WRITING_FILES = listOf(Manifest.permission.WRITE_EXTERNAL_STORAGE) val PERMISSIONS_FOR_PICKING_CONTACT = listOf(Manifest.permission.READ_CONTACTS) val PERMISSIONS_FOR_FOREGROUND_LOCATION_SHARING = listOf(Manifest.permission.ACCESS_COARSE_LOCATION, Manifest.permission.ACCESS_FINE_LOCATION) +val PERMISSIONS_FOR_VOICE_BROADCAST = listOf(Manifest.permission.RECORD_AUDIO) // This is not ideal to store the value like that, but it works private var permissionDialogDisplayed = false diff --git a/vector/src/main/java/im/vector/app/features/MainActivity.kt b/vector/src/main/java/im/vector/app/features/MainActivity.kt index e1e7764f19..1b3a9eb142 100644 --- a/vector/src/main/java/im/vector/app/features/MainActivity.kt +++ b/vector/src/main/java/im/vector/app/features/MainActivity.kt @@ -42,9 +42,10 @@ import im.vector.app.features.analytics.plan.ViewRoom import im.vector.app.features.home.HomeActivity import im.vector.app.features.home.ShortcutsHandler import im.vector.app.features.notifications.NotificationDrawerManager -import im.vector.app.features.pin.PinCodeStore import im.vector.app.features.pin.PinLocker import im.vector.app.features.pin.UnlockedActivity +import im.vector.app.features.pin.lockscreen.crypto.LockScreenKeyRepository +import im.vector.app.features.pin.lockscreen.pincode.PinCodeHelper import im.vector.app.features.popup.PopupAlertManager import im.vector.app.features.session.VectorSessionStore import im.vector.app.features.settings.VectorPreferences @@ -134,10 +135,11 @@ class MainActivity : VectorBaseActivity(), UnlockedActivity @Inject lateinit var vectorPreferences: VectorPreferences @Inject lateinit var uiStateRepository: UiStateRepository @Inject lateinit var shortcutsHandler: ShortcutsHandler - @Inject lateinit var pinCodeStore: PinCodeStore + @Inject lateinit var pinCodeHelper: PinCodeHelper @Inject lateinit var pinLocker: PinLocker @Inject lateinit var popupAlertManager: PopupAlertManager @Inject lateinit var vectorAnalytics: VectorAnalytics + @Inject lateinit var lockScreenKeyRepository: LockScreenKeyRepository override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -284,9 +286,10 @@ class MainActivity : VectorBaseActivity(), UnlockedActivity vectorPreferences.clearPreferences() uiStateRepository.reset() pinLocker.unlock() - pinCodeStore.deletePinCode() + pinCodeHelper.deletePinCode() vectorAnalytics.onSignOut() vectorSessionStore.clear() + lockScreenKeyRepository.deleteSystemKey() } withContext(Dispatchers.IO) { // On BG thread diff --git a/vector/src/main/java/im/vector/app/features/VectorFeatures.kt b/vector/src/main/java/im/vector/app/features/VectorFeatures.kt index e1c083db29..9c3ebae641 100644 --- a/vector/src/main/java/im/vector/app/features/VectorFeatures.kt +++ b/vector/src/main/java/im/vector/app/features/VectorFeatures.kt @@ -41,6 +41,7 @@ interface VectorFeatures { */ fun isNewAppLayoutFeatureEnabled(): Boolean fun isNewDeviceManagementEnabled(): Boolean + fun isVoiceBroadcastEnabled(): Boolean } class DefaultVectorFeatures : VectorFeatures { @@ -57,4 +58,5 @@ class DefaultVectorFeatures : VectorFeatures { override fun forceUsageOfOpusEncoder(): Boolean = false override fun isNewAppLayoutFeatureEnabled(): Boolean = true override fun isNewDeviceManagementEnabled(): Boolean = false + override fun isVoiceBroadcastEnabled(): Boolean = false } diff --git a/vector/src/main/java/im/vector/app/features/analytics/AnalyticsConfig.kt b/vector/src/main/java/im/vector/app/features/analytics/AnalyticsConfig.kt index bffba6fa9c..cc3eed306d 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/AnalyticsConfig.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/AnalyticsConfig.kt @@ -21,4 +21,6 @@ data class AnalyticsConfig( val postHogHost: String, val postHogApiKey: String, val policyLink: String, + val sentryDSN: String, + val sentryEnvironment: String ) diff --git a/vector/src/main/java/im/vector/app/features/analytics/extensions/UserPropertiesExt.kt b/vector/src/main/java/im/vector/app/features/analytics/extensions/UserPropertiesExt.kt index e5446f438b..0ff04f0854 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/extensions/UserPropertiesExt.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/extensions/UserPropertiesExt.kt @@ -17,6 +17,7 @@ package im.vector.app.features.analytics.extensions import im.vector.app.features.analytics.plan.UserProperties +import im.vector.app.features.home.room.list.home.header.HomeRoomFilter import im.vector.app.features.onboarding.FtueUseCase fun FtueUseCase.toTrackingValue(): UserProperties.FtueUseCaseSelection { @@ -27,3 +28,12 @@ fun FtueUseCase.toTrackingValue(): UserProperties.FtueUseCaseSelection { FtueUseCase.SKIP -> UserProperties.FtueUseCaseSelection.Skip } } + +fun HomeRoomFilter.toTrackingValue(): UserProperties.AllChatsActiveFilter { + return when (this) { + HomeRoomFilter.ALL -> UserProperties.AllChatsActiveFilter.All + HomeRoomFilter.UNREADS -> UserProperties.AllChatsActiveFilter.Unreads + HomeRoomFilter.FAVOURITES -> UserProperties.AllChatsActiveFilter.Favourites + HomeRoomFilter.PEOPlE -> UserProperties.AllChatsActiveFilter.People + } +} diff --git a/vector/src/main/java/im/vector/app/features/analytics/impl/DefaultVectorAnalytics.kt b/vector/src/main/java/im/vector/app/features/analytics/impl/DefaultVectorAnalytics.kt index be847dcb7f..553d699d86 100644 --- a/vector/src/main/java/im/vector/app/features/analytics/impl/DefaultVectorAnalytics.kt +++ b/vector/src/main/java/im/vector/app/features/analytics/impl/DefaultVectorAnalytics.kt @@ -41,6 +41,7 @@ private val IGNORED_OPTIONS: Options? = null @Singleton class DefaultVectorAnalytics @Inject constructor( postHogFactory: PostHogFactory, + private val sentryFactory: SentryFactory, analyticsConfig: AnalyticsConfig, private val analyticsStore: AnalyticsStore, private val lateInitUserPropertiesFactory: LateInitUserPropertiesFactory, @@ -94,6 +95,9 @@ class DefaultVectorAnalytics @Inject constructor( override suspend fun onSignOut() { // reset the analyticsId setAnalyticsId("") + + // Close Sentry SDK. + sentryFactory.stopSentry() } private fun observeAnalyticsId() { @@ -123,10 +127,20 @@ class DefaultVectorAnalytics @Inject constructor( Timber.tag(analyticsTag.value).d("User consent updated to $consent") userConsent = consent optOutPostHog() + initOrStopSentry() } .launchIn(globalScope) } + private fun initOrStopSentry() { + userConsent?.let { + when (it) { + true -> sentryFactory.initSentry() + false -> sentryFactory.stopSentry() + } + } + } + private fun optOutPostHog() { userConsent?.let { posthog?.optOut(!it) } } diff --git a/vector/src/main/java/im/vector/app/features/analytics/impl/SentryFactory.kt b/vector/src/main/java/im/vector/app/features/analytics/impl/SentryFactory.kt new file mode 100644 index 0000000000..a000f2a77a --- /dev/null +++ b/vector/src/main/java/im/vector/app/features/analytics/impl/SentryFactory.kt @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2022 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.features.analytics.impl + +import android.content.Context +import im.vector.app.features.analytics.AnalyticsConfig +import im.vector.app.features.analytics.log.analyticsTag +import io.sentry.Sentry +import io.sentry.SentryOptions +import io.sentry.android.core.SentryAndroid +import timber.log.Timber +import javax.inject.Inject + +class SentryFactory @Inject constructor( + private val context: Context, + private val analyticsConfig: AnalyticsConfig, +) { + + fun initSentry() { + Timber.tag(analyticsTag.value).d("Initializing Sentry") + if (Sentry.isEnabled()) return + SentryAndroid.init(context) { options -> + options.dsn = analyticsConfig.sentryDSN + options.beforeSend = SentryOptions.BeforeSendCallback { event, _ -> event } + options.tracesSampleRate = 1.0 + options.isEnableUserInteractionTracing = true + options.environment = analyticsConfig.sentryEnvironment + options.diagnosticLevel + } + } + + fun stopSentry() { + Timber.tag(analyticsTag.value).d("Stopping Sentry") + Sentry.close() + } +} diff --git a/vector/src/main/java/im/vector/app/features/attachments/AttachmentTypeSelectorView.kt b/vector/src/main/java/im/vector/app/features/attachments/AttachmentTypeSelectorView.kt index c85c3aa6b5..8536b765d4 100644 --- a/vector/src/main/java/im/vector/app/features/attachments/AttachmentTypeSelectorView.kt +++ b/vector/src/main/java/im/vector/app/features/attachments/AttachmentTypeSelectorView.kt @@ -40,6 +40,7 @@ import im.vector.app.core.utils.PERMISSIONS_EMPTY import im.vector.app.core.utils.PERMISSIONS_FOR_FOREGROUND_LOCATION_SHARING import im.vector.app.core.utils.PERMISSIONS_FOR_PICKING_CONTACT import im.vector.app.core.utils.PERMISSIONS_FOR_TAKING_PHOTO +import im.vector.app.core.utils.PERMISSIONS_FOR_VOICE_BROADCAST import im.vector.app.databinding.ViewAttachmentTypeSelectorBinding import im.vector.app.features.attachments.AttachmentTypeSelectorView.Callback import kotlin.math.max @@ -75,6 +76,7 @@ class AttachmentTypeSelectorView( views.attachmentContactButton.configure(Type.CONTACT) views.attachmentPollButton.configure(Type.POLL) views.attachmentLocationButton.configure(Type.LOCATION) + views.attachmentVoiceBroadcast.configure(Type.VOICE_BROADCAST) width = LinearLayout.LayoutParams.MATCH_PARENT height = LinearLayout.LayoutParams.WRAP_CONTENT animationStyle = 0 @@ -134,6 +136,7 @@ class AttachmentTypeSelectorView( Type.CONTACT -> views.attachmentContactButton Type.POLL -> views.attachmentPollButton Type.LOCATION -> views.attachmentLocationButton + Type.VOICE_BROADCAST -> views.attachmentVoiceBroadcast }.let { it.isVisible = isVisible } @@ -221,6 +224,7 @@ class AttachmentTypeSelectorView( STICKER(PERMISSIONS_EMPTY, R.string.tooltip_attachment_sticker), CONTACT(PERMISSIONS_FOR_PICKING_CONTACT, R.string.tooltip_attachment_contact), POLL(PERMISSIONS_EMPTY, R.string.tooltip_attachment_poll), - LOCATION(PERMISSIONS_FOR_FOREGROUND_LOCATION_SHARING, R.string.tooltip_attachment_location) + LOCATION(PERMISSIONS_FOR_FOREGROUND_LOCATION_SHARING, R.string.tooltip_attachment_location), + VOICE_BROADCAST(PERMISSIONS_FOR_VOICE_BROADCAST, R.string.tooltip_attachment_voice_broadcast), } } diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailAction.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailAction.kt index c1e3b58a80..10708d2290 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailAction.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/RoomDetailAction.kt @@ -79,6 +79,7 @@ sealed class RoomDetailAction : VectorViewModelAction { data class ReRequestKeys(val eventId: String) : RoomDetailAction() object SelectStickerAttachment : RoomDetailAction() + object StartVoiceBroadcast : RoomDetailAction() object OpenIntegrationManager : RoomDetailAction() object ManageIntegrations : RoomDetailAction() data class AddJitsiWidget(val withVideo: Boolean) : RoomDetailAction() diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt index bba607eeb4..8a259b0eea 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineFragment.kt @@ -359,6 +359,8 @@ class TimelineFragment : private var lockSendButton = false private val currentCallsViewPresenter = CurrentCallsViewPresenter() + private val isEmojiKeyboardVisible: Boolean + get() = vectorPreferences.showEmojiKeyboard() private val lazyLoadedViews = RoomDetailLazyLoadedViews() private val emojiPopup: EmojiPopup by lifecycleAwareLazy { @@ -1536,11 +1538,10 @@ class TimelineFragment : observerUserTyping() - if (vectorPreferences.sendMessageWithEnter()) { - // imeOptions="actionSend" only works with single line, so we remove multiline inputType - composerEditText.inputType = composerEditText.inputType and EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE.inv() - composerEditText.imeOptions = EditorInfo.IME_ACTION_SEND + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { + composerEditText.setUseIncognitoKeyboard(vectorPreferences.useIncognitoKeyboard()) } + composerEditText.setSendMessageWithEnter(vectorPreferences.sendMessageWithEnter()) composerEditText.setOnEditorActionListener { v, actionId, keyEvent -> val imeActionId = actionId and EditorInfo.IME_MASK_ACTION @@ -1575,10 +1576,18 @@ class TimelineFragment : attachmentTypeSelector.setAttachmentVisibility( AttachmentTypeSelectorView.Type.POLL, !isThreadTimeLine() ) + attachmentTypeSelector.setAttachmentVisibility( + AttachmentTypeSelectorView.Type.VOICE_BROADCAST, + vectorFeatures.isVoiceBroadcastEnabled(), // TODO check user permission + ) } attachmentTypeSelector.show(views.composerLayout.views.attachmentButton) } + override fun onExpandOrCompactChange() { + views.composerLayout.views.composerEmojiButton.isVisible = isEmojiKeyboardVisible + } + override fun onSendMessage(text: CharSequence) { sendTextMessage(text) } @@ -2668,6 +2677,7 @@ class TimelineFragment : locationOwnerId = session.myUserId ) } + AttachmentTypeSelectorView.Type.VOICE_BROADCAST -> timelineViewModel.handle(RoomDetailAction.StartVoiceBroadcast) } } diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineViewModel.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineViewModel.kt index 02dd2604e1..4bed477711 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/TimelineViewModel.kt @@ -456,6 +456,7 @@ class TimelineViewModel @AssistedInject constructor( is RoomDetailAction.ReRequestKeys -> handleReRequestKeys(action) is RoomDetailAction.TapOnFailedToDecrypt -> handleTapOnFailedToDecrypt(action) is RoomDetailAction.SelectStickerAttachment -> handleSelectStickerAttachment() + is RoomDetailAction.StartVoiceBroadcast -> handleStartVoiceBroadcast() is RoomDetailAction.OpenIntegrationManager -> handleOpenIntegrationManager() is RoomDetailAction.StartCall -> handleStartCall(action) is RoomDetailAction.AcceptCall -> handleAcceptCall(action) @@ -597,6 +598,11 @@ class TimelineViewModel @AssistedInject constructor( } } + private fun handleStartVoiceBroadcast() { + // Todo implement start voice broadcast action + Timber.d("Start voice broadcast clicked") + } + private fun handleOpenIntegrationManager() { viewModelScope.launch { val viewEvent = withContext(Dispatchers.Default) { diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/ComposerEditText.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/ComposerEditText.kt index c751053cdf..9e88882866 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/ComposerEditText.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/ComposerEditText.kt @@ -20,10 +20,12 @@ package im.vector.app.features.home.room.detail.composer import android.content.ClipData import android.content.Context import android.net.Uri +import android.os.Build import android.text.Editable import android.util.AttributeSet import android.view.inputmethod.EditorInfo import android.view.inputmethod.InputConnection +import androidx.annotation.RequiresApi import androidx.appcompat.widget.AppCompatEditText import androidx.core.view.OnReceiveContentListener import androidx.core.view.ViewCompat @@ -79,6 +81,27 @@ class ComposerEditText @JvmOverloads constructor( return ic } + /** Set whether the keyboard should disable personalized learning. */ + @RequiresApi(Build.VERSION_CODES.O) + fun setUseIncognitoKeyboard(useIncognitoKeyboard: Boolean) { + imeOptions = if (useIncognitoKeyboard) { + imeOptions or EditorInfo.IME_FLAG_NO_PERSONALIZED_LEARNING + } else { + imeOptions and EditorInfo.IME_FLAG_NO_PERSONALIZED_LEARNING.inv() + } + } + + /** Set whether enter should send the message or add a new line. */ + fun setSendMessageWithEnter(sendMessageWithEnter: Boolean) { + if (sendMessageWithEnter) { + inputType = inputType and EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE.inv() + imeOptions = imeOptions or EditorInfo.IME_ACTION_SEND + } else { + inputType = inputType or EditorInfo.TYPE_TEXT_FLAG_MULTI_LINE + imeOptions = imeOptions and EditorInfo.IME_ACTION_SEND.inv() + } + } + init { addTextChangedListener( object : SimpleTextWatcher() { diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerView.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerView.kt index 1522960cc9..b1b2c87e9c 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerView.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/composer/MessageComposerView.kt @@ -46,6 +46,7 @@ class MessageComposerView @JvmOverloads constructor( fun onCloseRelatedMessage() fun onSendMessage(text: CharSequence) fun onAddAttachment() + fun onExpandOrCompactChange() } val views: ComposerLayoutBinding @@ -96,6 +97,7 @@ class MessageComposerView @JvmOverloads constructor( } currentConstraintSetId = R.layout.composer_layout_constraint_set_compact applyNewConstraintSet(animate, transitionComplete) + callback?.onExpandOrCompactChange() } fun expand(animate: Boolean = true, transitionComplete: (() -> Unit)? = null) { @@ -105,6 +107,7 @@ class MessageComposerView @JvmOverloads constructor( } currentConstraintSetId = R.layout.composer_layout_constraint_set_expanded applyNewConstraintSet(animate, transitionComplete) + callback?.onExpandOrCompactChange() } fun setTextIfDifferent(text: CharSequence?): Boolean { diff --git a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt index 28e256c064..fece5786fe 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/detail/timeline/factory/MessageItemFactory.kt @@ -453,12 +453,15 @@ class MessageItemFactory @Inject constructor( maxWidth = maxWidth, allowNonMxcUrls = informationData.sendState.isSending() ) + + val playable = messageContent.mimeType == MimeTypes.Gif + return MessageImageVideoItem_() .attributes(attributes) .leftGuideline(avatarSizeProvider.leftGuideline) .imageContentRenderer(imageContentRenderer) .contentUploadStateTrackerBinder(contentUploadStateTrackerBinder) - .playable(messageContent.mimeType == MimeTypes.Gif) + .playable(playable) .highlighted(highlight) .mediaData(data) .apply { @@ -472,6 +475,10 @@ class MessageItemFactory @Inject constructor( callback?.onImageMessageClicked(messageContent, data, view, emptyList()) } } + }.apply { + if (playable && vectorPreferences.autoplayAnimatedImages()) { + mode(ImageContentRenderer.Mode.ANIMATED_THUMBNAIL) + } } } diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/home/HomeRoomListViewModel.kt b/vector/src/main/java/im/vector/app/features/home/room/list/home/HomeRoomListViewModel.kt index 7f62c68850..33b293497e 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/home/HomeRoomListViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/home/HomeRoomListViewModel.kt @@ -18,7 +18,7 @@ package im.vector.app.features.home.room.list.home import android.widget.ImageView import androidx.lifecycle.LiveData -import androidx.lifecycle.MediatorLiveData +import androidx.lifecycle.MutableLiveData import androidx.lifecycle.Observer import androidx.paging.PagedList import arrow.core.toOption @@ -34,6 +34,9 @@ import im.vector.app.core.platform.StateView import im.vector.app.core.platform.VectorViewModel import im.vector.app.core.resources.DrawableProvider import im.vector.app.core.resources.StringProvider +import im.vector.app.features.analytics.AnalyticsTracker +import im.vector.app.features.analytics.extensions.toTrackingValue +import im.vector.app.features.analytics.plan.UserProperties import im.vector.app.features.displayname.getBestName import im.vector.app.features.home.room.list.home.header.HomeRoomFilter import kotlinx.coroutines.flow.Flow @@ -74,6 +77,7 @@ class HomeRoomListViewModel @AssistedInject constructor( private val preferencesStore: HomeLayoutPreferencesStore, private val stringProvider: StringProvider, private val drawableProvider: DrawableProvider, + private val analyticsTracker: AnalyticsTracker, ) : VectorViewModel(initialState) { @AssistedFactory @@ -89,7 +93,7 @@ class HomeRoomListViewModel @AssistedInject constructor( .setEnablePlaceholders(true) .build() - private val _roomsLivePagedList = MediatorLiveData>() + private val _roomsLivePagedList = MutableLiveData>() val roomsLivePagedList: LiveData> = _roomsLivePagedList private val internalPagedListObserver = Observer> { @@ -236,9 +240,7 @@ class HomeRoomListViewModel @AssistedInject constructor( } private fun observeRooms(currentFilter: HomeRoomFilter, isAZOrdering: Boolean) { - filteredPagedRoomSummariesLive?.livePagedList?.let { livePagedList -> - _roomsLivePagedList.removeSource(livePagedList) - } + filteredPagedRoomSummariesLive?.livePagedList?.removeObserver(internalPagedListObserver) val builder = RoomSummaryQueryParams.Builder().also { it.memberships = listOf(Membership.JOIN) it.spaceFilter = spaceStateHandler.getCurrentSpace()?.roomId.toActiveSpaceOrNoFilter() @@ -256,7 +258,7 @@ class HomeRoomListViewModel @AssistedInject constructor( ).also { filteredPagedRoomSummariesLive = it } - _roomsLivePagedList.addSource(liveResults.livePagedList, internalPagedListObserver) + liveResults.livePagedList.observeForever(internalPagedListObserver) } private fun observeOrderPreferences() { @@ -339,9 +341,7 @@ class HomeRoomListViewModel @AssistedInject constructor( } override fun onCleared() { - filteredPagedRoomSummariesLive?.livePagedList?.let { livePagedList -> - _roomsLivePagedList.removeSource(livePagedList) - } + filteredPagedRoomSummariesLive?.livePagedList?.removeObserver(internalPagedListObserver) super.onCleared() } @@ -358,6 +358,7 @@ class HomeRoomListViewModel @AssistedInject constructor( } setState { copy(headersData = headersData.copy(currentFilter = newFilter)) } updateEmptyState() + analyticsTracker.updateUserProperties(UserProperties(allChatsActiveFilter = newFilter.toTrackingValue())) filteredPagedRoomSummariesLive?.let { liveResults -> liveResults.queryParams = getFilteredQueryParams(newFilter, liveResults.queryParams) } diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/home/header/HomeRoomsHeadersController.kt b/vector/src/main/java/im/vector/app/features/home/room/list/home/header/HomeRoomsHeadersController.kt index 56cccd9c36..3cc058985a 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/home/header/HomeRoomsHeadersController.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/home/header/HomeRoomsHeadersController.kt @@ -28,6 +28,7 @@ import com.google.android.material.color.MaterialColors import im.vector.app.R import im.vector.app.core.resources.StringProvider import im.vector.app.core.utils.FirstItemUpdatedObserver +import im.vector.app.features.analytics.AnalyticsTracker import im.vector.app.features.home.AvatarRenderer import im.vector.app.features.home.room.list.RoomListListener import org.matrix.android.sdk.api.session.room.model.RoomSummary @@ -38,6 +39,7 @@ class HomeRoomsHeadersController @Inject constructor( val stringProvider: StringProvider, private val avatarRenderer: AvatarRenderer, resources: Resources, + private val analyticsTracker: AnalyticsTracker, ) : EpoxyController() { private var data: RoomsHeadersData = RoomsHeadersData() @@ -73,7 +75,11 @@ class HomeRoomsHeadersController @Inject constructor( } host.data.filtersList?.let { - addRoomFilterHeaderItem(host.onFilterChangedListener, it, host.data.currentFilter) + addRoomFilterHeaderItem( + filterChangedListener = host.onFilterChangedListener, + filtersList = it, + currentFilter = host.data.currentFilter, + analyticsTracker = analyticsTracker) } } @@ -158,12 +164,14 @@ class HomeRoomsHeadersController @Inject constructor( filterChangedListener: ((HomeRoomFilter) -> Unit)?, filtersList: List, currentFilter: HomeRoomFilter?, + analyticsTracker: AnalyticsTracker, ) { roomFilterHeaderItem { id("filter_header") filtersData(filtersList) selectedFilter(currentFilter) onFilterChangedListener(filterChangedListener) + analyticsTracker(analyticsTracker) } } diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/home/header/RoomFilterHeaderItem.kt b/vector/src/main/java/im/vector/app/features/home/room/list/home/header/RoomFilterHeaderItem.kt index ed99b51681..fd4333b722 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/home/header/RoomFilterHeaderItem.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/home/header/RoomFilterHeaderItem.kt @@ -22,6 +22,8 @@ import com.google.android.material.tabs.TabLayout import im.vector.app.R import im.vector.app.core.epoxy.VectorEpoxyHolder import im.vector.app.core.epoxy.VectorEpoxyModel +import im.vector.app.features.analytics.AnalyticsTracker +import im.vector.app.features.analytics.plan.Interaction @EpoxyModelClass abstract class RoomFilterHeaderItem : VectorEpoxyModel(R.layout.item_home_filter_tabs) { @@ -35,6 +37,9 @@ abstract class RoomFilterHeaderItem : VectorEpoxyModel + trackFilterChangeEvent(filter) onFilterChangedListener?.invoke(filter) } } @@ -61,6 +67,23 @@ abstract class RoomFilterHeaderItem : VectorEpoxyModel Interaction.Name.MobileAllChatsFilterAll + HomeRoomFilter.UNREADS -> Interaction.Name.MobileAllChatsFilterUnreads + HomeRoomFilter.FAVOURITES -> Interaction.Name.MobileAllChatsFilterFavourites + HomeRoomFilter.PEOPlE -> Interaction.Name.MobileAllChatsFilterPeople + } + + analyticsTracker?.capture( + Interaction( + index = null, + interactionType = null, + name = interactionName + ) + ) + } + override fun unbind(holder: Holder) { holder.tabLayout.clearOnTabSelectedListeners() super.unbind(holder) diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/home/invites/InvitesFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/list/home/invites/InvitesFragment.kt index 0dbc1b8f34..ac39d7d567 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/home/invites/InvitesFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/home/invites/InvitesFragment.kt @@ -27,6 +27,7 @@ import im.vector.app.core.extensions.configureWith import im.vector.app.core.platform.StateView import im.vector.app.core.platform.VectorBaseFragment import im.vector.app.databinding.FragmentInvitesBinding +import im.vector.app.features.analytics.plan.MobileScreen import im.vector.app.features.analytics.plan.ViewRoom import im.vector.app.features.home.room.list.RoomListListener import im.vector.app.features.notifications.NotificationDrawerManager @@ -48,6 +49,11 @@ class InvitesFragment : VectorBaseFragment(), RoomListLi return FragmentInvitesBinding.inflate(inflater, container, false) } + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + analyticsScreenName = MobileScreen.ScreenName.Invites + } + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) diff --git a/vector/src/main/java/im/vector/app/features/home/room/list/home/layout/HomeLayoutSettingBottomDialogFragment.kt b/vector/src/main/java/im/vector/app/features/home/room/list/home/layout/HomeLayoutSettingBottomDialogFragment.kt index 0c4d64a1cc..63b7f557e3 100644 --- a/vector/src/main/java/im/vector/app/features/home/room/list/home/layout/HomeLayoutSettingBottomDialogFragment.kt +++ b/vector/src/main/java/im/vector/app/features/home/room/list/home/layout/HomeLayoutSettingBottomDialogFragment.kt @@ -25,6 +25,7 @@ import dagger.hilt.android.AndroidEntryPoint import im.vector.app.R import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment import im.vector.app.databinding.BottomSheetHomeLayoutSettingsBinding +import im.vector.app.features.analytics.plan.Interaction import im.vector.app.features.home.room.list.home.HomeLayoutPreferencesStore import kotlinx.coroutines.flow.first import kotlinx.coroutines.launch @@ -54,9 +55,11 @@ class HomeLayoutSettingBottomDialogFragment : VectorBaseBottomSheetDialogFragmen } views.homeLayoutSettingsRecents.setOnCheckedChangeListener { _, isChecked -> + trackRecentsStateEvent(isChecked) setRecentsEnabled(isChecked) } views.homeLayoutSettingsFilters.setOnCheckedChangeListener { _, isChecked -> + trackFiltersStateEvent(isChecked) setFiltersEnabled(isChecked) } views.homeLayoutSettingsSortGroup.setOnCheckedChangeListener { _, checkedId -> @@ -64,10 +67,40 @@ class HomeLayoutSettingBottomDialogFragment : VectorBaseBottomSheetDialogFragmen } } + private fun trackRecentsStateEvent(areEnabled: Boolean) { + val interactionName = if (areEnabled) { + Interaction.Name.MobileAllChatsRecentsEnabled + } else { + Interaction.Name.MobileAllChatsRecentsDisabled + } + analyticsTracker.capture( + Interaction( + index = null, + interactionType = null, + name = interactionName + ) + ) + } + private fun setRecentsEnabled(isEnabled: Boolean) = lifecycleScope.launch { preferencesStore.setRecentsEnabled(isEnabled) } + private fun trackFiltersStateEvent(areEnabled: Boolean) { + val interactionName = if (areEnabled) { + Interaction.Name.MobileAllChatsFiltersEnabled + } else { + Interaction.Name.MobileAllChatsFiltersDisabled + } + analyticsTracker.capture( + Interaction( + index = null, + interactionType = null, + name = interactionName + ) + ) + } + private fun setFiltersEnabled(isEnabled: Boolean) = lifecycleScope.launch { preferencesStore.setFiltersEnabled(isEnabled) } diff --git a/vector/src/main/java/im/vector/app/features/html/EventHtmlRenderer.kt b/vector/src/main/java/im/vector/app/features/html/EventHtmlRenderer.kt index 725f23cddd..9e869ecde1 100644 --- a/vector/src/main/java/im/vector/app/features/html/EventHtmlRenderer.kt +++ b/vector/src/main/java/im/vector/app/features/html/EventHtmlRenderer.kt @@ -27,8 +27,13 @@ package im.vector.app.features.html import android.content.Context import android.content.res.Resources +import android.graphics.drawable.Drawable import android.text.Spannable import androidx.core.text.toSpannable +import com.bumptech.glide.Glide +import com.bumptech.glide.RequestBuilder +import com.bumptech.glide.request.target.Target +import im.vector.app.core.di.ActiveSessionHolder import im.vector.app.core.resources.ColorProvider import im.vector.app.core.utils.DimensionConverter import im.vector.app.features.settings.VectorPreferences @@ -39,12 +44,15 @@ import io.noties.markwon.PrecomputedFutureTextSetterCompat import io.noties.markwon.ext.latex.JLatexMathPlugin import io.noties.markwon.ext.latex.JLatexMathTheme import io.noties.markwon.html.HtmlPlugin +import io.noties.markwon.image.AsyncDrawable +import io.noties.markwon.image.glide.GlideImagesPlugin import io.noties.markwon.inlineparser.EntityInlineProcessor import io.noties.markwon.inlineparser.HtmlInlineProcessor import io.noties.markwon.inlineparser.MarkwonInlineParser import io.noties.markwon.inlineparser.MarkwonInlineParserPlugin import org.commonmark.node.Node import org.commonmark.parser.Parser +import org.matrix.android.sdk.api.MatrixUrls.isMxcUrl import timber.log.Timber import javax.inject.Inject import javax.inject.Singleton @@ -53,7 +61,8 @@ import javax.inject.Singleton class EventHtmlRenderer @Inject constructor( htmlConfigure: MatrixHtmlPluginConfigure, context: Context, - vectorPreferences: VectorPreferences + vectorPreferences: VectorPreferences, + private val activeSessionHolder: ActiveSessionHolder ) { interface PostProcessor { @@ -62,6 +71,23 @@ class EventHtmlRenderer @Inject constructor( private val builder = Markwon.builder(context) .usePlugin(HtmlPlugin.create(htmlConfigure)) + .usePlugin(GlideImagesPlugin.create(object : GlideImagesPlugin.GlideStore { + override fun load(drawable: AsyncDrawable): RequestBuilder { + val url = drawable.destination + if (url.isMxcUrl()) { + val contentUrlResolver = activeSessionHolder.getActiveSession().contentUrlResolver() + val imageUrl = contentUrlResolver.resolveFullSize(url) + // Override size to avoid crashes for huge pictures + return Glide.with(context).load(imageUrl).override(500) + } + // We don't want to support other url schemes here, so just return a request for null + return Glide.with(context).load(null as String?) + } + + override fun cancel(target: Target<*>) { + Glide.with(context).clear(target) + } + })) private val markwon = if (vectorPreferences.latexMathsIsEnabled()) { // If latex maths is enabled in app preferences, refomat it so Markwon recognises it diff --git a/vector/src/main/java/im/vector/app/features/lifecycle/VectorActivityLifecycleCallbacks.kt b/vector/src/main/java/im/vector/app/features/lifecycle/VectorActivityLifecycleCallbacks.kt index c884843f5c..5bdd92dcf4 100644 --- a/vector/src/main/java/im/vector/app/features/lifecycle/VectorActivityLifecycleCallbacks.kt +++ b/vector/src/main/java/im/vector/app/features/lifecycle/VectorActivityLifecycleCallbacks.kt @@ -33,6 +33,7 @@ import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.SupervisorJob import kotlinx.coroutines.launch import kotlinx.coroutines.withContext +import org.matrix.android.sdk.api.extensions.tryOrNull import timber.log.Timber class VectorActivityLifecycleCallbacks constructor(private val popupAlertManager: PopupAlertManager) : Application.ActivityLifecycleCallbacks { @@ -58,6 +59,26 @@ class VectorActivityLifecycleCallbacks constructor(private val popupAlertManager override fun onActivityStopped(activity: Activity) {} override fun onActivityCreated(activity: Activity, savedInstanceState: Bundle?) { + if (activitiesInfo.isEmpty()) { + val context = activity.applicationContext + val packageManager: PackageManager = context.packageManager + + // Get all activities from element android + activitiesInfo = packageManager.getPackageInfo(context.packageName, PackageManager.GET_ACTIVITIES).activities + + // Get all activities from PermissionController module + // See https://source.android.com/docs/core/architecture/modular-system/permissioncontroller#package-format + if (Build.VERSION.SDK_INT > Build.VERSION_CODES.S_V2) { + activitiesInfo += tryOrNull { + packageManager.getPackageInfo("com.google.android.permissioncontroller", PackageManager.GET_ACTIVITIES).activities + } ?: tryOrNull { + packageManager.getModuleInfo("com.google.android.permission", 1).packageName?.let { + packageManager.getPackageInfo(it, PackageManager.GET_ACTIVITIES or PackageManager.MATCH_APEX).activities + } + }.orEmpty() + } + } + // restart the app if the task contains an unknown activity coroutineScope.launch { val isTaskCorrupted = try { @@ -92,12 +113,6 @@ class VectorActivityLifecycleCallbacks constructor(private val popupAlertManager */ private suspend fun isTaskCorrupted(activity: Activity): Boolean = withContext(Dispatchers.Default) { val context = activity.applicationContext - val packageManager: PackageManager = context.packageManager - - // Get all activities from app manifest - if (activitiesInfo.isEmpty()) { - activitiesInfo = packageManager.getPackageInfo(context.packageName, PackageManager.GET_ACTIVITIES).activities - } // Get all running activities on app task // and compare to activities declared in manifest @@ -122,7 +137,7 @@ class VectorActivityLifecycleCallbacks constructor(private val popupAlertManager runningTaskInfo.topActivity?.let { // Check whether the activity task affinity matches with app task affinity. // The activity is considered safe when its task affinity doesn't correspond to app task affinity. - if (packageManager.getActivityInfo(it, 0).taskAffinity == context.applicationInfo.taskAffinity) { + if (context.packageManager.getActivityInfo(it, 0).taskAffinity == context.applicationInfo.taskAffinity) { isPotentialMaliciousActivity(it) } else false } ?: false diff --git a/vector/src/main/java/im/vector/app/features/media/ImageContentRenderer.kt b/vector/src/main/java/im/vector/app/features/media/ImageContentRenderer.kt index daaf3a19ec..baad815df2 100644 --- a/vector/src/main/java/im/vector/app/features/media/ImageContentRenderer.kt +++ b/vector/src/main/java/im/vector/app/features/media/ImageContentRenderer.kt @@ -38,7 +38,6 @@ import im.vector.app.core.glide.GlideRequest import im.vector.app.core.glide.GlideRequests import im.vector.app.core.ui.model.Size import im.vector.app.core.utils.DimensionConverter -import im.vector.app.features.settings.VectorPreferences import kotlinx.parcelize.Parcelize import org.matrix.android.sdk.api.extensions.tryOrNull import org.matrix.android.sdk.api.session.content.ContentUrlResolver @@ -65,7 +64,6 @@ class ImageContentRenderer @Inject constructor( private val localFilesHelper: LocalFilesHelper, private val activeSessionHolder: ActiveSessionHolder, private val dimensionConverter: DimensionConverter, - private val vectorPreferences: VectorPreferences ) { @Parcelize @@ -85,6 +83,7 @@ class ImageContentRenderer @Inject constructor( enum class Mode { FULL_SIZE, + ANIMATED_THUMBNAIL, THUMBNAIL, STICKER } @@ -133,7 +132,7 @@ class ImageContentRenderer @Inject constructor( createGlideRequest(data, mode, imageView, size) .let { - if (vectorPreferences.autoplayAnimatedImages()) it + if (mode == Mode.ANIMATED_THUMBNAIL) it else it.dontAnimate() } .transform(cornerTransformation) @@ -231,6 +230,7 @@ class ImageContentRenderer @Inject constructor( val contentUrlResolver = activeSessionHolder.getActiveSession().contentUrlResolver() val resolvedUrl = when (mode) { Mode.FULL_SIZE, + Mode.ANIMATED_THUMBNAIL, Mode.STICKER -> resolveUrl(data) Mode.THUMBNAIL -> contentUrlResolver.resolveThumbnail(data.url, size.width, size.height, ContentUrlResolver.ThumbnailMethod.SCALE) } @@ -269,6 +269,7 @@ class ImageContentRenderer @Inject constructor( finalHeight = height finalWidth = width } + Mode.ANIMATED_THUMBNAIL, Mode.THUMBNAIL -> { finalHeight = min(maxImageWidth * height / width, maxImageHeight) finalWidth = finalHeight * width / height diff --git a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt index 2894cd4621..65d28a5ceb 100644 --- a/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt +++ b/vector/src/main/java/im/vector/app/features/roommemberprofile/RoomMemberProfileFragment.kt @@ -59,7 +59,7 @@ import im.vector.app.features.home.room.detail.timeline.helper.MatrixItemColorPr import im.vector.app.features.roommemberprofile.devices.DeviceListBottomSheet import im.vector.app.features.roommemberprofile.powerlevel.EditPowerLevelDialogs import kotlinx.parcelize.Parcelize -import org.matrix.android.sdk.api.session.crypto.model.RoomEncryptionTrustLevel +import org.matrix.android.sdk.api.session.crypto.model.UserVerificationLevel import org.matrix.android.sdk.api.session.room.powerlevels.Role import org.matrix.android.sdk.api.util.MatrixItem import javax.inject.Inject @@ -235,23 +235,27 @@ class RoomMemberProfileFragment : if (state.userMXCrossSigningInfo.isTrusted()) { // User is trusted if (state.allDevicesAreCrossSignedTrusted) { - RoomEncryptionTrustLevel.Trusted + UserVerificationLevel.VERIFIED_ALL_DEVICES_TRUSTED } else { - RoomEncryptionTrustLevel.Warning + UserVerificationLevel.VERIFIED_WITH_DEVICES_UNTRUSTED } } else { - RoomEncryptionTrustLevel.Default + if (state.userMXCrossSigningInfo.wasTrustedOnce) { + UserVerificationLevel.UNVERIFIED_BUT_WAS_PREVIOUSLY + } else { + UserVerificationLevel.WAS_NEVER_VERIFIED + } } } else { // Legacy if (state.allDevicesAreTrusted) { - RoomEncryptionTrustLevel.Trusted + UserVerificationLevel.VERIFIED_ALL_DEVICES_TRUSTED } else { - RoomEncryptionTrustLevel.Warning + UserVerificationLevel.VERIFIED_WITH_DEVICES_UNTRUSTED } } - headerViews.memberProfileDecorationImageView.render(trustLevel) - views.matrixProfileDecorationToolbarAvatarImageView.render(trustLevel) + headerViews.memberProfileDecorationImageView.renderUser(trustLevel) + views.matrixProfileDecorationToolbarAvatarImageView.renderUser(trustLevel) } else { headerViews.memberProfileDecorationImageView.isVisible = false } diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileAction.kt b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileAction.kt index 22b040b4c0..44bac1c8a0 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileAction.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileAction.kt @@ -27,4 +27,5 @@ sealed class RoomProfileAction : VectorViewModelAction { object ShareRoomProfile : RoomProfileAction() object CreateShortcut : RoomProfileAction() object RestoreEncryptionState : RoomProfileAction() + data class SetEncryptToVerifiedDeviceOnly(val enabled: Boolean) : RoomProfileAction() } diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileController.kt b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileController.kt index 06f56bff89..eb43a345f2 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileController.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileController.kt @@ -27,6 +27,7 @@ import im.vector.app.core.resources.DrawableProvider import im.vector.app.core.resources.StringProvider import im.vector.app.core.ui.list.genericFooterItem import im.vector.app.core.ui.list.genericPositiveButtonItem +import im.vector.app.features.form.formSwitchItem import im.vector.app.features.home.ShortcutCreator import im.vector.app.features.home.room.detail.timeline.TimelineEventController import im.vector.app.features.home.room.detail.timeline.tools.createLinkMovementMethod @@ -66,6 +67,8 @@ class RoomProfileController @Inject constructor( fun onUrlInTopicLongClicked(url: String) fun doMigrateToVersion(newVersion: String) fun restoreEncryptionState() + fun setEncryptedToVerifiedDevicesOnly(enabled: Boolean) + fun openGlobalBlockSettings() } override fun buildModels(data: RoomProfileViewState?) { @@ -175,6 +178,53 @@ class RoomProfileController @Inject constructor( } buildEncryptionAction(data.actionPermissions, roomSummary) + if (roomSummary.isEncrypted && !encryptionMisconfigured) { + data.globalCryptoConfig.invoke()?.let { globalConfig -> + if (globalConfig.globalBlockUnverifiedDevices) { + genericFooterItem { + id("globalConfig") + centered(false) + text( + span { + +host.stringProvider.getString(R.string.room_settings_global_block_unverified_info_text) + apply { + if (data.unverifiedDevicesInTheRoom.invoke() == true) { + +"\n" + +host.stringProvider.getString(R.string.some_devices_will_not_be_able_to_decrypt) + } + } + }.toEpoxyCharSequence() + ) + itemClickAction { + host.callback?.openGlobalBlockSettings() + } + } + } else { + // per room setting is available + val shouldBlockUnverified = data.encryptToVerifiedDeviceOnly.invoke() + formSwitchItem { + id("send_to_unverified") + enabled(shouldBlockUnverified != null) + title(host.stringProvider.getString(R.string.encryption_never_send_to_unverified_devices_in_room)) + + switchChecked(shouldBlockUnverified ?: false) + + apply { + if (shouldBlockUnverified == true && data.unverifiedDevicesInTheRoom.invoke() == true) { + summary( + host.stringProvider.getString(R.string.some_devices_will_not_be_able_to_decrypt) + ) + } else { + summary(null) + } + } + listener { value -> + host.callback?.setEncryptedToVerifiedDevicesOnly(value) + } + } + } + } + } // More buildProfileSection(stringProvider.getString(R.string.room_profile_section_more)) buildProfileAction( diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileFragment.kt b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileFragment.kt index 4135ab3d1c..f4394111ab 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileFragment.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileFragment.kt @@ -53,6 +53,7 @@ import im.vector.app.features.home.room.detail.RoomDetailPendingActionStore import im.vector.app.features.home.room.detail.upgrade.MigrateRoomBottomSheet import im.vector.app.features.home.room.list.actions.RoomListQuickActionsSharedAction import im.vector.app.features.home.room.list.actions.RoomListQuickActionsSharedActionViewModel +import im.vector.app.features.navigation.SettingsActivityPayload import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach import kotlinx.parcelize.Parcelize @@ -346,6 +347,14 @@ class RoomProfileFragment : ) } + override fun setEncryptedToVerifiedDevicesOnly(enabled: Boolean) { + roomProfileViewModel.handle(RoomProfileAction.SetEncryptToVerifiedDeviceOnly(enabled)) + } + + override fun openGlobalBlockSettings() { + navigator.openSettings(requireContext(), SettingsActivityPayload.SecurityPrivacy) + } + private fun onAvatarClicked(view: View) = withState(roomProfileViewModel) { state -> state.roomSummary()?.toMatrixItem()?.let { matrixItem -> navigator.openBigImageViewer(requireActivity(), view, matrixItem) diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileViewModel.kt b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileViewModel.kt index 30664c5618..215a1e1e9c 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileViewModel.kt @@ -17,6 +17,7 @@ package im.vector.app.features.roomprofile +import androidx.lifecycle.asFlow import com.airbnb.mvrx.MavericksViewModelFactory import dagger.assisted.Assisted import dagger.assisted.AssistedFactory @@ -32,7 +33,11 @@ import im.vector.app.features.home.ShortcutCreator import im.vector.app.features.powerlevel.PowerLevelsFlowFactory import im.vector.app.features.session.coroutineScope import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.flow.combine +import kotlinx.coroutines.flow.flatMapLatest +import kotlinx.coroutines.flow.flowOf import kotlinx.coroutines.flow.launchIn +import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.launch import org.matrix.android.sdk.api.query.QueryStringValue @@ -76,6 +81,45 @@ class RoomProfileViewModel @AssistedInject constructor( observeBannedRoomMembers(flowRoom) observePermissions() observePowerLevels() + observeCryptoSettings(flowRoom) + } + + private fun observeCryptoSettings(flowRoom: FlowRoom) { + val perRoomBlockStatus = session.cryptoService().getLiveBlockUnverifiedDevices(initialState.roomId) + .asFlow() + + perRoomBlockStatus + .execute { + copy(encryptToVerifiedDeviceOnly = it) + } + + val globalBlockStatus = session.cryptoService().getLiveGlobalCryptoConfig() + .asFlow() + + globalBlockStatus + .execute { + copy(globalCryptoConfig = it) + } + + perRoomBlockStatus.combine(globalBlockStatus) { perRoom, global -> + perRoom || global.globalBlockUnverifiedDevices + }.flatMapLatest { + if (it) { + flowRoom.liveRoomMembers(roomMemberQueryParams { memberships = Membership.activeMemberships() }) + .map { it.map { it.userId } } + .flatMapLatest { + session.cryptoService().getLiveCryptoDeviceInfo(it).asFlow() + } + } else { + flowOf(emptyList()) + } + }.map { + it.isNotEmpty() + }.execute { + copy( + unverifiedDevicesInTheRoom = it + ) + } } private fun observePowerLevels() { @@ -141,6 +185,7 @@ class RoomProfileViewModel @AssistedInject constructor( is RoomProfileAction.ShareRoomProfile -> handleShareRoomProfile() RoomProfileAction.CreateShortcut -> handleCreateShortcut() RoomProfileAction.RestoreEncryptionState -> restoreEncryptionState() + is RoomProfileAction.SetEncryptToVerifiedDeviceOnly -> setEncryptToVerifiedDeviceOnly(action.enabled) } } @@ -212,6 +257,12 @@ class RoomProfileViewModel @AssistedInject constructor( } } + private fun setEncryptToVerifiedDeviceOnly(enabled: Boolean) { + session.coroutineScope.launch { + session.cryptoService().setRoomBlockUnverifiedDevices(room.roomId, enabled) + } + } + private fun restoreEncryptionState() { _viewEvents.post(RoomProfileViewEvents.Loading()) session.coroutineScope.launch { diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileViewState.kt b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileViewState.kt index 87db15ea3b..5393ceb152 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileViewState.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileViewState.kt @@ -20,6 +20,7 @@ package im.vector.app.features.roomprofile import com.airbnb.mvrx.Async import com.airbnb.mvrx.MavericksState import com.airbnb.mvrx.Uninitialized +import org.matrix.android.sdk.api.session.crypto.GlobalCryptoConfig import org.matrix.android.sdk.api.session.room.model.RoomMemberSummary import org.matrix.android.sdk.api.session.room.model.RoomSummary import org.matrix.android.sdk.api.session.room.model.create.RoomCreateContent @@ -35,7 +36,10 @@ data class RoomProfileViewState( val recommendedRoomVersion: String? = null, val canUpgradeRoom: Boolean = false, val isTombstoned: Boolean = false, - val canUpdateRoomState: Boolean = false + val canUpdateRoomState: Boolean = false, + val encryptToVerifiedDeviceOnly: Async = Uninitialized, + val globalCryptoConfig: Async = Uninitialized, + val unverifiedDevicesInTheRoom: Async = Uninitialized, ) : MavericksState { constructor(args: RoomProfileArgs) : this(roomId = args.roomId) diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListController.kt b/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListController.kt index 8f310a6a89..9adfeb2a0e 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListController.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListController.kt @@ -129,7 +129,7 @@ class RoomMemberListController @Inject constructor( id(roomMember.userId) matrixItem(roomMember.toMatrixItem()) avatarRenderer(host.avatarRenderer) - userEncryptionTrustLevel(data.trustLevelMap.invoke()?.get(roomMember.userId)) + userVerificationLevel(data.trustLevelMap.invoke()?.get(roomMember.userId)) clickListener { host.callback?.onRoomMemberClicked(roomMember) } diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListViewModel.kt b/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListViewModel.kt index 915ce51d91..9ddcde7e4a 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListViewModel.kt @@ -37,7 +37,8 @@ import kotlinx.coroutines.launch import org.matrix.android.sdk.api.extensions.orFalse import org.matrix.android.sdk.api.query.QueryStringValue import org.matrix.android.sdk.api.session.Session -import org.matrix.android.sdk.api.session.crypto.model.RoomEncryptionTrustLevel +import org.matrix.android.sdk.api.session.crypto.model.CryptoDeviceInfo +import org.matrix.android.sdk.api.session.crypto.model.UserVerificationLevel import org.matrix.android.sdk.api.session.events.model.EventType import org.matrix.android.sdk.api.session.events.model.toModel import org.matrix.android.sdk.api.session.getRoom @@ -116,14 +117,7 @@ class RoomMemberListViewModel @AssistedInject constructor( .map { deviceList -> // If any key change, emit the userIds list deviceList.groupBy { it.userId }.mapValues { - val allDeviceTrusted = it.value.fold(it.value.isNotEmpty()) { prev, next -> - prev && next.trustLevel?.isCrossSigningVerified().orFalse() - } - if (session.cryptoService().crossSigningService().getUserCrossSigningKeys(it.key)?.isTrusted().orFalse()) { - if (allDeviceTrusted) RoomEncryptionTrustLevel.Trusted else RoomEncryptionTrustLevel.Warning - } else { - RoomEncryptionTrustLevel.Default - } + getUserTrustLevel(it.key, it.value) } } } @@ -133,6 +127,29 @@ class RoomMemberListViewModel @AssistedInject constructor( } } + private fun getUserTrustLevel(userId: String, devices: List): UserVerificationLevel { + val allDeviceTrusted = devices.fold(devices.isNotEmpty()) { prev, next -> + prev && next.trustLevel?.isCrossSigningVerified().orFalse() + } + val mxCrossSigningInfo = session.cryptoService().crossSigningService().getUserCrossSigningKeys(userId) + return when { + mxCrossSigningInfo == null -> { + UserVerificationLevel.WAS_NEVER_VERIFIED + } + mxCrossSigningInfo.isTrusted() -> { + if (allDeviceTrusted) UserVerificationLevel.VERIFIED_ALL_DEVICES_TRUSTED + else UserVerificationLevel.VERIFIED_WITH_DEVICES_UNTRUSTED + } + else -> { + if (mxCrossSigningInfo.wasTrustedOnce) { + UserVerificationLevel.UNVERIFIED_BUT_WAS_PREVIOUSLY + } else { + UserVerificationLevel.WAS_NEVER_VERIFIED + } + } + } + } + private fun observePowerLevel() { PowerLevelsFlowFactory(room).createFlow() .onEach { diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListViewState.kt b/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListViewState.kt index 3cea47e60d..7861970c28 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListViewState.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/members/RoomMemberListViewState.kt @@ -23,7 +23,7 @@ import com.airbnb.mvrx.Uninitialized import im.vector.app.R import im.vector.app.core.platform.GenericIdArgs import im.vector.app.features.roomprofile.RoomProfileArgs -import org.matrix.android.sdk.api.session.crypto.model.RoomEncryptionTrustLevel +import org.matrix.android.sdk.api.session.crypto.model.UserVerificationLevel import org.matrix.android.sdk.api.session.events.model.Event import org.matrix.android.sdk.api.session.room.model.RoomMemberSummary import org.matrix.android.sdk.api.session.room.model.RoomSummary @@ -36,7 +36,7 @@ data class RoomMemberListViewState( val ignoredUserIds: List = emptyList(), val filter: String = "", val threePidInvites: Async> = Uninitialized, - val trustLevelMap: Async> = Uninitialized, + val trustLevelMap: Async> = Uninitialized, val actionsPermissions: ActionPermissions = ActionPermissions() ) : MavericksState { diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/settings/RoomSettingsViewState.kt b/vector/src/main/java/im/vector/app/features/roomprofile/settings/RoomSettingsViewState.kt index 81e98335c0..10465b03ea 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/settings/RoomSettingsViewState.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/settings/RoomSettingsViewState.kt @@ -45,7 +45,7 @@ data class RoomSettingsViewState( val showSaveAction: Boolean = false, val actionPermissions: ActionPermissions = ActionPermissions(), val supportsRestricted: Boolean = false, - val canUpgradeToRestricted: Boolean = false + val canUpgradeToRestricted: Boolean = false, ) : MavericksState { constructor(args: RoomProfileArgs) : this(roomId = args.roomId) diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt b/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt index 16d3210b45..b7812b9ebb 100755 --- a/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorPreferences.kt @@ -87,6 +87,7 @@ class VectorPreferences @Inject constructor( const val SETTINGS_INTEGRATION_MANAGER_UI_URL_KEY = "SETTINGS_INTEGRATION_MANAGER_UI_URL_KEY" const val SETTINGS_SECURE_MESSAGE_RECOVERY_PREFERENCE_KEY = "SETTINGS_SECURE_MESSAGE_RECOVERY_PREFERENCE_KEY" const val SETTINGS_PERSISTED_SPACE_BACKSTACK = "SETTINGS_PERSISTED_SPACE_BACKSTACK" + const val SETTINGS_SECURITY_INCOGNITO_KEYBOARD_PREFERENCE_KEY = "SETTINGS_SECURITY_INCOGNITO_KEYBOARD_PREFERENCE_KEY" const val SETTINGS_CRYPTOGRAPHY_HS_ADMIN_DISABLED_E2E_DEFAULT = "SETTINGS_CRYPTOGRAPHY_HS_ADMIN_DISABLED_E2E_DEFAULT" // const val SETTINGS_SECURE_BACKUP_RESET_PREFERENCE_KEY = "SETTINGS_SECURE_BACKUP_RESET_PREFERENCE_KEY" @@ -288,6 +289,7 @@ class VectorPreferences @Inject constructor( SETTINGS_USE_RAGE_SHAKE_KEY, SETTINGS_SECURITY_USE_FLAG_SECURE, + SETTINGS_SECURITY_INCOGNITO_KEYBOARD_PREFERENCE_KEY, ShortcutsHandler.SHARED_PREF_KEY, ) @@ -969,6 +971,11 @@ class VectorPreferences @Inject constructor( return defaultPrefs.getBoolean(SETTINGS_SECURITY_USE_FLAG_SECURE, false) } + /** Whether the keyboard should disable personalized learning. */ + fun useIncognitoKeyboard(): Boolean { + return defaultPrefs.getBoolean(SETTINGS_SECURITY_INCOGNITO_KEYBOARD_PREFERENCE_KEY, false) + } + /** * The user enable protecting app access with pin code. * Currently we use the pin code store to know if the pin is enabled, so this is not used diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt index 5cbdf114a5..87f5af67eb 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsSecurityPrivacyFragment.kt @@ -20,6 +20,7 @@ package im.vector.app.features.settings import android.app.Activity import android.content.Intent import android.net.Uri +import android.os.Build import android.os.Bundle import android.view.LayoutInflater import android.view.View @@ -160,6 +161,10 @@ class VectorSettingsSecurityPrivacyFragment : findPreference("SETTINGS_USER_ANALYTICS_CONSENT_KEY")!! } + private val incognitoKeyboardPref by lazy { + findPreference(VectorPreferences.SETTINGS_SECURITY_INCOGNITO_KEYBOARD_PREFERENCE_KEY)!! + } + override fun onCreateRecyclerView(inflater: LayoutInflater, parent: ViewGroup, savedInstanceState: Bundle?): RecyclerView { return super.onCreateRecyclerView(inflater, parent, savedInstanceState).also { // Insert animation are really annoying the first time the list is shown @@ -275,6 +280,9 @@ class VectorSettingsSecurityPrivacyFragment : // Analytics setUpAnalytics() + // Incognito Keyboard + setUpIncognitoKeyboard() + // Pin code openPinCodeSettingsPref.setOnPreferenceClickListener { openPinCodePreferenceScreen() @@ -337,6 +345,10 @@ class VectorSettingsSecurityPrivacyFragment : } } + private fun setUpIncognitoKeyboard() { + incognitoKeyboardPref.isVisible = Build.VERSION.SDK_INT >= Build.VERSION_CODES.O + } + // Todo this should be refactored and use same state as 4S section private fun refreshXSigningStatus() { val crossSigningKeys = session.cryptoService().crossSigningService().getMyCrossSigningKeys() diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/DeviceExtendedInfo.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/DeviceExtendedInfo.kt new file mode 100644 index 0000000000..24e4606ca7 --- /dev/null +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/DeviceExtendedInfo.kt @@ -0,0 +1,42 @@ +/* + * Copyright (c) 2022 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.features.settings.devices.v2 + +import im.vector.app.features.settings.devices.v2.list.DeviceType + +data class DeviceExtendedInfo( + /** + * One of MOBILE, WEB, DESKTOP or UNKNOWN. + */ + val deviceType: DeviceType, + /** + * i.e. Google Pixel 6. + */ + val deviceModel: String? = null, + /** + * i.e. Android 11. + */ + val deviceOperatingSystem: String? = null, + /** + * i.e. Element Nightly. + */ + val clientName: String? = null, + /** + * i.e. 1.5.0. + */ + val clientVersion: String? = null, +) diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/DeviceFullInfo.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/DeviceFullInfo.kt index 373df53b1b..445eb6226f 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devices/v2/DeviceFullInfo.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/DeviceFullInfo.kt @@ -26,4 +26,5 @@ data class DeviceFullInfo( val roomEncryptionTrustLevel: RoomEncryptionTrustLevel, val isInactive: Boolean, val isCurrentDevice: Boolean, + val deviceExtendedInfo: DeviceExtendedInfo, ) diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/GetDeviceFullInfoListUseCase.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/GetDeviceFullInfoListUseCase.kt index b2341e23f7..0272bea351 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devices/v2/GetDeviceFullInfoListUseCase.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/GetDeviceFullInfoListUseCase.kt @@ -38,6 +38,7 @@ class GetDeviceFullInfoListUseCase @Inject constructor( private val getEncryptionTrustLevelForDeviceUseCase: GetEncryptionTrustLevelForDeviceUseCase, private val getCurrentSessionCrossSigningInfoUseCase: GetCurrentSessionCrossSigningInfoUseCase, private val filterDevicesUseCase: FilterDevicesUseCase, + private val parseDeviceUserAgentUseCase: ParseDeviceUserAgentUseCase, ) { fun execute(filterType: DeviceManagerFilterType, excludeCurrentDevice: Boolean = false): Flow> { @@ -72,7 +73,8 @@ class GetDeviceFullInfoListUseCase @Inject constructor( val roomEncryptionTrustLevel = getEncryptionTrustLevelForDeviceUseCase.execute(currentSessionCrossSigningInfo, cryptoDeviceInfo) val isInactive = checkIfSessionIsInactiveUseCase.execute(deviceInfo.lastSeenTs ?: 0) val isCurrentDevice = currentSessionCrossSigningInfo.deviceId == cryptoDeviceInfo?.deviceId - DeviceFullInfo(deviceInfo, cryptoDeviceInfo, roomEncryptionTrustLevel, isInactive, isCurrentDevice) + val deviceUserAgent = parseDeviceUserAgentUseCase.execute(deviceInfo.getBestLastSeenUserAgent()) + DeviceFullInfo(deviceInfo, cryptoDeviceInfo, roomEncryptionTrustLevel, isInactive, isCurrentDevice, deviceUserAgent) } } } diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/ParseDeviceUserAgentUseCase.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/ParseDeviceUserAgentUseCase.kt new file mode 100644 index 0000000000..f5f1782d82 --- /dev/null +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/ParseDeviceUserAgentUseCase.kt @@ -0,0 +1,192 @@ +/* + * Copyright (c) 2022 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.features.settings.devices.v2 + +import im.vector.app.features.settings.devices.v2.list.DeviceType +import org.matrix.android.sdk.api.extensions.orFalse +import javax.inject.Inject + +class ParseDeviceUserAgentUseCase @Inject constructor() { + + fun execute(userAgent: String?): DeviceExtendedInfo { + if (userAgent == null) return createUnknownUserAgent() + + return when { + userAgent.contains(ANDROID_KEYWORD) -> parseAndroidUserAgent(userAgent) + userAgent.contains(IOS_KEYWORD) -> parseIosUserAgent(userAgent) + userAgent.contains(DESKTOP_KEYWORD) -> parseDesktopUserAgent(userAgent) + userAgent.contains(WEB_KEYWORD) -> parseWebUserAgent(userAgent) + else -> createUnknownUserAgent() + } + } + + private fun parseAndroidUserAgent(userAgent: String): DeviceExtendedInfo { + val appName = userAgent.substringBefore("/") + val appVersion = userAgent.substringAfter("/").substringBefore(" (") + val deviceInfoSegments = userAgent.substringAfter("(").substringBeforeLast(")").split("; ") + val deviceModel: String? + val deviceOperatingSystem: String? + if (deviceInfoSegments.firstOrNull() == "Linux") { + val deviceOperatingSystemIndex = deviceInfoSegments.indexOfFirst { it.startsWith("Android") } + deviceOperatingSystem = deviceInfoSegments.getOrNull(deviceOperatingSystemIndex) + deviceModel = deviceInfoSegments.getOrNull(deviceOperatingSystemIndex + 1) + } else { + deviceModel = deviceInfoSegments.getOrNull(0) + deviceOperatingSystem = deviceInfoSegments.getOrNull(1) + } + return DeviceExtendedInfo( + deviceType = DeviceType.MOBILE, + deviceModel = deviceModel, + deviceOperatingSystem = deviceOperatingSystem, + clientName = appName, + clientVersion = appVersion + ) + } + + private fun parseIosUserAgent(userAgent: String): DeviceExtendedInfo { + val appName = userAgent.substringBefore("/") + val appVersion = userAgent.substringAfter("/").substringBefore(" (") + val deviceInfoSegments = userAgent.substringAfter("(").substringBeforeLast(")").split("; ") + val deviceModel = deviceInfoSegments.getOrNull(0) + val deviceOperatingSystem = deviceInfoSegments.getOrNull(1) + return DeviceExtendedInfo( + deviceType = DeviceType.MOBILE, + deviceModel = deviceModel, + deviceOperatingSystem = deviceOperatingSystem, + clientName = appName, + clientVersion = appVersion + ) + } + + private fun parseDesktopUserAgent(userAgent: String): DeviceExtendedInfo { + val browserSegments = userAgent.split(" ") + val (browserName, browserVersion) = when { + isFirefox(browserSegments) -> { + Pair("Firefox", getBrowserVersion(browserSegments, "Firefox")) + } + isEdge(browserSegments) -> { + Pair("Edge", getBrowserVersion(browserSegments, "Edge")) + } + isMobile(browserSegments) -> { + when (val name = getMobileBrowserName(browserSegments)) { + null -> { + Pair(null, null) + } + "Safari" -> { + Pair(name, getBrowserVersion(browserSegments, "Version")) + } + else -> { + Pair(name, getBrowserVersion(browserSegments, name)) + } + } + } + isSafari(browserSegments) -> { + Pair("Safari", getBrowserVersion(browserSegments, "Version")) + } + else -> { + when (val name = getRegularBrowserName(browserSegments)) { + null -> { + Pair(null, null) + } + else -> { + Pair(name, getBrowserVersion(browserSegments, name)) + } + } + } + } + + val deviceOperatingSystemSegments = userAgent.substringAfter("(").substringBefore(")").split("; ") + val deviceOperatingSystem = if (deviceOperatingSystemSegments.getOrNull(1)?.startsWith("Android").orFalse()) { + deviceOperatingSystemSegments.getOrNull(1) + } else { + deviceOperatingSystemSegments.getOrNull(0) + } + return DeviceExtendedInfo( + deviceType = DeviceType.DESKTOP, + deviceModel = null, + deviceOperatingSystem = deviceOperatingSystem, + clientName = browserName, + clientVersion = browserVersion, + ) + } + + private fun parseWebUserAgent(userAgent: String): DeviceExtendedInfo { + return parseDesktopUserAgent(userAgent).copy( + deviceType = DeviceType.WEB + ) + } + + private fun createUnknownUserAgent(): DeviceExtendedInfo { + return DeviceExtendedInfo(DeviceType.UNKNOWN) + } + + private fun isFirefox(browserSegments: List): Boolean { + return browserSegments.lastOrNull()?.startsWith("Firefox").orFalse() + } + + private fun getBrowserVersion(browserSegments: List, browserName: String): String? { + // Chrome/104.0.3497.100 -> 104 + return browserSegments + .find { it.startsWith(browserName) } + ?.split("/") + ?.getOrNull(1) + ?.split(".") + ?.firstOrNull() + } + + private fun isEdge(browserSegments: List): Boolean { + return browserSegments.lastOrNull()?.startsWith("Edge").orFalse() + } + + private fun isSafari(browserSegments: List): Boolean { + return browserSegments.lastOrNull()?.startsWith("Safari").orFalse() && + browserSegments.getOrNull(browserSegments.size - 2)?.startsWith("Version").orFalse() + } + + private fun isMobile(browserSegments: List): Boolean { + return browserSegments.getOrNull(browserSegments.size - 2)?.startsWith("Mobile").orFalse() + } + + private fun getMobileBrowserName(browserSegments: List): String? { + val possibleBrowserName = browserSegments.getOrNull(browserSegments.size - 3)?.split("/")?.firstOrNull() + return if (possibleBrowserName == "Version") { + "Safari" + } else { + possibleBrowserName + } + } + + private fun getRegularBrowserName(browserSegments: List): String? { + return browserSegments.getOrNull(browserSegments.size - 2)?.split("/")?.firstOrNull() + } + + companion object { + // Element dbg/1.5.0-dev (Xiaomi; Mi 9T; Android 11; RKQ1.200826.002 test-keys; Flavour GooglePlay; MatrixAndroidSdk2 1.5.0) + // Legacy : Element/1.0.0 (Linux; U; Android 6.0.1; SM-A510F Build/MMB29; Flavour GPlay; MatrixAndroidSdk2 1.0) + private const val ANDROID_KEYWORD = "; MatrixAndroidSdk2" + + // Element/1.8.21 (iPhone XS Max; iOS 15.2; Scale/3.00) + private const val IOS_KEYWORD = "; iOS " + + // Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) ElementNightly/2022091301 + // Chrome/104.0.5112.102 Electron/20.1.1 Safari/537.36 + private const val DESKTOP_KEYWORD = " Electron/" + + // Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36 + private const val WEB_KEYWORD = "Mozilla/" + } +} diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/VectorSettingsDevicesFragment.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/VectorSettingsDevicesFragment.kt index 1e5c4d88e0..0fdbd40178 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devices/v2/VectorSettingsDevicesFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/VectorSettingsDevicesFragment.kt @@ -21,7 +21,6 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup -import android.widget.Toast import androidx.appcompat.app.AppCompatActivity import androidx.core.view.isVisible import com.airbnb.mvrx.Success @@ -82,7 +81,6 @@ class VectorSettingsDevicesFragment : override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - initLearnMoreButtons() initWaitingView() initOtherSessionsView() initSecurityRecommendationsView() @@ -155,12 +153,6 @@ class VectorSettingsDevicesFragment : super.onDestroyView() } - private fun initLearnMoreButtons() { - views.deviceListHeaderOtherSessions.onLearnMoreClickListener = { - Toast.makeText(context, "Learn more other", Toast.LENGTH_LONG).show() - } - } - private fun cleanUpLearnMoreButtonsListeners() { views.deviceListHeaderOtherSessions.onLearnMoreClickListener = null } diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/SessionsListHeaderView.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/SessionsListHeaderView.kt index ef8682df01..0660e7d642 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/SessionsListHeaderView.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/list/SessionsListHeaderView.kt @@ -65,14 +65,23 @@ class SessionsListHeaderView @JvmOverloads constructor( return } + val hasLearnMoreLink = typedArray.getBoolean(R.styleable.SessionsListHeaderView_sessionsListHeaderHasLearnMoreLink, true) + if (hasLearnMoreLink) { + setDescriptionWithLearnMore(description) + } else { + binding.sessionsListHeaderDescription.text = description + } + + binding.sessionsListHeaderDescription.isVisible = true + } + + private fun setDescriptionWithLearnMore(description: String) { val learnMore = context.getString(R.string.action_learn_more) val fullDescription = buildString { append(description) append(" ") append(learnMore) } - - binding.sessionsListHeaderDescription.isVisible = true binding.sessionsListHeaderDescription.setTextWithColoredPart( fullText = fullDescription, coloredPart = learnMore, diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/more/SessionLearnMoreBottomSheet.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/more/SessionLearnMoreBottomSheet.kt new file mode 100644 index 0000000000..22ca06eb1e --- /dev/null +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/more/SessionLearnMoreBottomSheet.kt @@ -0,0 +1,75 @@ +/* + * Copyright (c) 2022 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.features.settings.devices.v2.more + +import android.os.Bundle +import android.os.Parcelable +import android.view.LayoutInflater +import android.view.View +import android.view.ViewGroup +import androidx.fragment.app.FragmentManager +import com.airbnb.mvrx.fragmentViewModel +import com.airbnb.mvrx.withState +import dagger.hilt.android.AndroidEntryPoint +import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment +import im.vector.app.databinding.BottomSheetSessionLearnMoreBinding +import kotlinx.parcelize.Parcelize + +@AndroidEntryPoint +class SessionLearnMoreBottomSheet : VectorBaseBottomSheetDialogFragment() { + + @Parcelize + data class Args( + val title: String, + val description: String, + ) : Parcelable + + private val viewModel: SessionLearnMoreViewModel by fragmentViewModel() + + override val showExpanded = true + + override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): BottomSheetSessionLearnMoreBinding { + return BottomSheetSessionLearnMoreBinding.inflate(inflater, container, false) + } + + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { + super.onViewCreated(view, savedInstanceState) + initCloseButton() + } + + private fun initCloseButton() { + views.bottomSheetSessionLearnMoreCloseButton.debouncedClicks { + dismiss() + } + } + + override fun invalidate() = withState(viewModel) { viewState -> + super.invalidate() + views.bottomSheetSessionLearnMoreTitle.text = viewState.title + views.bottomSheetSessionLearnMoreDescription.text = viewState.description + } + + companion object { + + fun show(fragmentManager: FragmentManager, args: Args) { + val bottomSheet = SessionLearnMoreBottomSheet() + bottomSheet.isCancelable = true + bottomSheet.setArguments(args) + bottomSheet.show(fragmentManager, "SessionLearnMoreBottomSheet") + } + } +} diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/more/SessionLearnMoreViewModel.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/more/SessionLearnMoreViewModel.kt new file mode 100644 index 0000000000..09ca2df15d --- /dev/null +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/more/SessionLearnMoreViewModel.kt @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2022 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.features.settings.devices.v2.more + +import com.airbnb.mvrx.MavericksViewModelFactory +import dagger.assisted.Assisted +import dagger.assisted.AssistedFactory +import dagger.assisted.AssistedInject +import im.vector.app.core.di.MavericksAssistedViewModelFactory +import im.vector.app.core.di.hiltMavericksViewModelFactory +import im.vector.app.core.platform.EmptyAction +import im.vector.app.core.platform.EmptyViewEvents +import im.vector.app.core.platform.VectorViewModel + +class SessionLearnMoreViewModel @AssistedInject constructor( + @Assisted initialState: SessionLearnMoreViewState, +) : VectorViewModel(initialState) { + + @AssistedFactory + interface Factory : MavericksAssistedViewModelFactory { + override fun create(initialState: SessionLearnMoreViewState): SessionLearnMoreViewModel + } + + companion object : MavericksViewModelFactory by hiltMavericksViewModelFactory() + + override fun handle(action: EmptyAction) { + // do nothing + } +} diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/more/SessionLearnMoreViewState.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/more/SessionLearnMoreViewState.kt new file mode 100644 index 0000000000..cade2ce861 --- /dev/null +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/more/SessionLearnMoreViewState.kt @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2022 New Vector Ltd + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package im.vector.app.features.settings.devices.v2.more + +import com.airbnb.mvrx.MavericksState + +data class SessionLearnMoreViewState( + val title: String, + val description: String, +) : MavericksState { + constructor(args: SessionLearnMoreBottomSheet.Args) : this( + title = args.title, + description = args.description, + ) +} diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/othersessions/OtherSessionsFragment.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/othersessions/OtherSessionsFragment.kt index 5734b04089..610776e22e 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devices/v2/othersessions/OtherSessionsFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/othersessions/OtherSessionsFragment.kt @@ -20,6 +20,7 @@ import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup +import androidx.annotation.StringRes import androidx.core.view.isVisible import com.airbnb.mvrx.Success import com.airbnb.mvrx.args @@ -37,6 +38,7 @@ import im.vector.app.features.settings.devices.v2.filter.DeviceManagerFilterBott import im.vector.app.features.settings.devices.v2.filter.DeviceManagerFilterType import im.vector.app.features.settings.devices.v2.list.OtherSessionsView import im.vector.app.features.settings.devices.v2.list.SESSION_IS_MARKED_AS_INACTIVE_AFTER_DAYS +import im.vector.app.features.settings.devices.v2.more.SessionLearnMoreBottomSheet import im.vector.app.features.themes.ThemeUtils import javax.inject.Inject @@ -121,6 +123,7 @@ class OtherSessionsFragment : ) ) views.otherSessionsNotFoundTextView.text = getString(R.string.device_manager_other_sessions_no_verified_sessions_found) + updateSecurityLearnMoreButton(R.string.device_manager_learn_more_sessions_verified_title, R.string.device_manager_learn_more_sessions_verified) } DeviceManagerFilterType.UNVERIFIED -> { views.otherSessionsSecurityRecommendationView.render( @@ -132,6 +135,10 @@ class OtherSessionsFragment : ) ) views.otherSessionsNotFoundTextView.text = getString(R.string.device_manager_other_sessions_no_unverified_sessions_found) + updateSecurityLearnMoreButton( + R.string.device_manager_learn_more_sessions_unverified_title, + R.string.device_manager_learn_more_sessions_unverified + ) } DeviceManagerFilterType.INACTIVE -> { views.otherSessionsSecurityRecommendationView.render( @@ -147,8 +154,10 @@ class OtherSessionsFragment : ) ) views.otherSessionsNotFoundTextView.text = getString(R.string.device_manager_other_sessions_no_inactive_sessions_found) + updateSecurityLearnMoreButton(R.string.device_manager_learn_more_sessions_inactive_title, R.string.device_manager_learn_more_sessions_inactive) + } + DeviceManagerFilterType.ALL_SESSIONS -> { /* NOOP. View is not visible */ } - DeviceManagerFilterType.ALL_SESSIONS -> { /* NOOP. View is not visible */ } } if (devices.isNullOrEmpty()) { @@ -161,6 +170,26 @@ class OtherSessionsFragment : } } + private fun updateSecurityLearnMoreButton( + @StringRes titleResId: Int, + @StringRes descriptionResId: Int, + ) { + views.otherSessionsSecurityRecommendationView.onLearnMoreClickListener = { + showLearnMoreInfo(titleResId, getString(descriptionResId)) + } + } + + private fun showLearnMoreInfo( + @StringRes titleResId: Int, + description: String, + ) { + val args = SessionLearnMoreBottomSheet.Args( + title = getString(titleResId), + description = description, + ) + SessionLearnMoreBottomSheet.show(childFragmentManager, args) + } + override fun onOtherSessionClicked(deviceId: String) { viewNavigator.navigateToSessionOverview( context = requireActivity(), diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/GetDeviceFullInfoUseCase.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/GetDeviceFullInfoUseCase.kt index 121973a134..42cd49b072 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/GetDeviceFullInfoUseCase.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/GetDeviceFullInfoUseCase.kt @@ -19,6 +19,7 @@ package im.vector.app.features.settings.devices.v2.overview import androidx.lifecycle.asFlow import im.vector.app.core.di.ActiveSessionHolder import im.vector.app.features.settings.devices.v2.DeviceFullInfo +import im.vector.app.features.settings.devices.v2.ParseDeviceUserAgentUseCase import im.vector.app.features.settings.devices.v2.list.CheckIfSessionIsInactiveUseCase import im.vector.app.features.settings.devices.v2.verification.GetCurrentSessionCrossSigningInfoUseCase import im.vector.app.features.settings.devices.v2.verification.GetEncryptionTrustLevelForDeviceUseCase @@ -34,6 +35,7 @@ class GetDeviceFullInfoUseCase @Inject constructor( private val getCurrentSessionCrossSigningInfoUseCase: GetCurrentSessionCrossSigningInfoUseCase, private val getEncryptionTrustLevelForDeviceUseCase: GetEncryptionTrustLevelForDeviceUseCase, private val checkIfSessionIsInactiveUseCase: CheckIfSessionIsInactiveUseCase, + private val parseDeviceUserAgentUseCase: ParseDeviceUserAgentUseCase, ) { fun execute(deviceId: String): Flow { @@ -49,12 +51,14 @@ class GetDeviceFullInfoUseCase @Inject constructor( val roomEncryptionTrustLevel = getEncryptionTrustLevelForDeviceUseCase.execute(currentSessionCrossSigningInfo, cryptoInfo) val isInactive = checkIfSessionIsInactiveUseCase.execute(info.lastSeenTs ?: 0) val isCurrentDevice = currentSessionCrossSigningInfo.deviceId == cryptoInfo.deviceId + val deviceUserAgent = parseDeviceUserAgentUseCase.execute(info.getBestLastSeenUserAgent()) DeviceFullInfo( deviceInfo = info, cryptoDeviceInfo = cryptoInfo, roomEncryptionTrustLevel = roomEncryptionTrustLevel, isInactive = isInactive, isCurrentDevice = isCurrentDevice, + deviceExtendedInfo = deviceUserAgent, ) } else { null diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewFragment.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewFragment.kt index 4af4913183..8c3b907070 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/overview/SessionOverviewFragment.kt @@ -41,9 +41,11 @@ import im.vector.app.databinding.FragmentSessionOverviewBinding import im.vector.app.features.auth.ReAuthActivity import im.vector.app.features.crypto.recover.SetupMode import im.vector.app.features.settings.devices.v2.list.SessionInfoViewState +import im.vector.app.features.settings.devices.v2.more.SessionLearnMoreBottomSheet import im.vector.app.features.workers.signout.SignOutUiWorker import org.matrix.android.sdk.api.auth.data.LoginFlowTypes import org.matrix.android.sdk.api.extensions.orFalse +import org.matrix.android.sdk.api.session.crypto.model.RoomEncryptionTrustLevel import javax.inject.Inject /** @@ -204,6 +206,9 @@ class SessionOverviewFragment : isLastSeenDetailsVisible = true, ) views.sessionOverviewInfo.render(infoViewState, dateFormatter, drawableProvider, colorProvider) + views.sessionOverviewInfo.onLearnMoreClickListener = { + showLearnMoreInfoVerificationStatus(deviceInfo.roomEncryptionTrustLevel == RoomEncryptionTrustLevel.Trusted) + } } else { views.sessionOverviewInfo.isVisible = false } @@ -249,4 +254,22 @@ class SessionOverviewFragment : reAuthActivityResultLauncher.launch(intent) } } + + private fun showLearnMoreInfoVerificationStatus(isVerified: Boolean) { + val titleResId = if (isVerified) { + R.string.device_manager_verification_status_verified + } else { + R.string.device_manager_verification_status_unverified + } + val descriptionResId = if (isVerified) { + R.string.device_manager_learn_more_sessions_verified + } else { + R.string.device_manager_learn_more_sessions_unverified + } + val args = SessionLearnMoreBottomSheet.Args( + title = getString(titleResId), + description = getString(descriptionResId), + ) + SessionLearnMoreBottomSheet.show(childFragmentManager, args) + } } diff --git a/vector/src/main/java/im/vector/app/features/settings/devices/v2/rename/RenameSessionFragment.kt b/vector/src/main/java/im/vector/app/features/settings/devices/v2/rename/RenameSessionFragment.kt index df92bee100..2f671492e3 100644 --- a/vector/src/main/java/im/vector/app/features/settings/devices/v2/rename/RenameSessionFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/devices/v2/rename/RenameSessionFragment.kt @@ -24,9 +24,11 @@ import androidx.core.widget.doOnTextChanged import com.airbnb.mvrx.fragmentViewModel import com.airbnb.mvrx.withState import dagger.hilt.android.AndroidEntryPoint +import im.vector.app.R import im.vector.app.core.extensions.showKeyboard import im.vector.app.core.platform.VectorBaseFragment import im.vector.app.databinding.FragmentSessionRenameBinding +import im.vector.app.features.settings.devices.v2.more.SessionLearnMoreBottomSheet import javax.inject.Inject /** @@ -51,6 +53,7 @@ class RenameSessionFragment : initEditText() initSaveButton() initWithLastEditedName() + initInfoView() } private fun initToolbar() { @@ -75,6 +78,20 @@ class RenameSessionFragment : viewModel.handle(RenameSessionAction.InitWithLastEditedName) } + private fun initInfoView() { + views.renameSessionInfo.onLearnMoreClickListener = { + showLearnMoreInfo() + } + } + + private fun showLearnMoreInfo() { + val args = SessionLearnMoreBottomSheet.Args( + title = getString(R.string.device_manager_learn_more_session_rename_title), + description = getString(R.string.device_manager_learn_more_session_rename), + ) + SessionLearnMoreBottomSheet.show(childFragmentManager, args) + } + private fun observeViewEvents() { viewModel.observeViewEvents { when (it) { diff --git a/vector/src/main/java/im/vector/app/features/spaces/NewSpaceSummaryController.kt b/vector/src/main/java/im/vector/app/features/spaces/NewSpaceSummaryController.kt index 5061eb4036..199169484c 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/NewSpaceSummaryController.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/NewSpaceSummaryController.kt @@ -72,7 +72,7 @@ class NewSpaceSummaryController @Inject constructor( text(host.stringProvider.getString(R.string.all_chats)) selected(selected) countState(UnreadCounterBadgeView.State.Count(homeCount.totalCount, homeCount.isHighlight)) - listener { host.callback?.onSpaceSelected(null) } + listener { host.callback?.onSpaceSelected(null, isSubSpace = false) } } } @@ -99,7 +99,7 @@ class NewSpaceSummaryController @Inject constructor( hasChildren(hasChildren) matrixItem(spaceSummary.toMatrixItem()) onLongClickListener { host.callback?.onSpaceSettings(spaceSummary) } - onSpaceSelectedListener { host.callback?.onSpaceSelected(spaceSummary) } + onSpaceSelectedListener { host.callback?.onSpaceSelected(spaceSummary, isSubSpace = false) } onToggleExpandListener { host.callback?.onToggleExpand(spaceSummary) } selected(isSelected) } @@ -140,7 +140,7 @@ class NewSpaceSummaryController @Inject constructor( indent(depth) matrixItem(childSummary.toMatrixItem()) onLongClickListener { host.callback?.onSpaceSettings(childSummary) } - onSubSpaceSelectedListener { host.callback?.onSpaceSelected(childSummary) } + onSubSpaceSelectedListener { host.callback?.onSpaceSelected(childSummary, isSubSpace = true) } onToggleExpandListener { host.callback?.onToggleExpand(childSummary) } selected(isSelected) } @@ -184,8 +184,10 @@ class NewSpaceSummaryController @Inject constructor( } } + /** + * This is a full duplicate of [SpaceSummaryController.Callback]. We need to merge them ASAP*/ interface Callback { - fun onSpaceSelected(spaceSummary: RoomSummary?) + fun onSpaceSelected(spaceSummary: RoomSummary?, isSubSpace: Boolean) fun onSpaceInviteSelected(spaceSummary: RoomSummary) fun onSpaceSettings(spaceSummary: RoomSummary) fun onToggleExpand(spaceSummary: RoomSummary) diff --git a/vector/src/main/java/im/vector/app/features/spaces/SpaceListAction.kt b/vector/src/main/java/im/vector/app/features/spaces/SpaceListAction.kt index fd2e68e172..1ef755e684 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/SpaceListAction.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/SpaceListAction.kt @@ -20,7 +20,7 @@ import im.vector.app.core.platform.VectorViewModelAction import org.matrix.android.sdk.api.session.room.model.RoomSummary sealed class SpaceListAction : VectorViewModelAction { - data class SelectSpace(val spaceSummary: RoomSummary?) : SpaceListAction() + data class SelectSpace(val spaceSummary: RoomSummary?, val isSubSpace: Boolean) : SpaceListAction() data class OpenSpaceInvite(val spaceSummary: RoomSummary) : SpaceListAction() data class LeaveSpace(val spaceSummary: RoomSummary) : SpaceListAction() data class ToggleExpand(val spaceSummary: RoomSummary) : SpaceListAction() diff --git a/vector/src/main/java/im/vector/app/features/spaces/SpaceListBottomSheet.kt b/vector/src/main/java/im/vector/app/features/spaces/SpaceListBottomSheet.kt index 4787aed8ae..9991384643 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/SpaceListBottomSheet.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/SpaceListBottomSheet.kt @@ -25,6 +25,7 @@ import im.vector.app.R import im.vector.app.core.extensions.replaceChildFragment import im.vector.app.core.platform.VectorBaseBottomSheetDialogFragment import im.vector.app.databinding.FragmentSpacesBottomSheetBinding +import im.vector.app.features.analytics.plan.MobileScreen class SpaceListBottomSheet : VectorBaseBottomSheetDialogFragment() { @@ -32,6 +33,11 @@ class SpaceListBottomSheet : VectorBaseBottomSheetDialogFragment if (state.selectedSpace?.roomId != action.spaceSummary?.roomId) { - analyticsTracker.capture(Interaction(null, null, Interaction.Name.SpacePanelSwitchSpace)) + val interactionName = if (action.isSubSpace) { + Interaction.Name.SpacePanelSwitchSubSpace + } else { + Interaction.Name.SpacePanelSwitchSpace + } + analyticsTracker.capture( + Interaction( + index = null, + interactionType = null, + name = interactionName + ) + ) setState { copy(selectedSpace = action.spaceSummary) } spaceStateHandler.setCurrentSpace(action.spaceSummary?.roomId) _viewEvents.post(SpaceListViewEvents.CloseDrawer) diff --git a/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryController.kt b/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryController.kt index ff8f5c38f7..acc1df5405 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryController.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/SpaceSummaryController.kt @@ -88,7 +88,7 @@ class SpaceSummaryController @Inject constructor( id("space_home") selected(selectedSpace == null) countState(UnreadCounterBadgeView.State.Count(homeCount.totalCount, homeCount.isHighlight)) - listener { host.callback?.onSpaceSelected(null) } + listener { host.callback?.onSpaceSelected(null, isSubSpace = false) } } rootSpaces @@ -114,7 +114,7 @@ class SpaceSummaryController @Inject constructor( selected(isSelected) canDrag(true) onMore { host.callback?.onSpaceSettings(roomSummary) } - listener { host.callback?.onSpaceSelected(roomSummary) } + listener { host.callback?.onSpaceSelected(roomSummary, isSubSpace = false) } toggleExpand { host.callback?.onToggleExpand(roomSummary) } countState( UnreadCounterBadgeView.State.Count( @@ -165,7 +165,7 @@ class SpaceSummaryController @Inject constructor( expanded(expanded) onMore { host.callback?.onSpaceSettings(childSummary) } matrixItem(childSummary.toMatrixItem()) - listener { host.callback?.onSpaceSelected(childSummary) } + listener { host.callback?.onSpaceSelected(childSummary, isSubSpace = true) } toggleExpand { host.callback?.onToggleExpand(childSummary) } indent(currentDepth) countState( @@ -184,7 +184,7 @@ class SpaceSummaryController @Inject constructor( } interface Callback { - fun onSpaceSelected(spaceSummary: RoomSummary?) + fun onSpaceSelected(spaceSummary: RoomSummary?, isSubSpace: Boolean) fun onSpaceInviteSelected(spaceSummary: RoomSummary) fun onSpaceSettings(spaceSummary: RoomSummary) fun onToggleExpand(spaceSummary: RoomSummary) diff --git a/vector/src/main/java/im/vector/app/features/spaces/create/ChooseSpaceTypeFragment.kt b/vector/src/main/java/im/vector/app/features/spaces/create/ChooseSpaceTypeFragment.kt index 4c44bfc7a8..6c31b9e856 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/create/ChooseSpaceTypeFragment.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/create/ChooseSpaceTypeFragment.kt @@ -25,6 +25,7 @@ import dagger.hilt.android.AndroidEntryPoint import im.vector.app.core.epoxy.onClick import im.vector.app.core.platform.VectorBaseFragment import im.vector.app.databinding.FragmentSpaceCreateChooseTypeBinding +import im.vector.app.features.analytics.plan.MobileScreen @AndroidEntryPoint class ChooseSpaceTypeFragment : @@ -35,6 +36,11 @@ class ChooseSpaceTypeFragment : override fun getBinding(inflater: LayoutInflater, container: ViewGroup?) = FragmentSpaceCreateChooseTypeBinding.inflate(layoutInflater, container, false) + override fun onCreate(savedInstanceState: Bundle?) { + super.onCreate(savedInstanceState) + analyticsScreenName = MobileScreen.ScreenName.CreateSpace + } + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) diff --git a/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceViewModel.kt b/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceViewModel.kt index b680f77df2..1cfac4a5fe 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceViewModel.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/create/CreateSpaceViewModel.kt @@ -32,6 +32,8 @@ import im.vector.app.core.error.ErrorFormatter import im.vector.app.core.extensions.isEmail import im.vector.app.core.platform.VectorViewModel import im.vector.app.core.resources.StringProvider +import im.vector.app.features.analytics.AnalyticsTracker +import im.vector.app.features.analytics.plan.Interaction import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.launch import org.matrix.android.sdk.api.MatrixPatterns @@ -46,7 +48,8 @@ class CreateSpaceViewModel @AssistedInject constructor( private val session: Session, private val stringProvider: StringProvider, private val createSpaceViewModelTask: CreateSpaceViewModelTask, - private val errorFormatter: ErrorFormatter + private val errorFormatter: ErrorFormatter, + private val analyticsTracker: AnalyticsTracker, ) : VectorViewModel(initialState) { private val identityService = session.identityService() @@ -350,6 +353,13 @@ class CreateSpaceViewModel @AssistedInject constructor( } viewModelScope.launch(Dispatchers.IO) { try { + analyticsTracker.capture( + Interaction( + index = null, + interactionType = null, + name = Interaction.Name.MobileSpaceCreationValidated + ) + ) val alias = if (state.spaceType == SpaceType.Public) { state.aliasLocalPart } else null diff --git a/vector/src/main/java/im/vector/app/features/spaces/people/SpacePeopleListController.kt b/vector/src/main/java/im/vector/app/features/spaces/people/SpacePeopleListController.kt index 5e6efcc816..3b74b4b38b 100644 --- a/vector/src/main/java/im/vector/app/features/spaces/people/SpacePeopleListController.kt +++ b/vector/src/main/java/im/vector/app/features/spaces/people/SpacePeopleListController.kt @@ -77,7 +77,7 @@ class SpacePeopleListController @Inject constructor( id(roomMember.userId) matrixItem(roomMember.toMatrixItem()) avatarRenderer(host.avatarRenderer) - userEncryptionTrustLevel(data.trustLevelMap.invoke()?.get(roomMember.userId)) + userVerificationLevel(data.trustLevelMap.invoke()?.get(roomMember.userId)) .apply { val pl = host.toPowerLevelLabel(memberEntry.first) if (memberEntry.first == RoomMemberListCategories.INVITE) { diff --git a/vector/src/main/res/drawable/ic_attachment_voice_broadcast.xml b/vector/src/main/res/drawable/ic_attachment_voice_broadcast.xml new file mode 100644 index 0000000000..3e93522b18 --- /dev/null +++ b/vector/src/main/res/drawable/ic_attachment_voice_broadcast.xml @@ -0,0 +1,21 @@ + + + + + + + diff --git a/vector/src/main/res/drawable/poll_option_checked.xml b/vector/src/main/res/drawable/poll_option_checked.xml index 28ab94a421..2324792eac 100644 --- a/vector/src/main/res/drawable/poll_option_checked.xml +++ b/vector/src/main/res/drawable/poll_option_checked.xml @@ -10,5 +10,9 @@ - \ No newline at end of file + android:top="2dp" + android:bottom="2dp" + android:left="2dp" + android:right="2dp" + /> + diff --git a/vector/src/main/res/layout/bottom_sheet_session_learn_more.xml b/vector/src/main/res/layout/bottom_sheet_session_learn_more.xml new file mode 100644 index 0000000000..466ab5af49 --- /dev/null +++ b/vector/src/main/res/layout/bottom_sheet_session_learn_more.xml @@ -0,0 +1,59 @@ + + + + + + + + + +