1
0
mirror of https://github.com/vector-im/riotX-android synced 2025-10-06 00:02:48 +02:00

Compare commits

...

391 Commits

Author SHA1 Message Date
Benoit Marty
e5bf87c09f Merge branch 'hotfix/v1.1.6' 2021-04-16 14:36:26 +02:00
Benoit Marty
72515ee635 Prepare corrective release 1.1.6 2021-04-16 14:33:00 +02:00
Benoit Marty
9fc00fe6ff App crashes on "troubleshoot notifications" button (#3187) 2021-04-16 14:33:00 +02:00
Benoit Marty
c08868bc3c Protect call to suspend fun 2021-04-16 13:22:16 +02:00
Benoit Marty
18cef243a1 Merge branch 'hotfix/1.1.4_fixes' 2021-04-15 11:10:24 +02:00
Benoit Marty
ccf7dd9583 Add changelog file 2021-04-14 22:41:57 +02:00
Benoit Marty
e4375522ff Fix crash when playing video (#3179) 2021-04-14 22:35:30 +02:00
Benoit Marty
59637c4a6b Revert to Realm 10.3.1 to fix issue with migration
Waiting for https://github.com/realm/realm-java/issues/7402
2021-04-14 21:54:07 +02:00
Benoit Marty
0a326015ef Merge branch 'release/1.1.4' 2021-04-09 12:41:04 +02:00
Benoit Marty
5ee8cf7ebf Prepare release 1.1.4 2021-04-09 12:40:11 +02:00
Benoit Marty
93bc5abcb5 Update the Emoji source file 2021-04-09 10:32:11 +02:00
Benoit Marty
5311bacfff ktlint 2021-04-09 10:26:28 +02:00
Benoit Marty
da7c2e38f6 Merge pull request #3140 from vector-im/feature/bca/verification_as_per_web
Fix EW-EA compatibility for verification
2021-04-09 10:24:01 +02:00
Benoit Marty
0d9990b2e3 Merge pull request #3147 from oogm/develop
Update import_emojis.py to retain keyword order
2021-04-09 10:00:47 +02:00
Benoit Marty
2d6fca9214 Merge pull request #3143 from vector-im/feature/bma/discovery_filtering
Filter some other words when navigating into the room directory
2021-04-09 08:52:32 +02:00
oogm
327e75e8e5 Update CHANGES.md 2021-04-08 22:26:31 +02:00
oogm
a4a3777722 Update import_emojis.py to retain keyword order 2021-04-08 22:14:41 +02:00
Benoit Marty
f1e280827d Ensure there is no dup and cleanup 2021-04-08 19:39:49 +02:00
Benoit Marty
7e605eb4d4 Merge pull request #3145 from vector-im/bma/merge_avail
Small cleanup for #3084
2021-04-08 19:36:35 +02:00
Matthew Hodgson
1233fde261 Update forbidden_terms.txt 2021-04-08 18:26:55 +01:00
Benoit Marty
ee3eb8e1d6 Cleanup 2021-04-08 18:52:53 +02:00
Benoit Marty
2a1e52745f Some cleanup after merge of #3084 2021-04-08 18:50:28 +02:00
Aleks
9d96f90e49 keyword-spacing fix + wildcard-imports fix 2021-04-08 18:50:28 +02:00
Aleks
4451b682b1 merge + register/available endpoint corrections 2021-04-08 18:50:28 +02:00
Aleks
9ce9d1e549 CHANGES.md updated 2021-04-08 18:50:28 +02:00
Aleks
2e9f8ae6ae registration availability endpoint added 2021-04-08 18:50:05 +02:00
Benoit Marty
65b4b2915f Merge pull request #3142 from vector-im/feature/bma/global_retry
Generic hanlding of rate limit eror by the SDK
2021-04-08 18:23:52 +02:00
Benoit Marty
153d393bf1 Prevent searching for forbidden terms 2021-04-08 17:28:47 +02:00
Benoit Marty
1715143b85 Filter some other words
Cannot filter canonical alias anymore, as we now use word boundaries
2021-04-08 16:54:41 +02:00
Benoit Marty
7b1d313e8e Small cleanup 2021-04-08 12:46:55 +02:00
Benoit Marty
c6bd378104 Test is passing 2021-04-08 12:44:28 +02:00
Valere
760e14531f Fix EW-EA compatibility for verification 2021-04-08 12:09:35 +02:00
Benoit Marty
8dead986a5 Always try to retry Http requests in case of 429 (#1300) 2021-04-08 10:59:51 +02:00
Benoit Marty
9b5bc60fa9 Remove unused parameter and use same value than the JS SDK 2021-04-08 09:54:51 +02:00
Benoit Marty
3b6234a9a2 Merge pull request #3133 from vector-im/feature/bma/wl_fixes
Weblate fixes
2021-04-07 19:11:16 +02:00
Benoit Marty
b423d5da4c typo 2021-04-07 19:00:02 +02:00
Benoit Marty
e7608469ca Import SAS strings 2021-04-07 18:42:52 +02:00
Benoit Marty
eef6d92b89 Merge pull request #3129 from vector-im/feature/bma/dn_iteration
Empty room name small iteration
2021-04-07 18:41:08 +02:00
Benoit Marty
e61a9e75e8 Merge pull request #3055 from vector-im/feature/bma/get_event
Get event
2021-04-07 18:38:17 +02:00
Benoit Marty
47aeadef7c Add configuration for new Irish language 2021-04-07 18:34:54 +02:00
Benoit Marty
fc202437e8 Fix lint issues 2021-04-07 18:31:46 +02:00
Benoit Marty
ebabb33e79 Merge pull request #3132 from RiotTranslateBot/weblate-element-android-element-app
Translations update from Weblate
2021-04-07 18:23:24 +02:00
Weblate
eff560f8f0 Merge branch 'origin/develop' into Weblate. 2021-04-07 15:37:02 +00:00
Danial Behzadi
5971edee14 Translated using Weblate (Persian)
Currently translated at 100.0% (13 of 13 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/fa/
2021-04-07 15:36:56 +00:00
Nikita Epifanov
57d94c5494 Translated using Weblate (Russian)
Currently translated at 100.0% (13 of 13 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/ru/
2021-04-07 15:36:55 +00:00
Samu Voutilainen
5a988d6f4a Translated using Weblate (Finnish)
Currently translated at 100.0% (13 of 13 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/fi/
2021-04-07 15:36:55 +00:00
ozzii
3efd35e27a Translated using Weblate (Serbian)
Currently translated at 28.1% (666 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/sr/
2021-04-07 15:36:54 +00:00
Nikita Epifanov
e9838f6db1 Translated using Weblate (Russian)
Currently translated at 99.4% (2350 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ru/
2021-04-07 15:36:51 +00:00
Daniel Løvbrøtte Olsen
cc1d52171c Translated using Weblate (Norwegian Bokmål)
Currently translated at 62.9% (1486 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/nb_NO/
2021-04-07 15:36:47 +00:00
Magnus
3250f3bc0e Translated using Weblate (Norwegian Bokmål)
Currently translated at 62.9% (1486 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/nb_NO/
2021-04-07 15:36:47 +00:00
Samu Voutilainen
39c0c5401f Translated using Weblate (Finnish)
Currently translated at 79.2% (1873 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fi/
2021-04-07 15:36:47 +00:00
Benoit Marty
7309c1066c Move WifiDetector to the app side
And protect the call to getEvent()
2021-04-07 17:35:46 +02:00
Benoit Marty
dead57b9fe Cleanup 2021-04-07 17:35:46 +02:00
Benoit Marty
b89a258fdf FastLane: Only is Wifi is detected 2021-04-07 17:35:46 +02:00
Benoit Marty
9a124f7630 Done TODO 2021-04-07 17:35:46 +02:00
Benoit Marty
c46f7fed5f Avoid code duplication 2021-04-07 17:35:46 +02:00
Benoit Marty
3a1b8bc33d FastLane: handle push rules 2021-04-07 17:35:46 +02:00
Benoit Marty
f0f66cbd0e Add comment 2021-04-07 17:35:46 +02:00
Benoit Marty
4a0a6e9f01 FastLane: Ignore message edition 2021-04-07 17:35:46 +02:00
Benoit Marty
7f7f90f89e ktlint 2021-04-07 17:35:46 +02:00
Benoit Marty
96153fe92a Get Event after a Push for a faster notification display in some conditions 2021-04-07 17:35:46 +02:00
Benoit Marty
af023669ba Implement FirstThrottler, to gain 200 ms for first refresh 2021-04-07 17:35:25 +02:00
Benoit Marty
0693ce13e4 Merge pull request #3128 from vector-im/feature/bma/various_fixes
Various fixes before release 1.1.4
2021-04-07 15:32:13 +02:00
Benoit Marty
e811c53c44 Improve "was" fallback for Empty rooms. 2021-04-07 15:24:00 +02:00
Benoit Marty
923715aeb3 Add method for name fallback when there is only one member 2021-04-07 15:19:33 +02:00
Benoit Marty
15c51cad17 Improve interface, name are not nullable 2021-04-07 15:17:02 +02:00
Benoit Marty
835eb95aa1 If signout request fails, do not start LoginActivity, but restart the app (#3099) 2021-04-07 14:52:27 +02:00
Benoit Marty
1ac17b3aee Exclude instruction from try catch block 2021-04-07 14:34:06 +02:00
Benoit Marty
b8d01c4577 Fix quick click action (#3127) 2021-04-07 14:08:43 +02:00
Benoit Marty
884358b374 Small cleanup 2021-04-07 13:47:20 +02:00
Benoit Marty
511a0c22e2 Protect calls to FileService.downloadFile() 2021-04-07 13:45:43 +02:00
Benoit Marty
2495fa49f3 Improve code clarity 2021-04-07 12:39:36 +02:00
Benoit Marty
c459c4f90c Change snow chat effect message type from "nic.custom.snow" to "io.element.effect.snowfall" 2021-04-07 11:17:46 +02:00
Benoit Marty
3a81521eab Restore previous log when a request fails 2021-04-07 11:17:46 +02:00
Benoit Marty
0a0e3c3319 Merge pull request #3125 from Bubu/jitsi_without_gms
propagate jitsi LIBRE_BUILD exclusion rules to not pull in gms libs
2021-04-07 11:16:29 +02:00
Benoit Marty
f7f7994685 Merge pull request #3124 from vector-im/feature/bma/fix_readMarker
Fix mandatory parameter in API (#3065)
2021-04-07 10:47:17 +02:00
Marcus Hoffmann
28897f7679 changes 2021-04-06 20:56:39 +02:00
Marcus Hoffmann
62038e8a89 propagate jitsi LIBRE_BUILD exclusion rules to not pull in gms libs
Previously jitsi only had optional dependencies being disabled by the
LIBRE build flag but a while ago they introduced optional exclusion
rules which don't transitively propagate to consumers of the library, so
instead we need to mirror the exclusion rules from the jitsi gradle file:
See: 7a64bf006e/android/sdk/build.gradle (L53)

Signed-off-by: Marcus Hoffmann <bubu@bubu1.eu>
2021-04-06 20:55:48 +02:00
Benoit Marty
e3cd916105 Fix mandatory parameter in API (#3065) 2021-04-06 16:25:16 +02:00
Benoit Marty
0ede779ee5 Merge pull request #3105 from vector-im/feature/bma/displayname_fallback
Displayname and avatar fallback for DM, especially when other has left
2021-04-06 14:31:41 +02:00
Benoit Marty
8b15008eba Merge branch 'develop' into feature/bma/displayname_fallback 2021-04-06 14:31:32 +02:00
Benoit Marty
7d88d038f5 Merge pull request #3102 from vector-im/dependabot/gradle/moshi_version-1.12.0
Bump moshi_version from 1.11.0 to 1.12.0
2021-04-06 14:22:12 +02:00
Benoit Marty
df73649637 Merge pull request #3122 from vector-im/dependabot/gradle/com.google.android.gms-oss-licenses-plugin-0.10.3
Bump oss-licenses-plugin from 0.10.2 to 0.10.3
2021-04-06 14:21:03 +02:00
Benoit Marty
c30bcfeba0 Merge pull request #3121 from vector-im/dependabot/gradle/com.googlecode.libphonenumber-libphonenumber-8.12.21
Bump libphonenumber from 8.12.20 to 8.12.21
2021-04-06 14:20:42 +02:00
Benoit Marty
33c1da5aa1 Fix copyright 2021-04-06 14:15:05 +02:00
Benoit Marty
3109d111a4 Merge pull request #3092 from vector-im/feature/bca/paged_room_list
Room List performance PR (use Live PagedList via Monarchy)
2021-04-06 14:13:47 +02:00
Benoit Marty
f42d143679 Merge pull request #3097 from vector-im/feature/bma/retrofit_suspend
Migrate Retrofit interface to coroutine calls
2021-04-06 14:11:07 +02:00
Benoit Marty
5dc28c0564 Fix avatar for DM when other user has left 2021-04-06 09:57:33 +02:00
Benoit Marty
15a463d748 Small rework 2021-04-06 09:57:33 +02:00
Benoit Marty
7e74e6a6f4 Call getFixedRoomMemberContent() when loading room members of a room
It fixes bad names for Empty room
2021-04-06 09:57:33 +02:00
Benoit Marty
2d4866cdc5 Add better support for empty room name fallback 2021-04-06 09:57:33 +02:00
dependabot[bot]
49c79ceb74 Bump oss-licenses-plugin from 0.10.2 to 0.10.3
Bumps oss-licenses-plugin from 0.10.2 to 0.10.3.

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-06 07:22:36 +00:00
dependabot[bot]
0addb3aeee Bump libphonenumber from 8.12.20 to 8.12.21
Bumps [libphonenumber](https://github.com/google/libphonenumber) from 8.12.20 to 8.12.21.
- [Release notes](https://github.com/google/libphonenumber/releases)
- [Changelog](https://github.com/google/libphonenumber/blob/master/making-metadata-changes.md)
- [Commits](https://github.com/google/libphonenumber/compare/v8.12.20...v8.12.21)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-06 07:20:12 +00:00
Hakim Oubouali
ee77ed134b Translated using Weblate (Central Atlas Tamazight)
Currently translated at 3.5% (83 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/tzm/
2021-04-05 01:34:27 +00:00
Andrejs
ef1265fe38 Translated using Weblate (Latvian)
Currently translated at 66.8% (1580 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/lv/
2021-04-05 01:34:23 +00:00
Vivek K J
1612d57aab Translated using Weblate (Malayalam)
Currently translated at 25.0% (592 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ml/
2021-04-05 01:34:23 +00:00
Ihor Hordiichuk
472e7b8246 Translated using Weblate (Ukrainian)
Currently translated at 73.7% (1743 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/
2021-04-05 01:34:17 +00:00
Safa Alfulaij
77fb8de71f Translated using Weblate (Arabic)
Currently translated at 92.3% (12 of 13 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/ar/
2021-04-02 19:34:39 +00:00
libexus
d492569539 Translated using Weblate (German)
Currently translated at 99.9% (2361 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-04-02 19:34:38 +00:00
Safa Alfulaij
99eb5bd533 Translated using Weblate (Arabic)
Currently translated at 38.6% (913 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ar/
2021-04-02 19:34:38 +00:00
Vivek K J
d5d397d5ff Translated using Weblate (Malayalam)
Currently translated at 20.9% (494 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ml/
2021-04-02 19:34:38 +00:00
strix aluco
1ebcafd920 Translated using Weblate (Ukrainian)
Currently translated at 73.7% (1743 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/
2021-04-02 19:34:33 +00:00
Yuriy Bulka
a4348b8194 Translated using Weblate (Ukrainian)
Currently translated at 73.7% (1743 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/
2021-04-02 19:34:17 +00:00
Benoit Marty
bd14c77ff0 Improve room name for invitation 2021-04-02 12:44:30 +02:00
Valere
d49ed63f1d fix / put back setup button 2021-04-02 11:56:38 +02:00
Valere
4829298255 ktlint 2021-04-02 11:44:10 +02:00
Valere
100b187be3 Fix / loading initial state, duplicate sections and footer on empty 2021-04-02 11:43:56 +02:00
dependabot[bot]
fcc635ac8f Bump moshi_version from 1.11.0 to 1.12.0
Bumps `moshi_version` from 1.11.0 to 1.12.0.

Updates `moshi-adapters` from 1.11.0 to 1.12.0
- [Release notes](https://github.com/square/moshi/releases)
- [Changelog](https://github.com/square/moshi/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/moshi/compare/moshi-parent-1.11.0...parent-1.12.0)

Updates `moshi-kotlin-codegen` from 1.11.0 to 1.12.0
- [Release notes](https://github.com/square/moshi/releases)
- [Changelog](https://github.com/square/moshi/blob/master/CHANGELOG.md)
- [Commits](https://github.com/square/moshi/compare/moshi-parent-1.11.0...parent-1.12.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-02 07:19:53 +00:00
Benoit Marty
b9f73c6cc3 BMA's cleanup 2021-04-01 18:34:32 +02:00
Benoit Marty
b47ced68b5 Move UpdatableFilterLivePageResult to the correct package 2021-04-01 18:22:09 +02:00
Valere
f60e649d76 Fix / newly joined or created are at the bottom of room list 2021-04-01 15:56:03 +02:00
Valere
bf6058dc32 Show local echo of joining action 2021-04-01 15:55:42 +02:00
Valere
ec3266f7e8 remove dead code 2021-04-01 15:47:58 +02:00
Benoit Marty
0bc864fc37 Better handling on 429 2021-04-01 13:51:16 +02:00
Benoit Marty
1f2d6bea21 Do some renaming 2021-04-01 12:11:49 +02:00
Benoit Marty
ba27a601dd Dominaezzz' review: remove Request class, just use executeRequest() 2021-04-01 12:10:29 +02:00
Benoit Marty
2df8eb199b Merge pull request #3098 from vector-im/feature/bma/fix_avatar_dm
Fix avatar rendering for DMs, after initial sync (#2693)
2021-04-01 11:41:56 +02:00
Valere
52ba67c9c0 unused val 2021-04-01 09:12:18 +02:00
Benoit Marty
fe80b7bd6a Dominaezzz' review: remove withContext usage 2021-03-31 23:16:32 +02:00
Benoit Marty
f998c2f945 Fix avatar rendering for DMs, after initial sync (#2693)
Also better handling of previous DMs management
2021-03-31 22:55:53 +02:00
Valere
cd6fab0e2d Fix empty state + cleaning + changelog 2021-03-31 18:05:08 +02:00
Valere
b390980ca2 Resurrect mark all as read 2021-03-31 18:04:27 +02:00
Valere
c23437d45a Code quality 2021-03-31 18:04:27 +02:00
Valere
b6f0f12515 lint 2021-03-31 18:04:27 +02:00
Valere
cf581ecfcf Make pagedList config as part of API 2021-03-31 18:04:27 +02:00
Valere
41176c3e26 Support only notif display mode
+ code quality fixes
2021-03-31 18:04:27 +02:00
Valere
52f98dc405 Remove HomeListDataSource 2021-03-31 18:04:27 +02:00
Valere
38af0caa3f Fix / missing DM favorites 2021-03-31 18:04:27 +02:00
Valere
cf868f885f Room summary paged initial commit 2021-03-31 18:04:27 +02:00
Benoit Marty
6a91c2b355 Migrate Retrofit interface to coroutine calls 2021-03-31 17:59:13 +02:00
Benoit Marty
c0913711d6 Merge pull request #3059 from vector-im/dependabot/gradle/epoxy_version-4.4.4
Bump epoxy_version from 4.4.3 to 4.4.4
2021-03-31 17:57:05 +02:00
Benoit Marty
9bde51a539 Merge pull request #3089 from vector-im/dependabot/gradle/com.facebook.stetho-stetho-okhttp3-1.6.0
Bump stetho-okhttp3 from 1.5.1 to 1.6.0
2021-03-31 17:56:34 +02:00
Benoit Marty
d697343f23 Merge pull request #3091 from vector-im/feature/bma/cleanup
Migrate Room method to suspend and do some cleanup
2021-03-31 17:55:58 +02:00
Benoit Marty
295be5286b Merge branch 'develop' into feature/bma/cleanup 2021-03-31 17:55:50 +02:00
Benoit Marty
42f6adf2e2 ktlint 2021-03-31 17:55:25 +02:00
Benoit Marty
1868f39223 Merge pull request #3088 from vector-im/feature/fga/timeline_filter
Feature/fga/timeline filter
2021-03-31 17:51:46 +02:00
Benoit Marty
741100e1aa static val 2021-03-31 17:49:04 +02:00
Benoit Marty
b56efbde33 Merge pull request #3090 from vector-im/dependabot/gradle/com.facebook.stetho-stetho-1.6.0
Bump stetho from 1.5.1 to 1.6.0
2021-03-31 15:48:03 +02:00
dependabot[bot]
cb96a9059e Bump stetho-okhttp3 from 1.5.1 to 1.6.0
Bumps [stetho-okhttp3](https://github.com/facebook/stetho) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/facebook/stetho/releases)
- [Changelog](https://github.com/facebook/stetho/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/stetho/compare/v1.5.1...v1.6.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-31 13:48:01 +00:00
Benoit Marty
f4c84d599f Add changelog for the next release. 2021-03-31 11:39:06 +02:00
Benoit Marty
af9fa44e8c Remove dead code 2021-03-31 11:36:02 +02:00
Benoit Marty
bf65531268 Remove dead code 2021-03-31 11:31:02 +02:00
Benoit Marty
0a0c8cde34 Cleanup the test 2021-03-31 11:26:23 +02:00
Benoit Marty
f49df59e10 Convert Room API to suspend (#24499) 2021-03-31 11:26:23 +02:00
Benoit Marty
79bee63515 Merge pull request #3079 from Dominaezzz/suspend_functions_9
Convert SharedSecretStorageService and AccountDataService to suspend functions
2021-03-31 09:28:20 +02:00
Benoit Marty
e4e13aaa97 ktlint and cleanup 2021-03-31 09:25:35 +02:00
Benoit Marty
f2f735ace1 Merge pull request #3077 from Dominaezzz/suspend_functions_8
Convert PushersService to suspend functions
2021-03-31 09:21:16 +02:00
dependabot[bot]
57df510ecb Bump stetho from 1.5.1 to 1.6.0
Bumps [stetho](https://github.com/facebook/stetho) from 1.5.1 to 1.6.0.
- [Release notes](https://github.com/facebook/stetho/releases)
- [Changelog](https://github.com/facebook/stetho/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/stetho/compare/v1.5.1...v1.6.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-31 06:58:20 +00:00
Dominic Fischer
145c9d2e44 Formatting
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2021-03-30 19:18:40 +01:00
Dominic Fischer
6226938c6f Missing file
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2021-03-30 19:13:16 +01:00
ganfra
c7c76d1e67 Timeline: clean code and update CHANGES 2021-03-30 20:04:26 +02:00
ganfra
5d19cfff13 Timeline: fix membership filtering 2021-03-30 19:59:25 +02:00
Andrejs
2c7c8b5859 Translated using Weblate (Latvian)
Currently translated at 66.8% (1580 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/lv/
2021-03-30 16:34:56 +00:00
Thibault Martin
8c4a993906 Translated using Weblate (French)
Currently translated at 100.0% (2362 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fr/
2021-03-30 16:34:23 +00:00
RainSlide
44db075015 Translated using Weblate (Chinese (Simplified))
Currently translated at 98.0% (2316 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hans/
2021-03-30 16:34:23 +00:00
XoseM
9543a110a4 Translated using Weblate (Galician)
Currently translated at 32.9% (778 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/gl/
2021-03-30 16:34:22 +00:00
Tirifto
3686d8efad Translated using Weblate (Esperanto)
Currently translated at 92.2% (2179 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/eo/
2021-03-30 16:34:20 +00:00
ganfra
13cb81b92f Timeline: fix SendState decoration + some filtering issues 2021-03-30 18:07:05 +02:00
Benoit Marty
67c2b58f85 Merge pull request #3080 from Dominaezzz/suspend_functions_10
Convert MembershipService to suspend functions
2021-03-30 11:56:51 +02:00
Benoit Marty
a1cd36fd13 Merge pull request #3073 from Dominaezzz/suspend_functions_4
Convert WidgetService to suspend functions
2021-03-30 11:36:45 +02:00
ganfra
2b93367165 Timeline: handle filtering in epoxy 2021-03-30 11:32:46 +02:00
Dominic Fischer
7817b3b0b8 Formatting
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2021-03-30 09:00:39 +01:00
Dominic Fischer
7986f17c8c Formatting
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2021-03-30 08:56:54 +01:00
Benoit Marty
8c328fe5ef Merge pull request #3075 from Dominaezzz/suspend_functions_6
Convert ReadService to suspend functions
2021-03-30 09:56:50 +02:00
Benoit Marty
a53fecc9ba Merge pull request #3074 from Dominaezzz/suspend_functions_5
Convert ProfileService to suspend functions
2021-03-30 09:54:29 +02:00
Benoit Marty
842a430d51 Merge pull request #3069 from Dominaezzz/suspend_functions_1
Convert IdentityService to suspend functions
2021-03-30 09:48:03 +02:00
Dominic Fischer
501b870c35 Convert IdentityService to suspend functions
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2021-03-29 20:26:19 +01:00
Dominic Fischer
bc68075ae3 Convert MembershipService to suspend functions
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2021-03-29 20:10:41 +01:00
Dominic Fischer
bc5e090b09 Lint
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2021-03-29 20:06:28 +01:00
Dominic Fischer
1e58767374 Missing file
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2021-03-29 20:02:03 +01:00
Dominic Fischer
42166c1c0f Error handling
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2021-03-29 19:48:26 +01:00
Dominic Fischer
e23cba1d20 Convert ProfileService to suspend functions
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2021-03-29 19:39:30 +01:00
Dominic Fischer
c548a3d2fa Convert WidgetService to suspend functions
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2021-03-29 19:34:46 +01:00
ganfra
d6d4293ea8 Timeline : remove filtering from SDK 2021-03-29 16:50:12 +02:00
dependabot[bot]
980d057b4a Bump epoxy_version from 4.4.3 to 4.4.4
Bumps `epoxy_version` from 4.4.3 to 4.4.4.

Updates `epoxy` from 4.4.3 to 4.4.4
- [Release notes](https://github.com/airbnb/epoxy/releases)
- [Changelog](https://github.com/airbnb/epoxy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/airbnb/epoxy/compare/4.4.3...4.4.4)

Updates `epoxy-glide-preloading` from 4.4.3 to 4.4.4
- [Release notes](https://github.com/airbnb/epoxy/releases)
- [Changelog](https://github.com/airbnb/epoxy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/airbnb/epoxy/compare/4.4.3...4.4.4)

Updates `epoxy-processor` from 4.4.3 to 4.4.4
- [Release notes](https://github.com/airbnb/epoxy/releases)
- [Changelog](https://github.com/airbnb/epoxy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/airbnb/epoxy/compare/4.4.3...4.4.4)

Updates `epoxy-paging` from 4.4.3 to 4.4.4
- [Release notes](https://github.com/airbnb/epoxy/releases)
- [Changelog](https://github.com/airbnb/epoxy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/airbnb/epoxy/compare/4.4.3...4.4.4)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-29 14:46:27 +00:00
Benoit Marty
d6446fa95f Merge pull request #3082 from vector-im/dependabot/gradle/io.realm-realm-gradle-plugin-10.4.0
Bump realm-gradle-plugin from 10.3.1 to 10.4.0
2021-03-29 16:45:42 +02:00
Benoit Marty
3e8370cdc7 Merge pull request #2998 from oogm/develop
Update reactions to Unicode 13.1, improve backwards compatibility
2021-03-29 14:11:45 +02:00
Benoit Marty
1d23f1d9e3 Realm from 10.4.0 and forward are now found on mavenCentral() instead of jcenter(). 2021-03-29 14:06:57 +02:00
Benoit Marty
0e71dfa8e1 Merge pull request #3081 from Dominaezzz/suspend_functions_11
Convert FileService to suspend functions
2021-03-29 14:00:12 +02:00
Benoit Marty
c15e2e96b6 Merge pull request #3076 from Dominaezzz/suspend_functions_7
Convert UserService to suspend functions
2021-03-29 13:18:34 +02:00
Benoit Marty
9a512cbc32 Merge pull request #3072 from Dominaezzz/suspend_functions_3
Convert VerificationService to suspend functions
2021-03-29 12:25:03 +02:00
dependabot[bot]
8f4dbd2aef Bump realm-gradle-plugin from 10.3.1 to 10.4.0
Bumps [realm-gradle-plugin](https://github.com/realm/realm-java) from 10.3.1 to 10.4.0.
- [Release notes](https://github.com/realm/realm-java/releases)
- [Changelog](https://github.com/realm/realm-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/realm/realm-java/compare/v10.3.1...v10.4.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-29 08:30:44 +00:00
Dominic Fischer
b6f4be2894 Convert FileService to suspend functions
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2021-03-28 13:52:16 +01:00
Dominic Fischer
7aba3cff66 Convert AccountDataService to suspend functions
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2021-03-28 11:59:44 +01:00
Dominic Fischer
b70585016c Convert SharedSecretStorageService to suspend functions
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2021-03-28 11:50:59 +01:00
Dominic Fischer
7fbe485603 Convert PushersService to suspend functions
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2021-03-27 20:44:07 +00:00
Dominic Fischer
b9b755e6e1 Convert UserService to suspend functions
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2021-03-27 20:33:57 +00:00
Dominic Fischer
f8718e397c Convert ReadService to suspend functions
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2021-03-27 20:20:19 +00:00
Dominic Fischer
8f67511b22 Convert VerificationService to suspend functions
Signed-off-by: Dominic Fischer <dominicfischer7@gmail.com>
2021-03-27 19:20:16 +00:00
Benoit Marty
2045a164c1 Merge pull request #3049 from vector-im/feature/bma/various_fixew
Be robust to Exception.
2021-03-26 19:26:49 +01:00
oogm
86e23a5300 Merge branch 'develop' into develop 2021-03-26 17:25:57 +01:00
oogm
40929b9640 Update CHANGES.md for a release with 1.1.4 2021-03-26 17:21:33 +01:00
oogm
a40adb903a Update emoji import script to ease execution, output smaller .json files and capitalize emoji names 2021-03-26 17:21:02 +01:00
Benoit Marty
5c89179c47 Merge pull request #3064 from TR-SLimey/fix-path-traversal-file-save-api29
When downloading a file in <= API 29, replace dangerous characters with underscores
2021-03-26 15:34:03 +01:00
Benoit Marty
ebc2017fe0 Merge pull request #3062 from vector-im/feature/bma/enum
Be more robust when parsing some enums
2021-03-26 15:29:51 +01:00
oogm
7453509df4 Merge remote-tracking branch 'upstream/develop' into develop 2021-03-26 14:09:21 +01:00
Benoit Marty
94220a24d1 cleanup 2021-03-26 13:58:34 +01:00
TR-SLimey
d75b7434cf Replace dangerous characters in the filename with underscores 2021-03-26 12:45:22 +00:00
Benoit Marty
297fff1394 Cleanup some Enums 2021-03-26 13:41:10 +01:00
Benoit Marty
2e23fec82b Sadly fields cannot be private 2021-03-26 12:36:33 +01:00
Benoit Marty
ee265f71e6 Be more robust when parsing some enums - RoomJoinRules 2021-03-26 12:22:11 +01:00
Benoit Marty
5364d7fd03 Be more robust when parsing some enums - Guest Access 2021-03-26 12:18:36 +01:00
Benoit Marty
a7539d0f95 Be more robust when parsing some enums 2021-03-26 12:15:06 +01:00
vachan-maker
8379489385 Translated using Weblate (Malayalam)
Currently translated at 17.3% (410 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ml/
2021-03-26 06:34:33 +00:00
RainSlide
fa3ccda3f4 Translated using Weblate (Chinese (Simplified))
Currently translated at 100.0% (13 of 13 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/zh_Hans/
2021-03-26 06:34:32 +00:00
RainSlide
a1757c5408 Translated using Weblate (Chinese (Simplified))
Currently translated at 97.3% (2300 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hans/
2021-03-26 06:34:32 +00:00
GokdenizK
f3996e8634 Translated using Weblate (Turkish)
Currently translated at 67.9% (1605 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/tr/
2021-03-26 06:34:26 +00:00
ozzii
98839e79ad Translated using Weblate (Serbian)
Currently translated at 26.3% (623 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/sr/
2021-03-26 06:34:23 +00:00
Marcelo Filho
f502b323e7 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (2362 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2021-03-26 06:34:17 +00:00
Thor Arne Johansen
00c051d4ff Translated using Weblate (Norwegian Bokmål)
Currently translated at 61.9% (1463 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/nb_NO/
2021-03-26 06:34:14 +00:00
Benoit Marty
da16160d28 Translated using Weblate (French)
Currently translated at 100.0% (2362 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fr/
2021-03-26 06:34:14 +00:00
waclaw66
edee97142f Translated using Weblate (Czech)
Currently translated at 100.0% (2362 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/cs/
2021-03-26 06:34:14 +00:00
Benoit Marty
0f22dc610d Merge pull request #3043 from vector-im/dependabot/gradle/kotlin_version-1.4.32
Bump kotlin_version from 1.4.31 to 1.4.32
2021-03-25 13:57:50 +01:00
dependabot[bot]
081a904f8a Bump kotlin_version from 1.4.31 to 1.4.32
Bumps `kotlin_version` from 1.4.31 to 1.4.32.

Updates `kotlin-gradle-plugin` from 1.4.31 to 1.4.32
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

Updates `kotlin-stdlib-jdk7` from 1.4.31 to 1.4.32
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

Updates `kotlin-stdlib` from 1.4.31 to 1.4.32
- [Release notes](https://github.com/JetBrains/kotlin/releases)
- [Changelog](https://github.com/JetBrains/kotlin/blob/master/ChangeLog.md)
- [Commits](https://github.com/JetBrains/kotlin/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-25 12:57:42 +00:00
Benoit Marty
11a56dacb6 Merge pull request #3054 from vector-im/dependabot/gradle/androidx.fragment-fragment-ktx-1.3.2
Bump fragment-ktx from 1.3.0 to 1.3.2
2021-03-25 13:57:02 +01:00
Benoit Marty
68600c0538 Merge pull request #3053 from vector-im/dependabot/gradle/androidx.recyclerview-recyclerview-1.2.0-rc01
Bump recyclerview from 1.2.0-beta02 to 1.2.0-rc01
2021-03-25 13:56:22 +01:00
Benoit Marty
0d10d388e1 Merge pull request #3056 from vector-im/feature/bma/displayVersion
Add version details on the login screen, in debug or developer mode
2021-03-25 13:55:37 +01:00
Benoit Marty
627e9a9543 Add version details on the login screen, in debug or developer mode 2021-03-25 11:18:26 +01:00
dependabot[bot]
ee1059f1db Bump fragment-ktx from 1.3.0 to 1.3.2
Bumps fragment-ktx from 1.3.0 to 1.3.2.

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-25 06:33:50 +00:00
dependabot[bot]
30515492ca Bump recyclerview from 1.2.0-beta02 to 1.2.0-rc01
Bumps recyclerview from 1.2.0-beta02 to 1.2.0-rc01.

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-25 06:31:57 +00:00
Benoit Marty
276677295f Deleted translation using Weblate (Norwegian Bokmål (nb)) 2021-03-24 08:49:57 +00:00
Benoit Marty
024dcf1f6c Be robust to Exception.
And display details about it in the bottom sheet
2021-03-23 21:11:32 +01:00
Benoit Marty
2b70a8450c Merge pull request #3034 from vector-im/feature/bma/reply_image_preview
Picture preview when replying.
2021-03-22 20:49:40 +01:00
Benoit Marty
967b8f4afb Merge branch 'develop' into feature/bma/reply_image_preview 2021-03-22 20:49:32 +01:00
Benoit Marty
1b2f529f7c Merge pull request #2985 from vector-im/feature/ons/api_interceptor
Api interceptor implementation to allow app developers to peek responses
2021-03-22 20:48:51 +01:00
Benoit Marty
274aef8f24 Code qual 2021-03-22 19:15:06 +01:00
Benoit Marty
5136979352 Cleanup on unbinding
Valere's review
2021-03-22 18:33:06 +01:00
Benoit Marty
5cd86c685d Copyright 2021-03-22 18:29:06 +01:00
Benoit Marty
f106176752 Add missing synchronized 2021-03-22 18:26:29 +01:00
Benoit Marty
d85d44bf4b Add ApiInterceptor.removeListener() 2021-03-22 18:09:42 +01:00
Benoit Marty
f6e43a5305 Add Android test on ApiInterceptor 2021-03-22 17:13:16 +01:00
Benoit Marty
21cff9a749 Update after Ganfra's review, and kotlinification 2021-03-22 16:36:44 +01:00
Onuray Sahin
7db1d81eb6 Changelog added. 2021-03-22 16:19:51 +01:00
Onuray Sahin
9e7d4c901e Api interceptor implementation to allow app developers to peek responses. 2021-03-22 16:18:51 +01:00
Benoit Marty
a8fedfff53 Merge pull request #3021 from vector-im/feature/bma/filter_some_url_preview
Disable URL preview for some domains (#2995)
2021-03-22 15:41:22 +01:00
vachan-maker
b117c30e44 Translated using Weblate (Malayalam)
Currently translated at 16.7% (396 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ml/
2021-03-21 15:34:25 +00:00
GokdenizK
beb552db31 Translated using Weblate (Turkish)
Currently translated at 66.2% (1564 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/tr/
2021-03-21 15:34:25 +00:00
ozzii
2bdb67cd4d Translated using Weblate (Serbian)
Currently translated at 23.0% (545 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/sr/
2021-03-21 15:34:22 +00:00
oogm
0fc102461c Update import_emojis.py to pull keywords from emojilib, update quick reactions 2021-03-19 22:24:43 +01:00
Benoit Marty
7b8ede03bc Picture preview when replying. Also add the image preview in the message detail bottomsheet (#2916) 2021-03-19 20:09:53 +01:00
Benoit Marty
fa37070884 Disable URL preview for some domains (#2995) 2021-03-19 17:23:19 +01:00
Benoit Marty
43fd9910e3 Merge pull request #3031 from vector-im/feature/bma/other_fixies
Some fixies
2021-03-19 17:06:54 +01:00
Benoit Marty
684c0332d5 Remove commented out code 2021-03-19 16:27:31 +01:00
Benoit Marty
2ffcc63de8 Typo 2021-03-19 16:00:49 +01:00
Benoit Marty
0a854918c2 Merge pull request #3003 from vector-im/feature/bma/split_key_request
Split key request
2021-03-19 15:58:33 +01:00
Benoit Marty
1214abdd44 Merge branch 'develop' into feature/bma/split_key_request 2021-03-19 15:57:55 +01:00
Benoit Marty
91769b71db Merge pull request #3024 from vector-im/dependabot/gradle/epoxy_version-4.4.3
Bump epoxy_version from 4.4.2 to 4.4.3
2021-03-19 15:57:33 +01:00
Benoit Marty
9c5256b4e2 Merge pull request #3025 from vector-im/feature/bca/bulk_no_olm
Send several NO_OLM in one request
2021-03-19 15:57:20 +01:00
Benoit Marty
c0a4b17a34 Merge pull request #3028 from vector-im/dependabot/gradle/com.android.tools.build-gradle-4.1.3
Bump gradle from 4.1.2 to 4.1.3
2021-03-19 15:55:36 +01:00
Benoit Marty
c43479420a Reorder signature for clarity 2021-03-19 15:42:42 +01:00
Benoit Marty
7e2a5e55f7 Simplify signature, userId is a member of the class 2021-03-19 15:38:14 +01:00
Benoit Marty
294df236c5 Hide encrypted reactions from the timeline (#2509) 2021-03-19 15:33:25 +01:00
Benoit Marty
485c44454b Handle encrypted reactions (#2509) 2021-03-19 15:27:56 +01:00
Benoit Marty
fa1de6e6b0 Disable color because there is no action behind. 2021-03-19 14:25:52 +01:00
Benoit Marty
0eea257a25 Improve layout for more clarity 2021-03-19 14:15:17 +01:00
Benoit Marty
adca3de3b5 Improve message with Emoji only detection (#3017) 2021-03-19 13:48:49 +01:00
Benoit Marty
3b16351308 Fix bad theme change for the MainActivity 2021-03-19 13:36:24 +01:00
Benoit Marty
80db39a934 No alert possible in SignedOutActivity 2021-03-19 13:15:13 +01:00
Benoit Marty
2d75c67aa3 ktlint 2021-03-19 10:24:40 +01:00
Benoit Marty
6b284f2a16 Merge branch 'develop' into feature/bca/bulk_no_olm 2021-03-19 10:23:37 +01:00
Benoit Marty
cfefde0c06 Update CHANGES.md 2021-03-19 10:23:23 +01:00
dependabot[bot]
92f1390407 Bump gradle from 4.1.2 to 4.1.3
Bumps gradle from 4.1.2 to 4.1.3.

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-19 07:11:14 +00:00
Benoit Marty
ec50f891a2 Improve description format 2021-03-18 19:22:29 +01:00
Benoit Marty
a3c331019d Remove roomId from DevTools item (copy/paste error) 2021-03-18 19:18:12 +01:00
Benoit Marty
89eea7cbdd Merge pull request #3026 from vector-im/feature/bma/missing_shield
Display the room shield in all room setting screens
2021-03-18 19:01:07 +01:00
Benoit Marty
9f47598950 Display the room shield in all room setting screens 2021-03-18 18:01:21 +01:00
Valere
35635c859d Send several NO_OLM in one request 2021-03-18 15:08:56 +01:00
dependabot[bot]
973e111dad Bump epoxy_version from 4.4.2 to 4.4.3
Bumps `epoxy_version` from 4.4.2 to 4.4.3.

Updates `epoxy` from 4.4.2 to 4.4.3
- [Release notes](https://github.com/airbnb/epoxy/releases)
- [Changelog](https://github.com/airbnb/epoxy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/airbnb/epoxy/commits)

Updates `epoxy-glide-preloading` from 4.4.2 to 4.4.3
- [Release notes](https://github.com/airbnb/epoxy/releases)
- [Changelog](https://github.com/airbnb/epoxy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/airbnb/epoxy/commits)

Updates `epoxy-processor` from 4.4.2 to 4.4.3
- [Release notes](https://github.com/airbnb/epoxy/releases)
- [Changelog](https://github.com/airbnb/epoxy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/airbnb/epoxy/commits)

Updates `epoxy-paging` from 4.4.2 to 4.4.3
- [Release notes](https://github.com/airbnb/epoxy/releases)
- [Changelog](https://github.com/airbnb/epoxy/blob/master/CHANGELOG.md)
- [Commits](https://github.com/airbnb/epoxy/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-18 12:12:17 +00:00
Benoit Marty
c1254ed5b1 Merge pull request #3012 from vector-im/dependabot/gradle/io.mockk-mockk-1.11.0
Bump mockk from 1.10.6 to 1.11.0
2021-03-18 13:12:10 +01:00
Benoit Marty
d51f632404 Merge pull request #3011 from vector-im/dependabot/gradle/io.mockk-mockk-android-1.11.0
Bump mockk-android from 1.10.6 to 1.11.0
2021-03-18 13:11:59 +01:00
Benoit Marty
2f2bc758d7 Merge pull request #3022 from vector-im/dependabot/gradle/com.googlecode.libphonenumber-libphonenumber-8.12.20
Bump libphonenumber from 8.12.19 to 8.12.20
2021-03-18 13:11:41 +01:00
Benoit Marty
dbff5015df Keep is simple if there is no need to chunk 2021-03-18 11:56:19 +01:00
Benoit Marty
96b37a8206 Fix typo 2021-03-18 10:57:28 +01:00
Benoit Marty
f6032da788 Add more test 2021-03-18 10:44:15 +01:00
Benoit Marty
da9f0c6667 Fix an issue discovered by unit test 2021-03-18 10:44:15 +01:00
Benoit Marty
103ba463c3 Create getBetsChunkSize to avoid code duplication 2021-03-18 10:44:15 +01:00
Benoit Marty
9946ba8aa4 Split network request /keys/query into smaller requests (250 users max) (#2925) 2021-03-18 10:41:52 +01:00
Benoit Marty
3078adf0da Version++ 2021-03-18 10:40:33 +01:00
Benoit Marty
a6c43f4638 Merge branch 'develop' 2021-03-18 10:36:22 +01:00
Benoit Marty
1596df64a6 Revert "Version++"
This reverts commit 810ee6d4c4.
2021-03-18 10:36:06 +01:00
Benoit Marty
ab120d32e2 Merge branch 'release/1.1.3' into develop 2021-03-18 10:35:10 +01:00
Benoit Marty
1eda7fa5bb Prepare release 1.1.3 2021-03-18 10:35:03 +01:00
Benoit Marty
ef6e57066b Merge pull request #3018 from vector-im/feature/bma/improve_perf
Fix issue with Realm in UpdateTrustWorker
2021-03-18 10:27:54 +01:00
Graeme Power
64bdd894d6 Translated using Weblate (Irish)
Currently translated at 7.6% (1 of 13 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/ga/
2021-03-18 07:34:32 +00:00
Graeme Power
743a9cf358 Translated using Weblate (Irish)
Currently translated at 5.6% (133 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ga/
2021-03-18 07:34:32 +00:00
GokdenizK
3ceee8302a Translated using Weblate (Turkish)
Currently translated at 76.9% (10 of 13 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/tr/
2021-03-18 07:34:23 +00:00
KAHINA
ab12c641a8 Translated using Weblate (Kabyle)
Currently translated at 23.0% (3 of 13 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/kab/
2021-03-18 07:34:22 +00:00
Thibault Martin
33306bf218 Translated using Weblate (French)
Currently translated at 100.0% (13 of 13 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/fr/
2021-03-18 07:34:22 +00:00
Sven Grewe
a5b2083f1b Translated using Weblate (German)
Currently translated at 100.0% (13 of 13 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/de/
2021-03-18 07:34:22 +00:00
KAHINA
d31a4e1406 Translated using Weblate (Kabyle)
Currently translated at 92.2% (2179 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/kab/
2021-03-18 07:34:21 +00:00
TyIL TTY7
b2441b3e55 Translated using Weblate (Chinese (Simplified))
Currently translated at 94.3% (2228 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hans/
2021-03-18 07:34:17 +00:00
GokdenizK
ece3941e1f Translated using Weblate (Turkish)
Currently translated at 64.8% (1531 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/tr/
2021-03-18 07:34:16 +00:00
Thibault Martin
fcb30f6195 Translated using Weblate (French)
Currently translated at 100.0% (2362 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fr/
2021-03-18 07:34:14 +00:00
Hivaa
327088d79f Translated using Weblate (Persian)
Currently translated at 100.0% (2362 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/fa/
2021-03-18 07:34:13 +00:00
libexus
193db6a46c Translated using Weblate (German)
Currently translated at 99.9% (2361 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-03-18 07:34:12 +00:00
tiptoptom
214ef23c73 Translated using Weblate (German)
Currently translated at 99.9% (2361 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-03-18 07:34:12 +00:00
Sven Grewe
7731c4a3bb Translated using Weblate (German)
Currently translated at 99.9% (2361 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-03-18 07:34:12 +00:00
dependabot[bot]
8e85d5515d Bump libphonenumber from 8.12.19 to 8.12.20
Bumps [libphonenumber](https://github.com/google/libphonenumber) from 8.12.19 to 8.12.20.
- [Release notes](https://github.com/google/libphonenumber/releases)
- [Changelog](https://github.com/google/libphonenumber/blob/master/making-metadata-changes.md)
- [Commits](https://github.com/google/libphonenumber/compare/v8.12.19...v8.12.20)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-18 07:18:33 +00:00
Benoit Marty
bab01ea309 Merge branch 'develop' into feature/bma/improve_perf 2021-03-17 18:10:14 +01:00
Benoit Marty
6aeca212f4 Merge pull request #3008 from vector-im/feature/fga/fix_ui_timeline
Feature/fga/fix UI timeline
2021-03-17 15:20:21 +01:00
Benoit Marty
67ff43cecc Changelog 2021-03-17 15:04:39 +01:00
Benoit Marty
1f82b1442d Merge branch 'develop' into feature/fga/fix_ui_timeline 2021-03-17 15:03:22 +01:00
Benoit Marty
192fc6fd94 Use minimum delay accepted by the Work library. The current value is 10_000 and smaller value will be ignored.
It will remove the warning "W/WM-WorkSpec: Backoff delay duration less than minimum value"
2021-03-17 14:54:15 +01:00
Benoit Marty
a4f6fe0cd2 Cleanup 2021-03-17 12:43:05 +01:00
Benoit Marty
616d3c1988 Fix IllegalStateException in UpdateTrustWorker
Also split into 2 methods
2021-03-17 12:42:28 +01:00
ganfra
174e938b5b Fix padding layout 2021-03-17 11:44:22 +01:00
Benoit Marty
e89e0724a0 limit log 2021-03-17 11:04:17 +01:00
Benoit Marty
1d1f78a020 Timber.d instead of Timber.v 2021-03-17 10:39:25 +01:00
dependabot[bot]
118ea4b0b2 Bump mockk from 1.10.6 to 1.11.0
Bumps [mockk](https://github.com/mockk/mockk) from 1.10.6 to 1.11.0.
- [Release notes](https://github.com/mockk/mockk/releases)
- [Commits](https://github.com/mockk/mockk/compare/1.10.6...1.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-17 07:08:12 +00:00
dependabot[bot]
f230830763 Bump mockk-android from 1.10.6 to 1.11.0
Bumps [mockk-android](https://github.com/mockk/mockk) from 1.10.6 to 1.11.0.
- [Release notes](https://github.com/mockk/mockk/releases)
- [Commits](https://github.com/mockk/mockk/compare/1.10.6...1.11.0)

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-17 07:07:15 +00:00
Benoit Marty
5edf7ca520 Version++ 2021-03-16 22:31:25 +01:00
Benoit Marty
810ee6d4c4 Version++ 2021-03-16 22:09:41 +01:00
Benoit Marty
f12720aeb3 Merge branch 'release/1.1.2' into develop 2021-03-16 22:08:39 +01:00
Benoit Marty
ab260e79eb Merge branch 'release/1.1.2' 2021-03-16 22:08:39 +01:00
Benoit Marty
2d64fe96c1 Prepare release 1.1.2 2021-03-16 22:08:29 +01:00
ganfra
616a46294c Update CHANGES 2021-03-16 20:14:20 +01:00
ganfra
c9691b04ad Timeline: fix separators background 2021-03-16 20:11:10 +01:00
ganfra
1bc431198e Timeline: fix ripple on text item 2021-03-16 20:10:47 +01:00
Benoit Marty
5ce984ce3f Merge pull request #3006 from vector-im/feature/bca/fix_video_wont_play
Regression: Video will not play upon tap
2021-03-16 18:32:20 +01:00
oogm
51650fd899 Add script to pull emojis from Unicode.org as a file 2021-03-16 16:26:20 +01:00
Valere
3b5dacd7e2 Merge branch 'develop' into feature/bca/fix_video_wont_play 2021-03-16 16:15:24 +01:00
Benoit Marty
f90bc17eb3 Merge pull request #3005 from vector-im/feature/bma/restore_code
Restore code
2021-03-16 15:54:57 +01:00
Valere
a52d20eeff Regression: Video will not play upon tap 2021-03-16 15:26:06 +01:00
Benoit Marty
b3ccd788f6 Merge pull request #2997 from ShadowJonathan/no-bold
Change ISSUE_TEMPLATE bold lines to proper headers
2021-03-16 15:03:15 +01:00
Benoit Marty
12b927f951 Merge pull request #3004 from vector-im/feature/bca/workaround_stuck_message
Quick Work around to remove stuck messages
2021-03-16 15:01:02 +01:00
Benoit Marty
e541a3b962 Merge branch 'develop' into feature/bca/workaround_stuck_message 2021-03-16 15:00:55 +01:00
Benoit Marty
9492887345 Restore call to clearUnavailableServersList() removed by mistake
See https://github.com/vector-im/element-android/pull/3001#pullrequestreview-613195611
2021-03-16 14:53:15 +01:00
Benoit Marty
641ce206c2 Move change to correct release version (#3001) 2021-03-16 14:48:27 +01:00
Benoit Marty
4273a6a1be Merge pull request #3001 from timokoesters/fix-parsing-servername
fix: make cross signing work with server names containing :
2021-03-16 14:46:47 +01:00
Benoit Marty
c80564e1b1 Merge pull request #2989 from vector-im/feature/bma/rr
Feature/bma/rr
2021-03-16 14:46:23 +01:00
Benoit Marty
431d450fec Merge branch 'develop' into feature/bma/rr 2021-03-16 14:46:10 +01:00
Benoit Marty
a30660ed43 Cleanup 2021-03-16 14:44:40 +01:00
Valere
b93200f371 unused params 2021-03-16 14:31:37 +01:00
Benoit Marty
4ad0eb3db2 Merge pull request #2999 from vector-im/feature/bma/shields
Shields optimization
2021-03-16 13:31:56 +01:00
Benoit Marty
cb17fa60dc Ganfra's review: delete files after the Realm transaction 2021-03-16 13:29:38 +01:00
Valere
5b94540f76 Quick Work around to remove stuck messages 2021-03-16 12:16:11 +01:00
Benoit Marty
e8bb3d81ed Ganfra's review: inject Moshi Moshi 2021-03-16 12:15:28 +01:00
Timo Kösters
dd2a7397a4 fix: make cross signing work with server names containing :
Server names are allowed to contain ':' to specify a port, see https://matrix.org/docs/spec/appendices#server-name
User ids on the other hand are not allowed to contain ':', even
historical user ids, see https://matrix.org/docs/spec/appendices#historical-user-ids

Therefore we can use the first instance of ':' to split the user
localpart from the server name.
2021-03-15 22:31:34 +01:00
Benoit Marty
e7c9fb987c Use AwaitTransaction (G's review) 2021-03-15 18:08:33 +01:00
Benoit Marty
4f3734f932 Ensure message are decrypted in the room list after a clear cache 2021-03-15 16:53:19 +01:00
Benoit Marty
4302d50af9 We do not display shield in the room list anymore
Room member are lazy loaded, so the shield may not be accurate anymore.
2021-03-15 16:09:08 +01:00
Benoit Marty
75ad6a640b loglimit 2021-03-15 16:02:09 +01:00
Benoit Marty
13cbfaf5e7 Do not load room members in e2e after init sync 2021-03-15 15:29:20 +01:00
Benoit Marty
71f2c50799 Do what the comment said 2021-03-15 15:02:04 +01:00
Benoit Marty
c4aadfed33 Better API and avoid copying Collection 2021-03-15 14:35:21 +01:00
Benoit Marty
ed662d3add Fix double RR issue when optimizing init sync 2021-03-15 14:19:23 +01:00
oogm
863e199995 Update CHANGES.md to include the correct PR number 2021-03-15 01:33:46 +01:00
oogm
e8015bfbd4 Update emoji_picker_datasource.json to Unicode 13.1 and dynamically filter reactions by renderability 2021-03-15 00:20:59 +01:00
Jonathan de Jong
c998f5fd8f whoops 2021-03-14 19:20:35 +01:00
Jonathan de Jong
2708b85a20 Update CHANGES.md 2021-03-14 19:17:05 +01:00
Jonathan de Jong
cb0445c785 Change bold to headers 2021-03-14 19:14:53 +01:00
Graeme Power
9bfc1d09cd Added translation using Weblate (Irish) 2021-03-14 12:44:08 +00:00
Auri B. P
256ddc1831 Translated using Weblate (Catalan)
Currently translated at 100.0% (13 of 13 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/ca/
2021-03-14 10:34:15 +00:00
Ihor Hordiichuk
04a27aa418 Translated using Weblate (Ukrainian)
Currently translated at 63.2% (1494 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/uk/
2021-03-14 10:34:15 +00:00
libexus
a5c113137a Translated using Weblate (German)
Currently translated at 99.7% (2355 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-03-14 10:34:11 +00:00
Sven Grewe
2d5a3b71e2 Translated using Weblate (German)
Currently translated at 99.7% (2355 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-03-14 10:34:11 +00:00
zeritti
8f0319a138 Translated using Weblate (Czech)
Currently translated at 100.0% (13 of 13 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/cs/
2021-03-12 23:34:25 +00:00
Jeff Huang
7edb45d9b7 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (13 of 13 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/zh_Hant/
2021-03-12 23:34:24 +00:00
random
3ad6c7a18b Translated using Weblate (Italian)
Currently translated at 100.0% (13 of 13 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/it/
2021-03-12 23:34:24 +00:00
Priit Jõerüüt
7651df1228 Translated using Weblate (Estonian)
Currently translated at 100.0% (13 of 13 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/et/
2021-03-12 23:34:23 +00:00
Ihor Hordiichuk
6148b2647f Translated using Weblate (Ukrainian)
Currently translated at 100.0% (13 of 13 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/uk/
2021-03-12 23:34:23 +00:00
LinAGKar
e7d7886397 Translated using Weblate (Swedish)
Currently translated at 100.0% (13 of 13 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/sv/
2021-03-12 23:34:22 +00:00
Marcelo Filho
6e757f88b6 Translated using Weblate (Portuguese (Brazil))
Currently translated at 100.0% (13 of 13 strings)

Translation: Element Android/Element Android Store
Translate-URL: https://translate.element.io/projects/element-android/element-store/pt_BR/
2021-03-12 23:34:22 +00:00
Jeff Huang
2c0a0a8e5a Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (2362 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/zh_Hant/
2021-03-12 23:34:21 +00:00
LinAGKar
f8391f07b4 Translated using Weblate (Swedish)
Currently translated at 100.0% (2362 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/sv/
2021-03-12 23:34:20 +00:00
Marcelo Filho
1346d232e6 Translated using Weblate (Portuguese (Brazil))
Currently translated at 98.4% (2325 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/pt_BR/
2021-03-12 23:34:20 +00:00
random
35ff4cc7cd Translated using Weblate (Italian)
Currently translated at 100.0% (2362 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/it/
2021-03-12 23:34:18 +00:00
Louis Raymond
77f2ceaef9 Translated using Weblate (Indonesian)
Currently translated at 33.5% (792 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/id/
2021-03-12 23:34:13 +00:00
Priit Jõerüüt
840ee66903 Translated using Weblate (Estonian)
Currently translated at 100.0% (2362 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/et/
2021-03-12 23:34:13 +00:00
@a2sc:matrix.org
deabaf2e34 Translated using Weblate (German)
Currently translated at 99.5% (2351 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-03-12 23:34:12 +00:00
libexus
db9933f2a1 Translated using Weblate (German)
Currently translated at 99.5% (2351 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-03-12 23:34:12 +00:00
tiptoptom
a00a6d3fb5 Translated using Weblate (German)
Currently translated at 99.5% (2351 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/de/
2021-03-12 23:34:12 +00:00
waclaw66
116ed9b4a8 Translated using Weblate (Czech)
Currently translated at 100.0% (2362 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/cs/
2021-03-12 23:34:11 +00:00
Auri B. P
70ad270f26 Translated using Weblate (Catalan)
Currently translated at 100.0% (2362 of 2362 strings)

Translation: Element Android/Element Android App
Translate-URL: https://translate.element.io/projects/element-android/element-app/ca/
2021-03-12 23:34:10 +00:00
Benoit Marty
0c774c098f No op for empty list 2021-03-12 19:08:57 +01:00
Benoit Marty
e3d2186c25 Rework UpdateTrustWorker, should have better perf. 2021-03-12 18:55:53 +01:00
Benoit Marty
857bfcb971 Cleanup 2021-03-12 12:18:21 +01:00
Benoit Marty
0b0634b531 Ensure tmp file is always deleted when it is read 2021-03-12 12:17:47 +01:00
Benoit Marty
fe39c92e25 Load RR when opening a timeline 2021-03-12 12:17:47 +01:00
Benoit Marty
3777b00ad7 Store Ephemeral in files to handle them later (no second transaction) 2021-03-12 12:17:47 +01:00
Benoit Marty
bc81931773 Merge branch 'release/1.1.1' 2021-03-10 22:04:26 +01:00
Benoit Marty
bb33a92d27 Merge branch 'release/1.1.0' 2021-02-19 19:30:56 +01:00
Benoit Marty
fa710ff601 Merge branch 'release/1.0.17' 2021-02-09 21:07:35 +01:00
Benoit Marty
391ddf1925 Merge branch 'release/1.0.16' 2021-02-04 13:25:23 +01:00
Benoit Marty
ce6d4c4a64 Merge branch 'release/1.0.15' 2021-02-03 17:08:27 +01:00
Benoit Marty
7c013de7b9 Merge branch 'release/1.0.14' 2021-01-15 11:13:49 +01:00
Benoit Marty
0412b87ad1 Merge branch 'release/1.0.13' 2020-12-18 10:59:54 +01:00
Benoit Marty
1946058c8e Merge branch 'release/1.0.12' 2020-12-15 14:16:17 +01:00
Benoit Marty
dffdcfe1e4 Merge branch 'release/1.0.11' 2020-11-27 20:40:03 +01:00
Benoit Marty
bba167d4ea Merge branch 'release/1.0.10' 2020-11-04 15:58:45 +01:00
Benoit Marty
9a5e71f391 Merge branch 'hotfix/bma/versionCode' 2020-10-19 12:31:35 +02:00
525 changed files with 9654 additions and 5536 deletions

View File

@@ -7,27 +7,27 @@ assignees: ''
---
**Describe the bug**
#### Describe the bug
A clear and concise description of what the bug is.
**To Reproduce**
#### To Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
#### Expected behavior
A clear and concise description of what you expected to happen.
**Screenshots**
#### Screenshots
If applicable, add screenshots to help explain your problem.
**Smartphone (please complete the following information):**
#### Smartphone (please complete the following information):
- Device: [e.g. Samsung S6]
- OS: [e.g. Android 6.0]
**Additional context**
#### Additional context
- App version and store [e.g. 1.0.0 - F-Droid]
- Homeserver: [e.g. matrix.org]

View File

@@ -7,14 +7,14 @@ assignees: ''
---
**Is your feature request related to a problem? Please describe.**
#### Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
#### Describe the solution you'd like.
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
#### Describe alternatives you've considered.
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
#### Additional context
Add any other context or screenshots about the feature request here.

View File

@@ -1,35 +1,82 @@
Changes in Element 1.1.2 (2021-XX-XX)
Changes in Element 1.1.6 (2021-04-16)
===================================================
Features ✨:
-
Improvements 🙌:
-
Bugfix 🐛:
-
- Fix crash on the timeline
- App crashes on "troubleshoot notifications" button (#3187)
Translations 🗣:
-
SDK API changes ⚠️:
-
Build 🧱:
-
Test:
-
Other changes:
-
Changes in Element 1.1.1 (2021-XX-XX)
Changes in Element 1.1.5 (2021-04-15)
===================================================
Features ✨:
-
Bugfix 🐛:
- Fix crash during Realm migration
- Fix crash when playing video (#3179)
Changes in Element 1.1.4 (2021-04-09)
===================================================
Improvements 🙌:
- Split network request `/keys/query` into smaller requests (250 users max) (#2925)
- Crypto improvement | Bulk send NO_OLM withheld code
- Display the room shield in all room setting screens
- Improve message with Emoji only detection (#3017)
- Picture preview when replying. Also add the image preview in the message detail bottomsheet (#2916)
- Api interceptor to allow app developers peek responses (#2986)
- Update reactions to Unicode 13.1 (#2998)
- Be more robust when parsing some enums
- Improve timeline filtering (dissociate membership and profile events, display hidden events when highlighted, fix hidden item/read receipts behavior)
- Add better support for empty room name fallback (#3106)
- Room list improvements (paging)
- Fix quick click action (#3127)
- Get Event after a Push for a faster notification display in some conditions
- Always try to retry Http requests in case of 429 (#1300)
- registration availability endpoint added to matrix-sdk
Bugfix 🐛:
- Fix bad theme change for the MainActivity
- Handle encrypted reactions (#2509)
- Disable URL preview for some domains (#2995)
- Fix avatar rendering for DMs, after initial sync (#2693)
- Fix mandatory parameter in API (#3065)
- If signout request fails, do not start LoginActivity, but restart the app (#3099)
- Retain keyword order in emoji import script, and update the generated file (#3147)
SDK API changes ⚠️:
- Several Services have been migrated to coroutines (#2449)
- Removes filtering options on Timeline.
Build 🧱:
- Properly exclude gms dependencies in fdroid build flavour which were pulled in through the jitsi SDK (#3125)
Other changes:
- Add version details on the login screen, in debug or developer mode
- Migrate Retrofit interface to coroutine calls
Changes in Element 1.1.3 (2021-03-18)
===================================================
Bugfix 🐛:
- Fix regression in UpdateTrustWorker (introduced in 1.1.2)
- Timeline : Fix ripple effect on text item and fix background color of separators.
Changes in Element 1.1.2 (2021-03-16) (was not published tp GPlay prod)
===================================================
Improvements 🙌:
- Lazy storage of ReadReceipts
- Do not load room members in e2e after init sync
Bugfix 🐛:
- Add option to cancel stuck messages at bottom of timeline see #516
- Ensure message are decrypted in the room list after a clear cache
- Regression: Video will not play upon tap, but only after swipe #2928
- Cross signing now works with servers with an explicit port in the servername
Other changes:
- Change formatting on issue templates to proper headings.
Changes in Element 1.1.1 (2021-03-10) (was not published tp GPlay prod)
===================================================
Improvements 🙌:
- Allow non-HTTPS connections to homeservers on Tor (#2941)
@@ -51,16 +98,10 @@ Bugfix 🐛:
Translations 🗣:
- All string resources and translations have been moved to the application module. Weblate project for the SDK will be removed.
SDK API changes ⚠️:
-
Build 🧱:
- Update a lot of dependencies, with the help of dependabot.
- Add a script to download and install APK from the CI
Test:
-
Other changes:
- Rework edition of event management

View File

@@ -69,7 +69,7 @@ dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation "androidx.recyclerview:recyclerview:1.2.0-beta02"
implementation "androidx.recyclerview:recyclerview:1.2.0-rc01"
implementation 'com.google.android.material:material:1.3.0'
}

View File

@@ -2,7 +2,7 @@
buildscript {
// Ref: https://kotlinlang.org/releases.html
ext.kotlin_version = '1.4.31'
ext.kotlin_version = '1.4.32'
ext.kotlin_coroutines_version = "1.4.2"
repositories {
google()
@@ -12,11 +12,11 @@ buildscript {
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath 'com.android.tools.build:gradle:4.1.3'
classpath 'com.google.gms:google-services:4.3.5'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.1.1'
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.2'
classpath 'com.google.android.gms:oss-licenses-plugin:0.10.3'
classpath "com.likethesalad.android:string-reference:1.2.1"
// NOTE: Do not place your application dependencies here; they belong

View File

@@ -2,7 +2,7 @@ This document aims to describe how Element android displays notifications to the
# Table of Contents
1. [Prerequisites Knowledge](#prerequisites-knowledge)
* [How does a matrix client gets a message from a Home Server?](#how-does-a-matrix-client-gets-a-message-from-a-home-server)
* [How does a matrix client get a message from a Home Server?](#how-does-a-matrix-client-get-a-message-from-a-home-server)
* [How does a mobile app receives push notification?](#how-does-a-mobile-app-receives-push-notification)
* [Push VS Notification](#push-vs-notification)
* [Push in the matrix federated world](#push-in-the-matrix-federated-world)
@@ -22,7 +22,7 @@ First let's start with some prerequisite knowledge
# Prerequisites Knowledge
## How does a matrix client gets a message from a Home Server?
## How does a matrix client get a message from a Home Server?
In order to get messages from a home server, a matrix client need to perform a ``sync`` operation.

View File

@@ -0,0 +1,2 @@
التغييرات الرئيسة في هذه النسخة: تحسينات على الأداء وإصلاح للعلل!
اطّلع على سجل التغييرات الكامل هنا: https://github.com/vector-im/element-android/releases/tag/v1.1.1

View File

@@ -1 +1 @@
Element (سابقاً Riot.im)
Element (Riot.im سابقًا)

View File

@@ -0,0 +1,2 @@
Canvis principals d'aquesta versió: millora de rendiment i correcció d'errors!
Registre de canvis complet: https://github.com/vector-im/element-android/releases/tag/v1.1.1

View File

@@ -0,0 +1,2 @@
Hlavní změny v této verzi: vylepšení výkonnosti a opravy chyb!
Úplný záznam změn: https://github.com/vector-im/element-android/releases/tag/v1.1.1

View File

@@ -1,2 +1,2 @@
Diese neue Version enthält hauptsächlich Verbesserungen der Benutzer*innenoberfläche und der Handhabung. Du kannst jetzt ganz schnell Freund*innen einladen und DMs erstellen, indem du schlicht einen QR-Code scannst.
Diese neue Version enthält hauptsächlich Verbesserungen der Benutzeroberfläche und der Handhabung. Du kannst jetzt ganz schnell Freund*innen einladen und DMs erstellen, indem du schlicht einen QR-Code scannst.
Vollständige Versionshinweise: https://github.com/vector-im/element-android/releases/tag/v1.0.11

View File

@@ -0,0 +1,2 @@
Hauptänderungen in dieser Version: Leistungsverbesserungen und Fehlerbehebungen!
Vollständiges Änderungsprotokoll: https://github.com/vector-im/element-android/releases/tag/v1.1.1

View File

@@ -3,7 +3,7 @@ Element ist eine neuartige Messaging- und Kollaborationsapp:
1. Volle Kontrolle über deine Privatssphäre
2. Kommuniziere mit jedem aus dem Matrix-Netzwerk und mit der Integration von z.B. Slack sogar über Matrix hinaus
3. Schutz vor Werbung, Datamining und geschlossenen Platformen
4. Absicherung durch Ende-zu-Ende-Verschlüsselung, und Cross Signing um andere zu verifizieren
4. Absicherung durch Ende-zu-Ende-Verschlüsselung, und Cross-Signing um andere zu verifizieren
Element unterscheidet sich durch Dezentralität und Open Source deutlich von anderen Messaging- und Kollaborationsapps.
@@ -11,11 +11,11 @@ Element ermöglicht es einen eigenen Server zu betreiben - oder einen beliebigen
Element ist zu all diesem in der Lage, weil es Matrix nutzt - einen Standard für offene, dezentrale Kommunikation.
Element gibt dir die Kontrolle, indem es dir die Wahl darüber lässt, wer deine Konversationen hostet. In der Element App kannst du zwischen verschiedenen Möglichkeiten auswählen:
Element gibt dir die Kontrolle, indem es dir die Wahl darüber lässt, wer deine Konversationen hostet. In der Element-App kannst du zwischen verschiedenen Möglichkeiten auswählen:
1. Kostenlos auf dem öffentlichen matrix.org Server registrieren, der von den Matrix-Entwicklern gehostet wird, oder wähle aus Tausenden von öffentlichen Servern, die von Freiwilligen gehostet werden
2. Einen Account auf einem eigenen Server auf eigener Hardware betreiben
3. Einen Account auf einem benutzerdefinierten Server erstellen, zum Beispiel durch ein Abonnment bei der Element Matrix Services Hosting-Platform
2. Einen Konto auf einem eigenen Server auf eigener Hardware betreiben
3. Einen Konto auf einem benutzerdefinierten Server erstellen, zum Beispiel durch ein Abonnement bei Element Matrix Services (kurz EMS)
<b>Wieso Element nutzen?</b>
@@ -23,8 +23,8 @@ Element gibt dir die Kontrolle, indem es dir die Wahl darüber lässt, wer deine
<b>OFFENE KOMMUNIKATION UND KOLLABORATION</b>: Du kannst mit jedem im Matrix-Netzwerk schreiben, ob sie nun Element oder eine andere Matrix-App nutzen, oder gar ein anderes Kommunikationssystem wie z.B. Slack, IRC oder XMPP.
<b>SUPER SICHER</b>: Echte Ende-zu-Ende-Verschlüsselung (nur Personen in der Konversation können die Nachrichten entschlüsseln), und Cross Signing um die Geräte der anderen Personen zu verifizieren.
<b>SUPER SICHER</b>: Echte Ende-zu-Ende-Verschlüsselung (nur Personen in der Konversation können die Nachrichten entschlüsseln), und Cross-Signing um die Geräte der anderen Personen zu verifizieren.
<b>VOLLSTÄNDIGE KOMMUNIKATION</b>: Nachrichten, Telefonate und Videoanrufe, Teilen von Dateien oder dem eigenen Bildschirm und viele andere Integrationen, Bots und Widgets. Erstelle Räume, Communities, bleib in Kontakt und sei produktiv.
<b>ÜBERALL WO DU BIST</b>: Bleib in Kontakt wo auch immer du bist - mit einem vollständig synchronisierten Nachrichtenverlauf über alle Geräte und im Web auf https://app.element.io.
<b>ÜBERALL WO DU BIST</b>: Bleib in Kontakt wo auch immer du bist - mit einem vollständig synchronisierten Nachrichtenverlauf über alle Geräte und im Netz auf https://app.element.io.

View File

@@ -1 +1 @@
Sicherer dezentraler Chat & Telefonie. Schütze deine Daten vor Dritten.
Sicherer dezentraler Chat und Telefonie. Schütze deine Daten vor Dritten.

View File

@@ -0,0 +1,2 @@
Main changes in this version: performance improvement and bug fixes!
Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.1.2

View File

@@ -0,0 +1,2 @@
Main changes in this version: performance improvement and bug fixes!
Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.1.3

View File

@@ -0,0 +1,2 @@
Main changes in this version: performance improvement and bug fixes!
Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.1.4

View File

@@ -0,0 +1,2 @@
Main changes in this version: hot fixes for 1.1.4
Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.1.5

View File

@@ -0,0 +1,2 @@
Main changes in this version: hot fixes for 1.1.5
Full changelog: https://github.com/vector-im/element-android/releases/tag/v1.1.6

View File

@@ -0,0 +1,2 @@
Põhilised muutused selles versioonis: jõudluse parandused ja pisikohendused.
Kogu ingliskeelne muudatuste logi: https://github.com/vector-im/element-android/releases/tag/v1.1.1

View File

@@ -0,0 +1,2 @@
تغییرات اصلی در این نگارش: پیش‌نمایش نشانی، صفحه‌کلید اموجی جدید، تنظیم‌های اتاق جدید و برف برای کریسمس!
گزارش تغییر کامل: https://github.com/vector-im/element-android/releases/tag/v1.0.12

View File

@@ -0,0 +1,2 @@
تغییرات اصلی در این نگارش: پیش‌نمایش نشانی، صفحه‌کلید اموجی جدید، تنظیم‌های اتاق جدید و برف برای کریسمس!
گزارش تغییر کامل: https://github.com/vector-im/element-android/releases/tag/v1.0.13

View File

@@ -0,0 +1,2 @@
تغییرات اصلی در این نگارش: ویرایش اجازه‌های اتاق، زمینهٔ تاریک/روشن خودکار و رفع دسته‌ای از مشکل‌ها.
گزارش تغییر کامل: https://github.com/vector-im/element-android/releases/tag/v1.0.14

View File

@@ -0,0 +1,2 @@
تغییرات اصلی در این نگارش: پشتیبانی از ورود اجتماعی.
گزارش تغییر کامل: https://github.com/vector-im/element-android/releases/tag/v1.0.15

View File

@@ -0,0 +1,2 @@
تغییرات اصلی در این نگارش: پشتیبانی از ورود اجتماعی.
گزارش تغییر کامل: https://github.com/vector-im/element-android/releases/tag/v1.0.15 و https://github.com/vector-im/element-android/releases/tag/v1.0.16

View File

@@ -0,0 +1,2 @@
تغییرات اصلی در این نگارش: رفع مشکل‌ها!
گزارش تغییر کامل: https://github.com/vector-im/element-android/releases/tag/v1.0.17

View File

@@ -0,0 +1,2 @@
تغییرات اصلی در این نگارش: بهبود ویپ (تماس‌های صوتی و تصویری در پیام‌های مستقیم) و رفع مشکل‌ها!
گزارش تغییر کامل: https://github.com/vector-im/element-android/releases/tag/v1.1.0

View File

@@ -0,0 +1,2 @@
تغییرات اصلی در این نگارش: بهبود عملکرد و رفع مشکل‌ها!
گزارش تغییر کامل: https://github.com/vector-im/element-android/releases/tag/v1.1.1

View File

@@ -0,0 +1,2 @@
Suurimmat muutokset tässä versiossa: VoIP-parannuksia ja korjauksia (ääni- ja videopuhelut yksityiskeskusteluissa)
Täysi muutosloki: https://github.com/vector-im/element-android/releases/tag/v1.1.0

View File

@@ -0,0 +1,2 @@
Suurimmat muutokset tässä versiossa: suorituskykyparannuksia ja bugikorjauksia!
Täysi muutosloki: https://github.com/vector-im/element-android/releases/tag/v1.1.1

View File

@@ -1,2 +1,2 @@
Principaux changements apportés par cette version : aperçu des URL, nouveau clavier Emoji, nouvelles options de configuration pour le salon et neige pour Noël.
Liste complète des changements : https://github.com/vector-im/element-android/releases/tag/v1.0.12
Liste complète des changements : https://github.com/vector-im/element-android/releases/tag/v1.0.13

View File

@@ -0,0 +1,2 @@
Principaux changements pour cette version : modification des permissions dans les salons, thème lumineux/sombre automatique, et plein de corrections de bugs.
Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.0.14

View File

@@ -0,0 +1,2 @@
Principaux changements pour cette version : prise en charge de lauthentification avec les réseaux sociaux.
Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.0.15

View File

@@ -0,0 +1,2 @@
Principaux changements pour cette version : prise en charge de lauthentification avec les réseaux sociaux !
Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.0.15 et https://github.com/vector-im/element-android/releases/tag/v1.0.16

View File

@@ -0,0 +1,2 @@
Principaux changements pour cette version : corrections de bugs !
Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1..017

View File

@@ -0,0 +1,2 @@
Principaux changements pour cette version : améliorations de la VoIP (appels audio et vidéo dans les conversations primées) et corrections de bugs !
Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.1.0

View File

@@ -0,0 +1,2 @@
Principaux changements pour cette version : amélioration des performances et corrections de bugs !
Intégralité des changements : https://github.com/vector-im/element-android/releases/tag/v1.1.1

View File

@@ -0,0 +1 @@
Element (Riot.im roimhe sin)

View File

@@ -0,0 +1,2 @@
Modifiche principali in questa versione: migliorato il VoIP (chiamate audio e video in MD) e correzione di errori!
Cronologia completa: https://github.com/vector-im/element-android/releases/tag/v1.1.0

View File

@@ -0,0 +1,2 @@
Modifiche principali in questa versione: prestazioni migliorate e correzione di errori!
Cronologia completa: https://github.com/vector-im/element-android/releases/tag/v1.1.1

View File

@@ -1 +1 @@
Adiwenni aɣellsan ur nelli aslammas & VoIP. Ḥrez isefra-k•m seg tama tis tlata.
Adiwenni aɣellsan ur nelli d aslammas & VoIP. Ḥrez isefra-k•m seg wis tlata.

View File

@@ -0,0 +1,2 @@
Principais mudanças nesta versão: Melhoria de VoIP (chamadas de áudio e vídeo em conversas) e correção de erros!
Registro de alterações completo: https://github.com/vector-im/element-android/releases/tag/v1.1.0

View File

@@ -0,0 +1,2 @@
Principais mudanças nesta versão: melhoria de desempenho e correção de erros!
Registro de alterações completo: https://github.com/vector-im/element-android/releases/tag/v1.1.1

View File

@@ -0,0 +1,2 @@
Основные изменения в этой версии: VoIP (аудио и видео звонки в ЛС) Улучшение и исправления ошибок!
Полный список изменений: https://github.com/vector-im/element-android/release/tag/v1.1.0

View File

@@ -0,0 +1,2 @@
Основные изменения в этой версии: улучшение производительности и исправления ошибок!
Полный список изменений: https://github.com/vector-im/element-android/release/tag/v1.1.1

View File

@@ -0,0 +1,2 @@
Huvudsakliga ändringar i den här versionen: Förbättringar och buggfixar!
Full ändringslogg: https://github.com/vector-im/element-android/releases/tag/v1.1.1

View File

@@ -0,0 +1,2 @@
Bu sürümdeki başlıca değişiklikler: Oda izinlerini düzenleme, otomatik koyu/açık tema ve bir avuç hata düzeltmeleri.
Değişim günlüğünün tamamı: https://github.com/vector-im/element-android/releases/tag/v1.0.14

View File

@@ -0,0 +1,2 @@
Bu sürümdeki başlıca değişiklikler: Hata düzeltmeleri!
değişim günlüğünün tamamı: https://github.com/vector-im/element-android/releases/tag/v1.0.17

View File

@@ -0,0 +1,2 @@
Bu sürümdeki ana değişiklikler: VoIP (DM'de sesli ve görüntülü aramalar) geliştirmeleri ve hata düzeltmeleri!
Değişim günlüğünün tamamı: https://github.com/vector-im/element-android/releases/tag/v1.1.0

View File

@@ -0,0 +1,2 @@
Bu sürümdeki ana değişiklikler: performans iyileştirme ve hata düzeltmeleri!
Değişim günlüğünün tamamı: https://github.com/vector-im/element-android/releases/tag/v1.1.1

View File

@@ -0,0 +1,2 @@
Основні зміни в цій версії: поліпшення продуктивності та виправлення помилок!
Повний журнал змін: https://github.com/vector-im/element-android/releases/tag/v1.1.1

View File

@@ -1,2 +1,2 @@
此新版本主要包含错误修复和改进。现在,发送消息要快得多
此新版本主要包含错误修复和改进。现在,发送消息比以前快多了
完整更新日志https://github.com/vector-im/element-android/releases/tag/v1.0.10

View File

@@ -0,0 +1,2 @@
此版本的主要变化:链接预览,全新 Emoji 键盘,全新聊天室设置功能,以及圣诞节雪花!
完整更新日志https://github.com/vector-im/element-android/releases/tag/v1.0.12

View File

@@ -0,0 +1,2 @@
此版本的主要变化:链接预览,全新 Emoji 键盘,全新聊天室设置功能,以及圣诞节雪花!
完整更新日志https://github.com/vector-im/element-android/releases/tag/v1.0.13

View File

@@ -0,0 +1,2 @@
此版本的主要变化:支持编辑聊天室权限,自动切换浅色/深色主题,修复大量错误。
完整更新日志https://github.com/vector-im/element-android/releases/tag/v1.0.14

View File

@@ -0,0 +1,2 @@
此版本的主要变化:支持通过社交网络登录。
完整更新日志https://github.com/vector-im/element-android/releases/tag/v1.0.15

View File

@@ -0,0 +1,2 @@
此版本的主要变化:支持通过社交网络登录。
完整更新日志https://github.com/vector-im/element-android/releases/tag/v1.0.15 和 https://github.com/vector-im/element-android/releases/tag/v1.0.16

View File

@@ -0,0 +1,2 @@
此版本的主要变化:修复错误!
完整更新日志https://github.com/vector-im/element-android/releases/tag/v1.0.17

View File

@@ -0,0 +1,2 @@
此版本的主要变化:改进 VoIP私聊中的音频与视频通话以及修复错误
完整更新日志https://github.com/vector-im/element-android/releases/tag/v1.1.0

View File

@@ -0,0 +1,2 @@
此版本的主要变化:改进性能以及修复错误!
完整更新日志https://github.com/vector-im/element-android/releases/tag/v1.1.1

View File

@@ -1,30 +1,30 @@
Element 是一种新型消息和协作应用:
Element 是一种新型的通讯与协作应用:
1. 使您可以掌控您的隐私
2. 使您与 Matrix 网络中的任何人交流,甚至可以通过与其他应用如 Slack 集成
3. 保护您远离广告,数据挖掘和围墙花园
4. 通过端到端加密保护您,通过交叉签名验证其他人
2. 使您与 Matrix 网络中的任何人交流,甚至可以通过集成功能与如 Slack 之类的其他应用通讯
3. 保护您免受广告,数据挖掘和封闭服务的侵害
4. 通过端到端加密保证安全,通过交叉签名验证其他人
Element 与其他消息和协作应用完全不同,因为它是去中心化且开源的。
Element 与其他通讯与协作应用完全不同,因为它是去中心化且开源的。
Element 使您可以自托管 - 或选择托管商 - 因此您拥有您的数据和会话的隐私权,所有权和控制权。它使您可以访问开放网络;因此您可以不仅仅与其他 Element 用户交流。并且它非常安全。
Element 允许您自托管——或者选择托管商——因此,您能拥有数据和会话的隐私权,所有权和控制权。它允许您访问开放网络;因此您可以 Element 用户以外的人交流。并且它非常安全。
Element 可以做到这些因为它在 Matrix 上运行 - 开放,去中心化通标准。
Element 之所以可以做到这些,是因为它在 Matrix 上运行——开放,去中心化通讯的标准。
Element 通过让您选择谁来托管您的会话使您掌控一切。在 Element 应用中,您可以选择不同的托管方式:
通过让您选择谁来托管您的会话Element 让您掌控一切。在 Element 应用中,您可以选择不同的托管方式:
1. 在由 Matrix 开发者托管的 matrix.org 公共服务器上获取免费帐户,或从志愿者托管的千个公共服务器中选择
2. 在您自己的硬件上运行服务器自托管您的会话
3. 通过简单地订阅 Element Matrix Services 托管平台在自定义服务器上注册账户
1. 在由 Matrix 开发者托管的 matrix.org 公共服务器上获取免费帐户,或从志愿者托管的千个公共服务器中选择
2. 在您自己的硬件上运行服务器自托管您的会话
3. 通过订阅 Element Matrix Services 托管平台,简单地在自定义服务器上注册账户
<b>为什么选择 Element</b>
<b>拥有您的数据</b>:您来决定存放您的数据和消息的位置。拥有并控制它的是您,而不是挖掘您的数据或与第三方分享的巨型企业。
<b>掌控您的数据</b>:您来决定存放您的数据和消息的位置。拥有并控制它的是您,而不是挖掘您的数据或与第三方分享的巨型企业。
<b>开放消息与协作</b>:您可以与 Matrix 网络中的任何人聊天,不论他们使用 Element 还是其他 Matrix 应用,甚至即使他们在使用不同的消息系统例如 SlackIRC 或 XMPP。
<b>开放通讯与协作</b>:您可以与 Matrix 网络中的任何人聊天,不论他们使用 Element 还是其他 Matrix 应用,甚至/即使他们在使用不同的通讯系统例如 SlackIRC 或 XMPP。
<b>超级安全</b>:真正的端到端加密(仅有会话中的人可以解密消息),及用于验证会话参与方的设备的交叉签名。
<b>超级安全</b>支持真正的端到端加密(仅有会话中的人可以解密消息),还有能够验证会话参与方的设备的交叉签名。
<b>丰富的通方式</b>:消息,语音和视频通话,文件享,屏幕享和大量集成,机器人和小件。建立房间社区,保持联系并做好工作。
<b>完善的通方式</b>:消息,语音和视频通话,文件享,屏幕享和大量集成功能,机器人和小件。建立房间社区,保持联系并完成工作。
<b>随时随地</b>通过在您的全部设备和 https://app.element.io 网页完全同步的消息历史,无论您在哪里都可以保持联系。
<b>随时随地</b>消息历史可在您的全部设备和 https://app.element.io 网页端之间完全同步,无论您在哪里都可以保持联系。

View File

@@ -1 +1 @@
安全去中心化的聊天 VoIP。保护您的数据不第三方的影响
安全去中心化的聊天 VoIP 通话。保护您的数据不第三方窃取

View File

@@ -0,0 +1,2 @@
此版本的主要變更:效能改進與錯誤修復!
完整變更紀錄https://github.com/vector-im/element-android/releases/tag/v1.1.1

View File

@@ -21,6 +21,7 @@ import io.reactivex.Completable
import io.reactivex.Observable
import io.reactivex.Single
import kotlinx.coroutines.rx2.rxCompletable
import kotlinx.coroutines.rx2.rxSingle
import org.matrix.android.sdk.api.query.QueryStringValue
import org.matrix.android.sdk.api.session.events.model.Event
import org.matrix.android.sdk.api.session.identity.ThreePid
@@ -90,13 +91,13 @@ class RxRoom(private val room: Room) {
return room.getMyReadReceiptLive().asObservable()
}
fun loadRoomMembersIfNeeded(): Single<Unit> = singleBuilder {
room.loadRoomMembersIfNeeded(it)
fun loadRoomMembersIfNeeded(): Single<Unit> = rxSingle {
room.loadRoomMembersIfNeeded()
}
fun joinRoom(reason: String? = null,
viaServers: List<String> = emptyList()): Single<Unit> = singleBuilder {
room.join(reason, viaServers, it)
viaServers: List<String> = emptyList()): Single<Unit> = rxSingle {
room.join(reason, viaServers)
}
fun liveEventReadReceipts(eventId: String): Observable<List<ReadReceipt>> {
@@ -114,12 +115,12 @@ class RxRoom(private val room: Room) {
return room.getLiveRoomNotificationState().asObservable()
}
fun invite(userId: String, reason: String? = null): Completable = completableBuilder<Unit> {
room.invite(userId, reason, it)
fun invite(userId: String, reason: String? = null): Completable = rxCompletable {
room.invite(userId, reason)
}
fun invite3pid(threePid: ThreePid): Completable = completableBuilder<Unit> {
room.invite3pid(threePid, it)
fun invite3pid(threePid: ThreePid): Completable = rxCompletable {
room.invite3pid(threePid)
}
fun updateTopic(topic: String): Completable = rxCompletable {

View File

@@ -20,6 +20,7 @@ import androidx.paging.PagedList
import io.reactivex.Observable
import io.reactivex.Single
import io.reactivex.functions.Function3
import kotlinx.coroutines.rx2.rxSingle
import org.matrix.android.sdk.api.extensions.orFalse
import org.matrix.android.sdk.api.query.QueryStringValue
import org.matrix.android.sdk.api.session.Session
@@ -129,8 +130,8 @@ class RxSession(private val session: Session) {
fun searchUsersDirectory(search: String,
limit: Int,
excludedUserIds: Set<String>): Single<List<User>> = singleBuilder {
session.searchUsersDirectory(search, limit, excludedUserIds, it)
excludedUserIds: Set<String>): Single<List<User>> = rxSingle {
session.searchUsersDirectory(search, limit, excludedUserIds)
}
fun joinRoom(roomIdOrAlias: String,
@@ -144,8 +145,8 @@ class RxSession(private val session: Session) {
session.getRoomIdByAlias(roomAlias, searchOnServer, it)
}
fun getProfileInfo(userId: String): Single<JsonDict> = singleBuilder {
session.getProfile(userId, it)
fun getProfileInfo(userId: String): Single<JsonDict> = rxSingle {
session.getProfile(userId)
}
fun liveUserCryptoDevices(userId: String): Observable<List<CryptoDeviceInfo>> {

View File

@@ -6,9 +6,12 @@ apply plugin: 'realm-android'
buildscript {
repositories {
// mavenCentral()
//noinspection GrDeprecatedAPIUsage
jcenter()
}
dependencies {
// Stick to this version until https://github.com/realm/realm-java/issues/7402 is fixed
classpath "io.realm:realm-gradle-plugin:10.3.1"
}
}
@@ -108,7 +111,7 @@ static def gitRevisionDate() {
dependencies {
def arrow_version = "0.8.2"
def moshi_version = '1.11.0'
def moshi_version = '1.12.0'
def lifecycle_version = '2.2.0'
def arch_version = '2.1.0'
def markwon_version = '3.1.0'
@@ -163,16 +166,16 @@ dependencies {
// Logging
implementation 'com.jakewharton.timber:timber:4.7.1'
implementation 'com.facebook.stetho:stetho-okhttp3:1.5.1'
implementation 'com.facebook.stetho:stetho-okhttp3:1.6.0'
// Phone number https://github.com/google/libphonenumber
implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.19'
implementation 'com.googlecode.libphonenumber:libphonenumber:8.12.21'
testImplementation 'junit:junit:4.13.2'
testImplementation 'org.robolectric:robolectric:4.5.1'
//testImplementation 'org.robolectric:shadows-support-v4:3.0'
// Note: version sticks to 1.9.2 due to https://github.com/mockk/mockk/issues/281
testImplementation 'io.mockk:mockk:1.10.6'
testImplementation 'io.mockk:mockk:1.11.0'
testImplementation 'org.amshove.kluent:kluent-android:1.65'
testImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_version"
// Plant Timber tree for test
@@ -185,8 +188,7 @@ dependencies {
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation 'org.amshove.kluent:kluent-android:1.61'
// Note: version sticks to 1.9.2 due to https://github.com/mockk/mockk/issues/281
androidTestImplementation 'io.mockk:mockk-android:1.10.6'
androidTestImplementation 'io.mockk:mockk-android:1.11.0'
androidTestImplementation "androidx.arch.core:core-testing:$arch_version"
androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$kotlin_coroutines_version"
// Plant Timber tree for test

View File

@@ -20,7 +20,6 @@ import android.content.Context
import androidx.test.core.app.ApplicationProvider
import org.matrix.android.sdk.test.shared.createTimberTestRule
import org.junit.Rule
import java.io.File
interface InstrumentedTest {
@@ -30,8 +29,4 @@ interface InstrumentedTest {
fun context(): Context {
return ApplicationProvider.getApplicationContext()
}
fun cacheDir(): File {
return context().cacheDir
}
}

View File

@@ -27,9 +27,12 @@ import org.matrix.android.sdk.BuildConfig
import org.matrix.android.sdk.api.auth.AuthenticationService
import org.matrix.android.sdk.api.auth.HomeServerHistoryService
import org.matrix.android.sdk.api.legacy.LegacySessionImporter
import org.matrix.android.sdk.api.network.ApiInterceptorListener
import org.matrix.android.sdk.api.network.ApiPath
import org.matrix.android.sdk.api.raw.RawService
import org.matrix.android.sdk.common.DaggerTestMatrixComponent
import org.matrix.android.sdk.internal.SessionManager
import org.matrix.android.sdk.internal.network.ApiInterceptor
import org.matrix.android.sdk.internal.network.UserAgentHolder
import org.matrix.android.sdk.internal.util.BackgroundDetectionObserver
import org.matrix.olm.OlmManager
@@ -51,6 +54,7 @@ class Matrix private constructor(context: Context, matrixConfiguration: MatrixCo
@Inject internal lateinit var olmManager: OlmManager
@Inject internal lateinit var sessionManager: SessionManager
@Inject internal lateinit var homeServerHistoryService: HomeServerHistoryService
@Inject internal lateinit var apiInterceptor: ApiInterceptor
private val uiHandler = Handler(Looper.getMainLooper())
@@ -79,6 +83,14 @@ class Matrix private constructor(context: Context, matrixConfiguration: MatrixCo
return legacySessionImporter
}
fun registerApiInterceptorListener(path: ApiPath, listener: ApiInterceptorListener) {
apiInterceptor.addListener(path, listener)
}
fun unregisterApiInterceptorListener(path: ApiPath, listener: ApiInterceptorListener) {
apiInterceptor.removeListener(path, listener)
}
companion object {
private lateinit var instance: Matrix

View File

@@ -0,0 +1,58 @@
/*
* Copyright (c) 2021 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.network
import org.amshove.kluent.shouldBeEqualTo
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.common.CommonTestHelper
import org.matrix.android.sdk.common.SessionTestParams
import org.matrix.android.sdk.common.TestConstants
import timber.log.Timber
@RunWith(JUnit4::class)
@FixMethodOrder(MethodSorters.JVM)
class ApiInterceptorTest : InstrumentedTest {
private val commonTestHelper = CommonTestHelper(context())
@Test
fun apiInterceptorTest() {
val responses = mutableListOf<String>()
val listener = object : ApiInterceptorListener {
override fun onApiResponse(path: ApiPath, response: String) {
Timber.w("onApiResponse($path): $response")
responses.add(response)
}
}
commonTestHelper.matrix.registerApiInterceptorListener(ApiPath.REGISTER, listener)
val session = commonTestHelper.createAccount(TestConstants.USER_ALICE, SessionTestParams(withInitialSync = true))
commonTestHelper.signOutAndClose(session)
commonTestHelper.matrix.unregisterApiInterceptorListener(ApiPath.REGISTER, listener)
responses.size shouldBeEqualTo 2
}
}

View File

@@ -112,8 +112,8 @@ class CryptoTestHelper(private val mTestHelper: CommonTestHelper) {
bobRoomSummariesLive.observeForever(newRoomObserver)
}
mTestHelper.doSync<Unit> {
aliceRoom.invite(bobSession.myUserId, callback = it)
mTestHelper.runBlockingTest {
aliceRoom.invite(bobSession.myUserId)
}
mTestHelper.await(lock1)
@@ -172,8 +172,8 @@ class CryptoTestHelper(private val mTestHelper: CommonTestHelper) {
fun createSamAccountAndInviteToTheRoom(room: Room): Session {
val samSession = mTestHelper.createAccount(TestConstants.USER_SAM, defaultSessionParams)
mTestHelper.doSync<Unit> {
room.invite(samSession.myUserId, null, it)
mTestHelper.runBlockingTest {
room.invite(samSession.myUserId, null)
}
mTestHelper.doSync<Unit> {
@@ -337,8 +337,7 @@ class CryptoTestHelper(private val mTestHelper: CommonTestHelper) {
requestID,
roomId,
bob.myUserId,
bob.sessionParams.credentials.deviceId!!,
null)
bob.sessionParams.credentials.deviceId!!)
// we should reach SHOW SAS on both
var alicePovTx: OutgoingSasVerificationTransaction? = null
@@ -411,7 +410,7 @@ class CryptoTestHelper(private val mTestHelper: CommonTestHelper) {
val sessions = mutableListOf(aliceSession)
for (index in 1 until numberOfMembers) {
val session = mTestHelper.createAccount("User_$index", defaultSessionParams)
mTestHelper.doSync<Unit>(timeout = 600_000) { room.invite(session.myUserId, null, it) }
mTestHelper.runBlockingTest(timeout = 600_000) { room.invite(session.myUserId, null) }
println("TEST -> " + session.myUserId + " invited")
mTestHelper.doSync<Unit> { session.joinRoom(room.roomId, null, emptyList(), it) }
println("TEST -> " + session.myUserId + " joined")

View File

@@ -18,23 +18,26 @@ package org.matrix.android.sdk.common
import org.matrix.android.sdk.api.RoomDisplayNameFallbackProvider
class TestRoomDisplayNameFallbackProvider() : RoomDisplayNameFallbackProvider {
class TestRoomDisplayNameFallbackProvider : RoomDisplayNameFallbackProvider {
override fun getNameForRoomInvite() =
"Room invite"
override fun getNameForEmptyRoom() =
override fun getNameForEmptyRoom(isDirect: Boolean, leftMemberNames: List<String>) =
"Empty room"
override fun getNameFor2members(name1: String?, name2: String?) =
override fun getNameFor1member(name: String) =
name
override fun getNameFor2members(name1: String, name2: String) =
"$name1 and $name2"
override fun getNameFor3members(name1: String?, name2: String?, name3: String?) =
override fun getNameFor3members(name1: String, name2: String, name3: String) =
"$name1, $name2 and $name3"
override fun getNameFor4members(name1: String?, name2: String?, name3: String?, name4: String?) =
override fun getNameFor4members(name1: String, name2: String, name3: String, name4: String) =
"$name1, $name2, $name3 and $name4"
override fun getNameFor4membersAndMore(name1: String?, name2: String?, name3: String?, remainingCount: Int) =
override fun getNameFor4membersAndMore(name1: String, name2: String, name3: String, remainingCount: Int) =
"$name1, $name2, $name3 and $remainingCount others"
}

View File

@@ -367,8 +367,8 @@ class KeyShareTests : InstrumentedTest {
}
// Let alice invite bob
mTestHelper.doSync<Unit> {
roomAlicePov.invite(bobSession.myUserId, null, it)
mTestHelper.runBlockingTest {
roomAlicePov.invite(bobSession.myUserId, null)
}
mTestHelper.doSync<Unit> {

View File

@@ -19,7 +19,6 @@ package org.matrix.android.sdk.internal.crypto.ssss
import androidx.lifecycle.Observer
import androidx.test.ext.junit.runners.AndroidJUnit4
import org.matrix.android.sdk.InstrumentedTest
import org.matrix.android.sdk.api.MatrixCallback
import org.matrix.android.sdk.api.session.Session
import org.matrix.android.sdk.api.session.securestorage.EncryptedSecretContent
import org.matrix.android.sdk.api.session.securestorage.KeySigner
@@ -31,7 +30,6 @@ import org.matrix.android.sdk.api.util.Optional
import org.matrix.android.sdk.common.CommonTestHelper
import org.matrix.android.sdk.common.SessionTestParams
import org.matrix.android.sdk.common.TestConstants
import org.matrix.android.sdk.common.TestMatrixCallback
import org.matrix.android.sdk.internal.crypto.SSSS_ALGORITHM_AES_HMAC_SHA2
import org.matrix.android.sdk.internal.crypto.crosssigning.toBase64NoPadding
import org.matrix.android.sdk.internal.crypto.secrets.DefaultSharedSecretStorageService
@@ -40,7 +38,6 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.GlobalScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.runBlocking
import org.amshove.kluent.shouldBe
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
@@ -70,8 +67,8 @@ class QuadSTests : InstrumentedTest {
val TEST_KEY_ID = "my.test.Key"
mTestHelper.doSync<SsssKeyCreationInfo> {
quadS.generateKey(TEST_KEY_ID, null, "Test Key", emptyKeySigner, it)
mTestHelper.runBlockingTest {
quadS.generateKey(TEST_KEY_ID, null, "Test Key", emptyKeySigner)
}
// Assert Account data is updated
@@ -99,7 +96,9 @@ class QuadSTests : InstrumentedTest {
assertNull("Key was not generated from passphrase", parsed.passphrase)
// Set as default key
quadS.setDefaultKey(TEST_KEY_ID, object : MatrixCallback<Unit> {})
GlobalScope.launch {
quadS.setDefaultKey(TEST_KEY_ID)
}
var defaultKeyAccountData: UserAccountDataEvent? = null
val defaultDataLock = CountDownLatch(1)
@@ -133,12 +132,11 @@ class QuadSTests : InstrumentedTest {
// Store a secret
val clearSecret = "42".toByteArray().toBase64NoPadding()
mTestHelper.doSync<Unit> {
mTestHelper.runBlockingTest {
aliceSession.sharedSecretStorageService.storeSecret(
"secret.of.life",
clearSecret,
listOf(SharedSecretStorageService.KeyRef(null, keySpec)), // default key
it
listOf(SharedSecretStorageService.KeyRef(null, keySpec)) // default key
)
}
@@ -155,12 +153,11 @@ class QuadSTests : InstrumentedTest {
// Try to decrypt??
val decryptedSecret = mTestHelper.doSync<String> {
val decryptedSecret = mTestHelper.runBlockingTest {
aliceSession.sharedSecretStorageService.getSecret(
"secret.of.life",
null, // default key
keySpec!!,
it
keySpec!!
)
}
@@ -176,13 +173,13 @@ class QuadSTests : InstrumentedTest {
val TEST_KEY_ID = "my.test.Key"
mTestHelper.doSync<SsssKeyCreationInfo> {
quadS.generateKey(TEST_KEY_ID, null, "Test Key", emptyKeySigner, it)
mTestHelper.runBlockingTest {
quadS.generateKey(TEST_KEY_ID, null, "Test Key", emptyKeySigner)
}
// Test that we don't need to wait for an account data sync to access directly the keyid from DB
mTestHelper.doSync<Unit> {
quadS.setDefaultKey(TEST_KEY_ID, it)
mTestHelper.runBlockingTest {
quadS.setDefaultKey(TEST_KEY_ID)
}
mTestHelper.signOutAndClose(aliceSession)
@@ -198,15 +195,14 @@ class QuadSTests : InstrumentedTest {
val mySecretText = "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
mTestHelper.doSync<Unit> {
mTestHelper.runBlockingTest {
aliceSession.sharedSecretStorageService.storeSecret(
"my.secret",
mySecretText.toByteArray().toBase64NoPadding(),
listOf(
SharedSecretStorageService.KeyRef(keyId1, RawBytesKeySpec.fromRecoveryKey(key1Info.recoveryKey)),
SharedSecretStorageService.KeyRef(keyId2, RawBytesKeySpec.fromRecoveryKey(key2Info.recoveryKey))
),
it
)
)
}
@@ -219,19 +215,17 @@ class QuadSTests : InstrumentedTest {
assertNotNull(encryptedContent?.get(keyId2))
// Assert that can decrypt with both keys
mTestHelper.doSync<String> {
mTestHelper.runBlockingTest {
aliceSession.sharedSecretStorageService.getSecret("my.secret",
keyId1,
RawBytesKeySpec.fromRecoveryKey(key1Info.recoveryKey)!!,
it
RawBytesKeySpec.fromRecoveryKey(key1Info.recoveryKey)!!
)
}
mTestHelper.doSync<String> {
mTestHelper.runBlockingTest {
aliceSession.sharedSecretStorageService.getSecret("my.secret",
keyId2,
RawBytesKeySpec.fromRecoveryKey(key2Info.recoveryKey)!!,
it
RawBytesKeySpec.fromRecoveryKey(key2Info.recoveryKey)!!
)
}
@@ -247,50 +241,34 @@ class QuadSTests : InstrumentedTest {
val mySecretText = "Lorem ipsum dolor sit amet, consectetur adipiscing elit"
mTestHelper.doSync<Unit> {
mTestHelper.runBlockingTest {
aliceSession.sharedSecretStorageService.storeSecret(
"my.secret",
mySecretText.toByteArray().toBase64NoPadding(),
listOf(SharedSecretStorageService.KeyRef(keyId1, RawBytesKeySpec.fromRecoveryKey(key1Info.recoveryKey))),
it
listOf(SharedSecretStorageService.KeyRef(keyId1, RawBytesKeySpec.fromRecoveryKey(key1Info.recoveryKey)))
)
}
val decryptCountDownLatch = CountDownLatch(1)
var error = false
aliceSession.sharedSecretStorageService.getSecret("my.secret",
keyId1,
RawBytesKeySpec.fromPassphrase(
"A bad passphrase",
key1Info.content?.passphrase?.salt ?: "",
key1Info.content?.passphrase?.iterations ?: 0,
null),
object : MatrixCallback<String> {
override fun onSuccess(data: String) {
decryptCountDownLatch.countDown()
}
override fun onFailure(failure: Throwable) {
error = true
decryptCountDownLatch.countDown()
}
}
)
mTestHelper.await(decryptCountDownLatch)
error shouldBe true
mTestHelper.runBlockingTest {
aliceSession.sharedSecretStorageService.getSecret("my.secret",
keyId1,
RawBytesKeySpec.fromPassphrase(
"A bad passphrase",
key1Info.content?.passphrase?.salt ?: "",
key1Info.content?.passphrase?.iterations ?: 0,
null)
)
}
// Now try with correct key
mTestHelper.doSync<String> {
mTestHelper.runBlockingTest {
aliceSession.sharedSecretStorageService.getSecret("my.secret",
keyId1,
RawBytesKeySpec.fromPassphrase(
passphrase,
key1Info.content?.passphrase?.salt ?: "",
key1Info.content?.passphrase?.iterations ?: 0,
null),
it
null)
)
}
@@ -321,15 +299,15 @@ class QuadSTests : InstrumentedTest {
private fun generatedSecret(session: Session, keyId: String, asDefault: Boolean = true): SsssKeyCreationInfo {
val quadS = session.sharedSecretStorageService
val creationInfo = mTestHelper.doSync<SsssKeyCreationInfo> {
quadS.generateKey(keyId, null, keyId, emptyKeySigner, it)
val creationInfo = mTestHelper.runBlockingTest {
quadS.generateKey(keyId, null, keyId, emptyKeySigner)
}
assertAccountData(session, "${DefaultSharedSecretStorageService.KEY_ID_BASE}.$keyId")
if (asDefault) {
mTestHelper.doSync<Unit> {
quadS.setDefaultKey(keyId, it)
mTestHelper.runBlockingTest {
quadS.setDefaultKey(keyId)
}
assertAccountData(session, DefaultSharedSecretStorageService.DEFAULT_KEY_ID)
}
@@ -340,21 +318,20 @@ class QuadSTests : InstrumentedTest {
private fun generatedSecretFromPassphrase(session: Session, passphrase: String, keyId: String, asDefault: Boolean = true): SsssKeyCreationInfo {
val quadS = session.sharedSecretStorageService
val creationInfo = mTestHelper.doSync<SsssKeyCreationInfo> {
val creationInfo = mTestHelper.runBlockingTest {
quadS.generateKeyWithPassphrase(
keyId,
keyId,
passphrase,
emptyKeySigner,
null,
it)
null)
}
assertAccountData(session, "${DefaultSharedSecretStorageService.KEY_ID_BASE}.$keyId")
if (asDefault) {
val setDefaultLatch = CountDownLatch(1)
quadS.setDefaultKey(keyId, TestMatrixCallback(setDefaultLatch))
mTestHelper.await(setDefaultLatch)
mTestHelper.runBlockingTest {
quadS.setDefaultKey(keyId)
}
assertAccountData(session, DefaultSharedSecretStorageService.DEFAULT_KEY_ID)
}

View File

@@ -593,16 +593,14 @@ class SASTest : InstrumentedTest {
requestID!!,
cryptoTestData.roomId,
bobSession.myUserId,
bobSession.sessionParams.deviceId!!,
null)
bobSession.sessionParams.deviceId!!)
bobVerificationService.beginKeyVerificationInDMs(
VerificationMethod.SAS,
requestID!!,
cryptoTestData.roomId,
aliceSession.myUserId,
aliceSession.sessionParams.deviceId!!,
null)
aliceSession.sessionParams.deviceId!!)
// we should reach SHOW SAS on both
var alicePovTx: SasVerificationTransaction?

View File

@@ -17,115 +17,38 @@
package org.matrix.android.sdk.session.search
import org.junit.Assert.assertTrue
import org.junit.Assert.fail
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.MatrixCallback
import org.matrix.android.sdk.api.extensions.orFalse
import org.matrix.android.sdk.api.session.events.model.toModel
import org.matrix.android.sdk.api.session.room.model.message.MessageContent
import org.matrix.android.sdk.api.session.room.timeline.TimelineSettings
import org.matrix.android.sdk.api.session.search.SearchResult
import org.matrix.android.sdk.common.CommonTestHelper
import org.matrix.android.sdk.common.CryptoTestData
import org.matrix.android.sdk.common.CryptoTestHelper
import org.matrix.android.sdk.common.TestConstants
import java.util.concurrent.CountDownLatch
import java.util.concurrent.TimeUnit
@RunWith(JUnit4::class)
@FixMethodOrder(MethodSorters.JVM)
class SearchMessagesTest : InstrumentedTest {
private val MESSAGE = "Lorem ipsum dolor sit amet"
companion object {
private const val MESSAGE = "Lorem ipsum dolor sit amet"
}
private val commonTestHelper = CommonTestHelper(context())
private val cryptoTestHelper = CryptoTestHelper(commonTestHelper)
@Test
fun sendTextMessageAndSearchPartOfItUsingSession() {
val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom(false)
val aliceSession = cryptoTestData.firstSession
val aliceRoomId = cryptoTestData.roomId
aliceSession.cryptoService().setWarnOnUnknownDevices(false)
val roomFromAlicePOV = aliceSession.getRoom(aliceRoomId)!!
val aliceTimeline = roomFromAlicePOV.createTimeline(null, TimelineSettings(10))
aliceTimeline.start()
commonTestHelper.sendTextMessage(
roomFromAlicePOV,
MESSAGE,
2)
run {
val lock = CountDownLatch(1)
val eventListener = commonTestHelper.createEventListener(lock) { snapshot ->
snapshot.count { it.root.content.toModel<MessageContent>()?.body?.startsWith(MESSAGE).orFalse() } == 2
}
aliceTimeline.addListener(eventListener)
commonTestHelper.await(lock)
val data = commonTestHelper.runBlockingTest {
aliceSession
.searchService()
.search(
searchTerm = "lore",
limit = 10,
includeProfile = true,
afterLimit = 0,
beforeLimit = 10,
orderByRecent = true,
nextBatch = null,
roomId = aliceRoomId
)
}
assertTrue(data.results?.size == 2)
assertTrue(
data.results
?.all {
(it.event.content?.get("body") as? String)?.startsWith(MESSAGE).orFalse()
}.orFalse()
)
aliceTimeline.removeAllListeners()
cryptoTestData.cleanUp(commonTestHelper)
}
aliceSession.startSync(true)
}
@Test
fun sendTextMessageAndSearchPartOfItUsingRoom() {
val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom(false)
val aliceSession = cryptoTestData.firstSession
val aliceRoomId = cryptoTestData.roomId
aliceSession.cryptoService().setWarnOnUnknownDevices(false)
val roomFromAlicePOV = aliceSession.getRoom(aliceRoomId)!!
val aliceTimeline = roomFromAlicePOV.createTimeline(null, TimelineSettings(10))
aliceTimeline.start()
commonTestHelper.sendTextMessage(
roomFromAlicePOV,
MESSAGE,
2)
run {
var lock = CountDownLatch(1)
val eventListener = commonTestHelper.createEventListener(lock) { snapshot ->
snapshot.count { it.root.content.toModel<MessageContent>()?.body?.startsWith(MESSAGE).orFalse() } == 2
}
aliceTimeline.addListener(eventListener)
commonTestHelper.await(lock)
lock = CountDownLatch(1)
roomFromAlicePOV
doTest { cryptoTestData ->
cryptoTestData.firstSession
.searchService()
.search(
searchTerm = "lore",
limit = 10,
@@ -134,32 +57,64 @@ class SearchMessagesTest : InstrumentedTest {
beforeLimit = 10,
orderByRecent = true,
nextBatch = null,
callback = object : MatrixCallback<SearchResult> {
override fun onSuccess(data: SearchResult) {
super.onSuccess(data)
assertTrue(data.results?.size == 2)
assertTrue(
data.results
?.all {
(it.event.content?.get("body") as? String)?.startsWith(MESSAGE).orFalse()
}.orFalse()
)
lock.countDown()
}
override fun onFailure(failure: Throwable) {
super.onFailure(failure)
fail(failure.localizedMessage)
lock.countDown()
}
}
roomId = cryptoTestData.roomId
)
lock.await(TestConstants.timeOutMillis, TimeUnit.MILLISECONDS)
}
}
aliceTimeline.removeAllListeners()
cryptoTestData.cleanUp(commonTestHelper)
@Test
fun sendTextMessageAndSearchPartOfItUsingRoom() {
doTest { cryptoTestData ->
cryptoTestData.firstSession
.getRoom(cryptoTestData.roomId)!!
.search(
searchTerm = "lore",
limit = 10,
includeProfile = true,
afterLimit = 0,
beforeLimit = 10,
orderByRecent = true,
nextBatch = null
)
}
}
private fun doTest(block: suspend (CryptoTestData) -> SearchResult) {
val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceInARoom(false)
val aliceSession = cryptoTestData.firstSession
val aliceRoomId = cryptoTestData.roomId
val roomFromAlicePOV = aliceSession.getRoom(aliceRoomId)!!
val aliceTimeline = roomFromAlicePOV.createTimeline(null, TimelineSettings(10))
aliceTimeline.start()
val lock = CountDownLatch(1)
val eventListener = commonTestHelper.createEventListener(lock) { snapshot ->
snapshot.count { it.root.content.toModel<MessageContent>()?.body?.startsWith(MESSAGE).orFalse() } == 2
}
aliceSession.startSync(true)
aliceTimeline.addListener(eventListener)
commonTestHelper.sendTextMessage(
roomFromAlicePOV,
MESSAGE,
2)
commonTestHelper.await(lock)
val data = commonTestHelper.runBlockingTest {
block.invoke(cryptoTestData)
}
assertTrue(data.results?.size == 2)
assertTrue(
data.results
?.all {
(it.event.content?.get("body") as? String)?.startsWith(MESSAGE).orFalse()
}.orFalse()
)
aliceTimeline.removeAllListeners()
cryptoTestData.cleanUp(commonTestHelper)
}
}

View File

@@ -25,9 +25,12 @@ import org.matrix.android.sdk.BuildConfig
import org.matrix.android.sdk.api.auth.AuthenticationService
import org.matrix.android.sdk.api.auth.HomeServerHistoryService
import org.matrix.android.sdk.api.legacy.LegacySessionImporter
import org.matrix.android.sdk.api.network.ApiInterceptorListener
import org.matrix.android.sdk.api.network.ApiPath
import org.matrix.android.sdk.api.raw.RawService
import org.matrix.android.sdk.internal.SessionManager
import org.matrix.android.sdk.internal.di.DaggerMatrixComponent
import org.matrix.android.sdk.internal.network.ApiInterceptor
import org.matrix.android.sdk.internal.network.UserAgentHolder
import org.matrix.android.sdk.internal.util.BackgroundDetectionObserver
import org.matrix.olm.OlmManager
@@ -49,6 +52,7 @@ class Matrix private constructor(context: Context, matrixConfiguration: MatrixCo
@Inject internal lateinit var olmManager: OlmManager
@Inject internal lateinit var sessionManager: SessionManager
@Inject internal lateinit var homeServerHistoryService: HomeServerHistoryService
@Inject internal lateinit var apiInterceptor: ApiInterceptor
init {
Monarchy.init(context)
@@ -73,6 +77,14 @@ class Matrix private constructor(context: Context, matrixConfiguration: MatrixCo
return legacySessionImporter
}
fun registerApiInterceptorListener(path: ApiPath, listener: ApiInterceptorListener) {
apiInterceptor.addListener(path, listener)
}
fun unregisterApiInterceptorListener(path: ApiPath, listener: ApiInterceptorListener) {
apiInterceptor.removeListener(path, listener)
}
companion object {
private lateinit var instance: Matrix

View File

@@ -18,9 +18,10 @@ package org.matrix.android.sdk.api
interface RoomDisplayNameFallbackProvider {
fun getNameForRoomInvite(): String
fun getNameForEmptyRoom(): String
fun getNameFor2members(name1: String?, name2: String?): String
fun getNameFor3members(name1: String?, name2: String?, name3: String?): String
fun getNameFor4members(name1: String?, name2: String?, name3: String?, name4: String?): String
fun getNameFor4membersAndMore(name1: String?, name2: String?, name3: String?, remainingCount: Int): String
fun getNameForEmptyRoom(isDirect: Boolean, leftMemberNames: List<String>): String
fun getNameFor1member(name: String): String
fun getNameFor2members(name1: String, name2: String): String
fun getNameFor3members(name1: String, name2: String, name3: String): String
fun getNameFor4members(name1: String, name2: String, name3: String, name4: String): String
fun getNameFor4membersAndMore(name1: String, name2: String, name3: String, remainingCount: Int): String
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2020 The Matrix.org Foundation C.I.C.
* Copyright 2021 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.
@@ -14,11 +14,11 @@
* limitations under the License.
*/
package org.matrix.android.sdk.api.util
package org.matrix.android.sdk.api.auth.registration
import org.matrix.android.sdk.api.MatrixCallback
import org.matrix.android.sdk.api.failure.Failure
/**
* Simple MatrixCallback implementation which delegate its calls to another callback
*/
open class MatrixCallbackDelegate<T>(private val callback: MatrixCallback<T>) : MatrixCallback<T> by callback
sealed class RegistrationAvailability {
object Available : RegistrationAvailability()
data class NotAvailable(val failure: Failure.ServerError) : RegistrationAvailability()
}

View File

@@ -36,6 +36,8 @@ interface RegistrationWizard {
suspend fun checkIfEmailHasBeenValidated(delayMillis: Long): RegistrationResult
suspend fun registrationAvailable(userName: String): RegistrationAvailability
val currentThreePid: String?
// True when login and password has been sent with success to the homeserver

View File

@@ -37,6 +37,18 @@ fun Throwable.shouldBeRetried(): Boolean {
|| (this is Failure.ServerError && error.code == MatrixError.M_LIMIT_EXCEEDED)
}
/**
* Get the retry delay in case of rate limit exceeded error, adding 100 ms, of defaultValue otherwise
*/
fun Throwable.getRetryDelay(defaultValue: Long): Long {
return (this as? Failure.ServerError)
?.error
?.takeIf { it.code == MatrixError.M_LIMIT_EXCEEDED }
?.retryAfterMillis
?.plus(100L)
?: defaultValue
}
fun Throwable.isInvalidPassword(): Boolean {
return this is Failure.ServerError
&& error.code == MatrixError.M_FORBIDDEN
@@ -53,13 +65,16 @@ fun Throwable.isInvalidUIAAuth(): Boolean {
* Try to convert to a RegistrationFlowResponse. Return null in the cases it's not possible
*/
fun Throwable.toRegistrationFlowResponse(): RegistrationFlowResponse? {
return if (this is Failure.OtherServerError && httpCode == 401) {
return if (this is Failure.OtherServerError
&& httpCode == HttpsURLConnection.HTTP_UNAUTHORIZED /* 401 */) {
tryOrNull {
MoshiProvider.providesMoshi()
.adapter(RegistrationFlowResponse::class.java)
.fromJson(errorBody)
}
} else if (this is Failure.ServerError && httpCode == 401 && error.code == MatrixError.M_FORBIDDEN) {
} else if (this is Failure.ServerError
&& httpCode == HttpsURLConnection.HTTP_UNAUTHORIZED /* 401 */
&& error.code == MatrixError.M_FORBIDDEN) {
// This happens when the submission for this stage was bad (like bad password)
if (error.session != null && error.flows != null) {
RegistrationFlowResponse(
@@ -75,3 +90,11 @@ fun Throwable.toRegistrationFlowResponse(): RegistrationFlowResponse? {
null
}
}
fun Throwable.isRegistrationAvailabilityError(): Boolean {
return this is Failure.ServerError
&& httpCode == HttpsURLConnection.HTTP_BAD_REQUEST /* 400 */
&& (error.code == MatrixError.M_USER_IN_USE
|| error.code == MatrixError.M_INVALID_USERNAME
|| error.code == MatrixError.M_EXCLUSIVE)
}

View File

@@ -0,0 +1,21 @@
/*
* Copyright (c) 2021 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.network
interface ApiInterceptorListener {
fun onApiResponse(path: ApiPath, response: String)
}

View File

@@ -0,0 +1,183 @@
/*
* Copyright (c) 2021 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.network
import org.matrix.android.sdk.internal.network.NetworkConstants
enum class ApiPath(val path: String, val method: String) {
// AuthApi
VERSIONS(NetworkConstants.URI_API_PREFIX_PATH_R0 + "versions", "GET"),
REGISTER(NetworkConstants.URI_API_PREFIX_PATH_R0 + "register", "POST"),
ADD_3PID(NetworkConstants.URI_API_PREFIX_PATH_R0 + "register/{threePid}/requestToken", "POST"),
LOGIN_FLOWS(NetworkConstants.URI_API_PREFIX_PATH_R0 + "login", "GET"),
LOGIN(NetworkConstants.URI_API_PREFIX_PATH_R0 + "login", "POST"),
RESET_PASSWORD(NetworkConstants.URI_API_PREFIX_PATH_R0 + "account/password/email/requestToken", "POST"),
RESET_PASSWORD_MAIL_CONFIRMED(NetworkConstants.URI_API_PREFIX_PATH_R0 + "account/password", "POST"),
// DirectoryApi
ROOM_ID_BY_ALIAS(NetworkConstants.URI_API_PREFIX_PATH_R0 + "directory/room/{roomAlias}", "GET"),
ROOM_DIRECTORY_VISIBILITY(NetworkConstants.URI_API_PREFIX_PATH_R0 + "directory/list/room/{roomId}", "GET"),
SET_ROOM_DIRECTORY_VISIBILITY(NetworkConstants.URI_API_PREFIX_PATH_R0 + "directory/list/room/{roomId}", "PUT"),
ADD_ROOM_ALIAS(NetworkConstants.URI_API_PREFIX_PATH_R0 + "directory/room/{roomAlias}", "PUT"),
DELETE_ROOM_ALIAS(NetworkConstants.URI_API_PREFIX_PATH_R0 + "directory/room/{roomAlias}", "DELETE"),
// CryptoApi
GET_DEVICES(NetworkConstants.URI_API_PREFIX_PATH_R0 + "devices", "GET"),
GET_DEVICE_INFO(NetworkConstants.URI_API_PREFIX_PATH_R0 + "devices/{deviceId}", "GET"),
UPLOAD_KEYS(NetworkConstants.URI_API_PREFIX_PATH_R0 + "keys/upload", "POST"),
DOWNLOAD_KEYS_FOR_USERS(NetworkConstants.URI_API_PREFIX_PATH_R0 + "keys/query", "POST"),
UPLOAD_SIGNING_KEYS(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "keys/device_signing/upload", "POST"),
UPLOAD_SIGNATURES(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "keys/signatures/upload", "POST"),
CLAIM_ONE_TIME_KEYS_FOR_USERS_DEVICES(NetworkConstants.URI_API_PREFIX_PATH_R0 + "keys/claim", "POST"),
SEND_TO_DEVICE(NetworkConstants.URI_API_PREFIX_PATH_R0 + "sendToDevice/{eventType}/{txnId}", "PUT"),
DELETE_DEVICE(NetworkConstants.URI_API_PREFIX_PATH_R0 + "devices/{device_id}", "DELETE"),
UPDATE_DEVICE_INFO(NetworkConstants.URI_API_PREFIX_PATH_R0 + "devices/{device_id}", "PUT"),
GET_KEY_CHANGES(NetworkConstants.URI_API_PREFIX_PATH_R0 + "keys/changes", "GET"),
// RoomKeysApi
CREATE_KEYS_BACKUP_VERSION(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/version", "POST"),
GET_KEYS_BACKUP_LAST_VERSION(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/version", "GET"),
GET_KEYS_BACKUP_VERSION(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/version/{version}", "GET"),
UPDATE_KEYS_BACKUP_VERSION(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/version/{version}", "PUT"),
STORE_ROOM_SESSION_DATA(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/keys/{roomId}/{sessionId}", "PUT"),
STORE_ROOM_SESSIONS_DATA(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/keys/{roomId}", "PUT"),
STORE_SESSIONS_DATA(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/keys", "PUT"),
GET_ROOM_SESSION_DATA(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/keys/{roomId}/{sessionId}", "GET"),
GET_ROOM_SESSIONS_DATA(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/keys/{roomId}", "GET"),
GET_SESSIONS_DATA(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/keys", "GET"),
DELETE_ROOM_SESSION_DATA(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/keys/{roomId}/{sessionId}", "DELETE"),
DELETE_ROOM_SESSIONS_DATA(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/keys/{roomId}", "DELETE"),
DELETE_SESSIONS_DATA(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/keys", "DELETE"),
DELETE_BACKUP(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "room_keys/version/{version}", "DELETE"),
// AccountApi
CHANGE_PASSWORD(NetworkConstants.URI_API_PREFIX_PATH_R0 + "account/password", "POST"),
DEACTIVATE_ACCOUNT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "account/deactivate", "POST"),
// SearchApi
SEARCH(NetworkConstants.URI_API_PREFIX_PATH_R0 + "search", "POST"),
// FederationApi
GET_FEDERATION_VERSION(NetworkConstants.URI_FEDERATION_PATH + "version", "GET"),
// VoipApi
GET_TURN_SERVER(NetworkConstants.URI_API_PREFIX_PATH_R0 + "voip/turnServer", "GET"),
// PushGatewayApi
NOTIFY_PUSH_GATEWAY(NetworkConstants.URI_PUSH_GATEWAY_PREFIX_PATH + "notify", "POST"),
// GroupApi
GET_GROUP_SUMMARY(NetworkConstants.URI_API_PREFIX_PATH_R0 + "groups/{groupId}/summary", "GET"),
GET_GROUP_ROOMS(NetworkConstants.URI_API_PREFIX_PATH_R0 + "groups/{groupId}/rooms", "GET"),
GET_GROUP_USERS(NetworkConstants.URI_API_PREFIX_PATH_R0 + "groups/{groupId}/users", "GET"),
// CapabilitiesApi
GET_CAPABILITIES(NetworkConstants.URI_API_PREFIX_PATH_R0 + "capabilities", "GET"),
GET_VERSIONS(NetworkConstants.URI_API_PREFIX_PATH_ + "versions", "GET"),
PING(NetworkConstants.URI_API_PREFIX_PATH_ + "versions", "GET"),
// IdentityApi
GET_ACCOUNT(NetworkConstants.URI_IDENTITY_PATH_V2 + "account", "GET"),
LOGOUT(NetworkConstants.URI_IDENTITY_PATH_V2 + "account/logout", "POST"),
IDENTITY_HAS_DETAILS(NetworkConstants.URI_IDENTITY_PATH_V2 + "hash_details", "GET"),
LOOKUP(NetworkConstants.URI_IDENTITY_PATH_V2 + "lookup", "POST"),
REQUEST_TOKEN_TO_BIND_EMAIL(NetworkConstants.URI_IDENTITY_PATH_V2 + "validate/email/requestToken", "POST"),
REQUEST_TOKEN_TO_BIND_MSISDN(NetworkConstants.URI_IDENTITY_PATH_V2 + "validate/msisdn/requestToken", "POST"),
SUBMIT_TOKEN(NetworkConstants.URI_IDENTITY_PATH_V2 + "validate/{medium}/submitToken", "POST"),
// FilterApi
UPLOAD_FILTER(NetworkConstants.URI_API_PREFIX_PATH_R0 + "user/{userId}/filter", "POST"),
GET_FILTER_BY_ID(NetworkConstants.URI_API_PREFIX_PATH_R0 + "user/{userId}/filter/{filterId}", "GET"),
// IndentityAuthApi
IDENTITY_REGISTER(NetworkConstants.URI_IDENTITY_PATH_V2 + "account/register", "POST"),
// MediaApi
GET_MEDIA_CONFIG(NetworkConstants.URI_API_MEDIA_PREFIX_PATH_R0 + "config", "GET"),
GET_PREVIEW_URL_DATA(NetworkConstants.URI_API_MEDIA_PREFIX_PATH_R0 + "preview_url", "GET"),
// OpenIdApi
OPEN_ID_TOKEN(NetworkConstants.URI_API_PREFIX_PATH_R0 + "user/{userId}/openid/request_token", "POST"),
// ProfileApi
GET_PROFILE(NetworkConstants.URI_API_PREFIX_PATH_R0 + "profile/{userId}", "GET"),
GET_THREE_PIDS(NetworkConstants.URI_API_PREFIX_PATH_R0 + "account/3pid", "GET"),
SET_DISPLAY_NAME(NetworkConstants.URI_API_PREFIX_PATH_R0 + "profile/{userId}/displayname", "PUT"),
SET_AVATAR_URL(NetworkConstants.URI_API_PREFIX_PATH_R0 + "profile/{userId}/avatar_url", "PUT"),
BIND_THREE_PID(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "account/3pid/bind", "POST"),
UNBIND_THREE_PID(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "account/3pid/unbind", "POST"),
ADD_EMAIL(NetworkConstants.URI_API_PREFIX_PATH_R0 + "account/3pid/email/requestToken", "POST"),
ADD_MSISDN(NetworkConstants.URI_API_PREFIX_PATH_R0 + "account/3pid/msisdn/requestToken", "POST"),
FINALIZE_ADD_THREE_PID(NetworkConstants.URI_API_PREFIX_PATH_R0 + "account/3pid/add", "POST"),
DELETE_THREE_PID(NetworkConstants.URI_API_PREFIX_PATH_R0 + "account/3pid/delete", "POST"),
// PusherRulesApi
GET_ALL_PUSHER_RULES(NetworkConstants.URI_API_PREFIX_PATH_R0 + "pushrules/", "GET"),
UPDATE_ENABLE_PUSH_RULE_STATUS(NetworkConstants.URI_API_PREFIX_PATH_R0 + "pushrules/global/{kind}/{ruleId}/enabled", "PUT"),
UPDATE_PUSH_RULE_ACTIONS(NetworkConstants.URI_API_PREFIX_PATH_R0 + "pushrules/global/{kind}/{ruleId}/actions", "PUT"),
DELETE_PUSH_RULE(NetworkConstants.URI_API_PREFIX_PATH_R0 + "pushrules/global/{kind}/{ruleId}", "DELETE"),
ADD_PUSH_RULE(NetworkConstants.URI_API_PREFIX_PATH_R0 + "pushrules/global/{kind}/{ruleId}", "PUT"),
// PusherApi
GET_PUSHERS(NetworkConstants.URI_API_PREFIX_PATH_R0 + "pushers", "GET"),
SET_PUSHER(NetworkConstants.URI_API_PREFIX_PATH_R0 + "pushers/set", "POST"),
// SignOutApi
LOGIN_AGAIN(NetworkConstants.URI_API_PREFIX_PATH_R0 + "login", "POST"),
SIGN_OUT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "logout", "POST"),
// RoomApi
GET_PUBLIC_ROOMS(NetworkConstants.URI_API_PREFIX_PATH_R0 + "publicRooms", "POST"),
CREATE_ROOM(NetworkConstants.URI_API_PREFIX_PATH_R0 + "createRoom", "POST"),
GET_ROOM_MESSAGES_FROM(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/messages", "GET"),
GET_MEMBERS(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/members", "GET"),
SEND_EVENT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/send/{eventType}/{txId}", "PUT"),
GET_CONTEXT_OF_EVENT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/context/{eventId}", "GET"),
GET_EVENT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/event/{eventId}", "GET"),
SEND_READ_MARKER(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/read_markers", "POST"),
INVITE(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/invite", "POST"),
INVITE_USING_THREE_PID(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/invite", "POST"),
SEND_STATE_EVENT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/state/{state_event_type}", "PUT"),
SEND_STATE_EVENT_WITH_STATE_KEY(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/state/{state_event_type}/{state_key}", "PUT"),
GET_ROOM_STATE(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/state", "GET"),
SEND_RELATION(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/send_relation/{parent_id}/{relation_type}/{event_type}", "POST"),
GET_RELATIONS(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "rooms/{roomId}/relations/{eventId}/{relationType}/{eventType}", "GET"),
JOIN_ROOM(NetworkConstants.URI_API_PREFIX_PATH_R0 + "join/{roomIdOrAlias}", "POST"),
LEAVE_ROOM(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/leave", "POST"),
BAN_USER(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/ban", "POST"),
UNBAN_USER(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/unban", "POST"),
KICK_USER(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/kick", "POST"),
REDACT_EVENT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/redact/{eventId}/{txnId}", "PUT"),
REPORT_CONTENT(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/report/{eventId}", "POST"),
GET_ALIASES(NetworkConstants.URI_API_PREFIX_PATH_UNSTABLE + "org.matrix.msc2432/rooms/{roomId}/aliases", "GET"),
SEND_TYPING_STATE(NetworkConstants.URI_API_PREFIX_PATH_R0 + "rooms/{roomId}/typing/{userId}", "PUT"),
PUT_TAG(NetworkConstants.URI_API_PREFIX_PATH_R0 + "user/{userId}/rooms/{roomId}/tags/{tag}", "PUT"),
DELETE_TAG(NetworkConstants.URI_API_PREFIX_PATH_R0 + "user/{userId}/rooms/{roomId}/tags/{tag}", "DELETE"),
// SyncApi
SYNC(NetworkConstants.URI_API_PREFIX_PATH_R0 + "sync", "GET"),
// ThirdPartyApi
THIRD_PARTY_PROTOCOLS(NetworkConstants.URI_API_PREFIX_PATH_R0 + "thirdparty/protocols", "GET"),
THIRD_PARTY_USER(NetworkConstants.URI_API_PREFIX_PATH_R0 + "thirdparty/protocols/user/{protocol}", "GET"),
// SearchUserApi
SEARCH_USERS(NetworkConstants.URI_API_PREFIX_PATH_R0 + "user_directory/search", "POST"),
// AccountDataApi
SET_ACCOUNT_DATA(NetworkConstants.URI_API_PREFIX_PATH_R0 + "user/{userId}/account_data/{type}", "PUT")
}

View File

@@ -39,6 +39,8 @@ interface PushRuleService {
fun removePushRuleListener(listener: PushRuleListener)
fun getActions(event: Event): List<Action>
// fun fulfilledBingRule(event: Event, rules: List<PushRule>): PushRule?
interface PushRuleListener {

View File

@@ -0,0 +1,24 @@
/*
* Copyright (c) 2021 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.query
enum class RoomCategoryFilter {
ONLY_DM,
ONLY_ROOMS,
ONLY_WITH_NOTIFICATIONS,
ALL
}

View File

@@ -0,0 +1,23 @@
/*
* Copyright 2021 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.query
data class RoomTagQueryFilter(
val isFavorite: Boolean?,
val isLowPriority: Boolean?,
val isServerNotice: Boolean?
)

View File

@@ -30,6 +30,7 @@ import org.matrix.android.sdk.api.session.call.CallSignalingService
import org.matrix.android.sdk.api.session.content.ContentUploadStateTracker
import org.matrix.android.sdk.api.session.content.ContentUrlResolver
import org.matrix.android.sdk.api.session.crypto.CryptoService
import org.matrix.android.sdk.api.session.events.EventService
import org.matrix.android.sdk.api.session.file.ContentDownloadStateTracker
import org.matrix.android.sdk.api.session.file.FileService
import org.matrix.android.sdk.api.session.group.GroupService
@@ -68,6 +69,7 @@ interface Session :
SignOutService,
FilterService,
TermsService,
EventService,
ProfileService,
PushRuleService,
PushersService,

View File

@@ -17,9 +17,7 @@
package org.matrix.android.sdk.api.session.accountdata
import androidx.lifecycle.LiveData
import org.matrix.android.sdk.api.MatrixCallback
import org.matrix.android.sdk.api.session.events.model.Content
import org.matrix.android.sdk.api.util.Cancelable
import org.matrix.android.sdk.api.util.Optional
interface AccountDataService {
@@ -48,5 +46,5 @@ interface AccountDataService {
/**
* Update the account data with the provided type and the provided account data content
*/
fun updateAccountData(type: String, content: Content, callback: MatrixCallback<Unit>? = null): Cancelable
suspend fun updateAccountData(type: String, content: Content)
}

View File

@@ -16,7 +16,6 @@
package org.matrix.android.sdk.api.session.crypto.verification
import org.matrix.android.sdk.api.MatrixCallback
import org.matrix.android.sdk.api.session.events.model.Event
import org.matrix.android.sdk.api.session.events.model.LocalEcho
@@ -79,8 +78,7 @@ interface VerificationService {
transactionId: String,
roomId: String,
otherUserId: String,
otherDeviceId: String,
callback: MatrixCallback<String>?): String?
otherDeviceId: String): String
/**
* Returns false if the request is unknown

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2020 The Matrix.org Foundation C.I.C.
* Copyright (c) 2021 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.
@@ -14,21 +14,16 @@
* limitations under the License.
*/
package org.matrix.android.sdk.internal.crypto.model
package org.matrix.android.sdk.api.session.events
import org.matrix.android.sdk.api.MatrixCallback
import org.matrix.android.sdk.api.session.events.model.Content
import org.matrix.android.sdk.api.session.events.model.Event
class MXQueuedEncryption {
interface EventService {
/**
* The data to encrypt.
* Ask the homeserver for an event content. The SDK will try to decrypt it if it is possible
* The result will not be stored into cache
*/
var eventContent: Content? = null
var eventType: String? = null
/**
* the asynchronous callback
*/
var apiCallback: MatrixCallback<Content>? = null
suspend fun getEvent(roomId: String,
eventId: String): Event
}

View File

@@ -289,3 +289,7 @@ fun Event.getRelationContent(): RelationDefaultContent? {
fun Event.isReply(): Boolean {
return getRelationContent()?.inReplyTo?.eventId != null
}
fun Event.isEdition(): Boolean {
return getRelationContent()?.takeIf { it.type == RelationType.REPLACE }?.eventId != null
}

View File

@@ -17,11 +17,9 @@
package org.matrix.android.sdk.api.session.file
import android.net.Uri
import org.matrix.android.sdk.api.MatrixCallback
import org.matrix.android.sdk.api.session.room.model.message.MessageWithAttachmentContent
import org.matrix.android.sdk.api.session.room.model.message.getFileName
import org.matrix.android.sdk.api.session.room.model.message.getFileUrl
import org.matrix.android.sdk.api.util.Cancelable
import org.matrix.android.sdk.internal.crypto.attachments.ElementToDecrypt
import org.matrix.android.sdk.internal.crypto.attachments.toElementToDecrypt
import java.io.File
@@ -41,20 +39,17 @@ interface FileService {
* Download a file.
* Result will be a decrypted file, stored in the cache folder. url parameter will be used to create unique filename to avoid name collision.
*/
fun downloadFile(fileName: String,
suspend fun downloadFile(fileName: String,
mimeType: String?,
url: String?,
elementToDecrypt: ElementToDecrypt?,
callback: MatrixCallback<File>): Cancelable
elementToDecrypt: ElementToDecrypt?): File
fun downloadFile(messageContent: MessageWithAttachmentContent,
callback: MatrixCallback<File>): Cancelable =
suspend fun downloadFile(messageContent: MessageWithAttachmentContent): File =
downloadFile(
fileName = messageContent.getFileName(),
mimeType = messageContent.mimeType,
url = messageContent.getFileUrl(),
elementToDecrypt = messageContent.encryptedFileInfo?.toElementToDecrypt(),
callback = callback
elementToDecrypt = messageContent.encryptedFileInfo?.toElementToDecrypt()
)
fun isFileInCache(mxcUrl: String?,

View File

@@ -16,9 +16,6 @@
package org.matrix.android.sdk.api.session.identity
import org.matrix.android.sdk.api.MatrixCallback
import org.matrix.android.sdk.api.util.Cancelable
/**
* Provides access to the identity server configuration and services identity server can provide
*/
@@ -40,55 +37,55 @@ interface IdentityService {
* See https://matrix.org/docs/spec/identity_service/latest#status-check
* RiotX SDK only supports identity server API v2
*/
fun isValidIdentityServer(url: String, callback: MatrixCallback<Unit>): Cancelable
suspend fun isValidIdentityServer(url: String)
/**
* Update the identity server url.
* If successful, any previous identity server will be disconnected.
* In case of error, any previous identity server will remain configured.
* @param url the new url.
* @param callback will notify the user if change is successful. The String will be the final url of the identity server.
* @return The String will be the final url of the identity server.
* The SDK can prepend "https://" for instance.
*/
fun setNewIdentityServer(url: String, callback: MatrixCallback<String>): Cancelable
suspend fun setNewIdentityServer(url: String): String
/**
* Disconnect (logout) from the current identity server
*/
fun disconnect(callback: MatrixCallback<Unit>): Cancelable
suspend fun disconnect()
/**
* This will ask the identity server to send an email or an SMS to let the user confirm he owns the ThreePid
*/
fun startBindThreePid(threePid: ThreePid, callback: MatrixCallback<Unit>): Cancelable
suspend fun startBindThreePid(threePid: ThreePid)
/**
* This will cancel a pending binding of threePid.
*/
fun cancelBindThreePid(threePid: ThreePid, callback: MatrixCallback<Unit>): Cancelable
suspend fun cancelBindThreePid(threePid: ThreePid)
/**
* This will ask the identity server to send an new email or a new SMS to let the user confirm he owns the ThreePid
*/
fun sendAgainValidationCode(threePid: ThreePid, callback: MatrixCallback<Unit>): Cancelable
suspend fun sendAgainValidationCode(threePid: ThreePid)
/**
* Submit the code that the identity server has sent to the user (in email or SMS)
* Once successful, you will have to call [finalizeBindThreePid]
* @param code the code sent to the user
*/
fun submitValidationToken(threePid: ThreePid, code: String, callback: MatrixCallback<Unit>): Cancelable
suspend fun submitValidationToken(threePid: ThreePid, code: String)
/**
* This will perform the actual association of ThreePid and Matrix account
*/
fun finalizeBindThreePid(threePid: ThreePid, callback: MatrixCallback<Unit>): Cancelable
suspend fun finalizeBindThreePid(threePid: ThreePid)
/**
* Unbind a threePid
* The request will actually be done on the homeserver
*/
fun unbindThreePid(threePid: ThreePid, callback: MatrixCallback<Unit>): Cancelable
suspend fun unbindThreePid(threePid: ThreePid)
/**
* Search MatrixId of users providing email and phone numbers
@@ -96,7 +93,7 @@ interface IdentityService {
* Application has to explicitly ask for the user consent, and the answer can be stored using [setUserConsent]
* Please see https://support.google.com/googleplay/android-developer/answer/9888076?hl=en for more details.
*/
fun lookUp(threePids: List<ThreePid>, callback: MatrixCallback<List<FoundThreePid>>): Cancelable
suspend fun lookUp(threePids: List<ThreePid>): List<FoundThreePid>
/**
* Return the current user consent for the current identity server, which has been stored using [setUserConsent].
@@ -120,9 +117,9 @@ interface IdentityService {
* A lookup will be performed, but also pending binding state will be restored
*
* @param threePids the list of threePid the user owns (retrieved form the homeserver)
* @param callback onSuccess will be called with a map of ThreePid -> SharedState
* @return a map of ThreePid -> SharedState
*/
fun getShareStatus(threePids: List<ThreePid>, callback: MatrixCallback<Map<ThreePid, SharedState>>): Cancelable
suspend fun getShareStatus(threePids: List<ThreePid>): Map<ThreePid, SharedState>
fun addListener(listener: IdentityServiceListener)
fun removeListener(listener: IdentityServiceListener)

View File

@@ -19,10 +19,8 @@ package org.matrix.android.sdk.api.session.profile
import android.net.Uri
import androidx.lifecycle.LiveData
import org.matrix.android.sdk.api.MatrixCallback
import org.matrix.android.sdk.api.auth.UserInteractiveAuthInterceptor
import org.matrix.android.sdk.api.session.identity.ThreePid
import org.matrix.android.sdk.api.util.Cancelable
import org.matrix.android.sdk.api.util.JsonDict
import org.matrix.android.sdk.api.util.Optional
@@ -41,14 +39,14 @@ interface ProfileService {
* @param userId the userId param to look for
*
*/
fun getDisplayName(userId: String, matrixCallback: MatrixCallback<Optional<String>>): Cancelable
suspend fun getDisplayName(userId: String): Optional<String>
/**
* Update the display name for this user
* @param userId the userId to update the display name of
* @param newDisplayName the new display name of the user
*/
fun setDisplayName(userId: String, newDisplayName: String, matrixCallback: MatrixCallback<Unit>): Cancelable
suspend fun setDisplayName(userId: String, newDisplayName: String)
/**
* Update the avatar for this user
@@ -56,14 +54,14 @@ interface ProfileService {
* @param newAvatarUri the new avatar uri of the user
* @param fileName the fileName of selected image
*/
fun updateAvatar(userId: String, newAvatarUri: Uri, fileName: String, matrixCallback: MatrixCallback<Unit>): Cancelable
suspend fun updateAvatar(userId: String, newAvatarUri: Uri, fileName: String)
/**
* Return the current avatarUrl for this user.
* @param userId the userId param to look for
*
*/
fun getAvatarUrl(userId: String, matrixCallback: MatrixCallback<Optional<String>>): Cancelable
suspend fun getAvatarUrl(userId: String): Optional<String>
/**
* Get the combined profile information for this user.
@@ -71,7 +69,7 @@ interface ProfileService {
* @param userId the userId param to look for
*
*/
fun getProfile(userId: String, matrixCallback: MatrixCallback<JsonDict>): Cancelable
suspend fun getProfile(userId: String): JsonDict
/**
* Get the current user 3Pids
@@ -97,28 +95,26 @@ interface ProfileService {
/**
* Add a 3Pids. This is the first step to add a ThreePid to an account. Then the threePid will be added to the pending threePid list.
*/
fun addThreePid(threePid: ThreePid, matrixCallback: MatrixCallback<Unit>): Cancelable
suspend fun addThreePid(threePid: ThreePid)
/**
* Validate a code received by text message
*/
fun submitSmsCode(threePid: ThreePid.Msisdn, code: String, matrixCallback: MatrixCallback<Unit>): Cancelable
suspend fun submitSmsCode(threePid: ThreePid.Msisdn, code: String)
/**
* Finalize adding a 3Pids. Call this method once the user has validated that he owns the ThreePid
*/
fun finalizeAddingThreePid(threePid: ThreePid,
userInteractiveAuthInterceptor: UserInteractiveAuthInterceptor,
matrixCallback: MatrixCallback<Unit>): Cancelable
suspend fun finalizeAddingThreePid(threePid: ThreePid,
userInteractiveAuthInterceptor: UserInteractiveAuthInterceptor)
/**
* Cancel adding a threepid. It will remove locally stored data about this ThreePid
*/
fun cancelAddingThreePid(threePid: ThreePid,
matrixCallback: MatrixCallback<Unit>): Cancelable
suspend fun cancelAddingThreePid(threePid: ThreePid)
/**
* Remove a 3Pid from the Matrix account.
*/
fun deleteThreePid(threePid: ThreePid, matrixCallback: MatrixCallback<Unit>): Cancelable
suspend fun deleteThreePid(threePid: ThreePid)
}

View File

@@ -16,8 +16,6 @@
package org.matrix.android.sdk.api.session.pushers
import androidx.lifecycle.LiveData
import org.matrix.android.sdk.api.MatrixCallback
import org.matrix.android.sdk.api.util.Cancelable
import java.util.UUID
interface PushersService {
@@ -75,16 +73,15 @@ interface PushersService {
* @param callback callback to know if the push gateway has accepted the request. In this case, the app should receive a Push with the provided eventId.
* In case of error, PusherRejected failure can happen. In this case it means that the pushkey is not valid.
*/
fun testPush(url: String,
appId: String,
pushkey: String,
eventId: String,
callback: MatrixCallback<Unit>): Cancelable
suspend fun testPush(url: String,
appId: String,
pushkey: String,
eventId: String)
/**
* Remove the http pusher
*/
fun removeHttpPusher(pushkey: String, appId: String, callback: MatrixCallback<Unit>): Cancelable
suspend fun removeHttpPusher(pushkey: String, appId: String)
/**
* Get the current pushers, as a LiveData

View File

@@ -17,7 +17,6 @@
package org.matrix.android.sdk.api.session.room
import androidx.lifecycle.LiveData
import org.matrix.android.sdk.api.MatrixCallback
import org.matrix.android.sdk.api.session.room.alias.AliasService
import org.matrix.android.sdk.api.session.room.call.RoomCallService
import org.matrix.android.sdk.api.session.room.crypto.RoomCryptoService
@@ -35,7 +34,6 @@ import org.matrix.android.sdk.api.session.room.timeline.TimelineService
import org.matrix.android.sdk.api.session.room.typing.TypingService
import org.matrix.android.sdk.api.session.room.uploads.UploadsService
import org.matrix.android.sdk.api.session.search.SearchResult
import org.matrix.android.sdk.api.util.Cancelable
import org.matrix.android.sdk.api.util.Optional
/**
@@ -86,12 +84,11 @@ interface Room :
* @param includeProfile requests that the server returns the historic profile information for the users that sent the events that were returned.
* @param callback Callback to get the search result
*/
fun search(searchTerm: String,
suspend fun search(searchTerm: String,
nextBatch: String?,
orderByRecent: Boolean,
limit: Int,
beforeLimit: Int,
afterLimit: Int,
includeProfile: Boolean,
callback: MatrixCallback<SearchResult>): Cancelable
includeProfile: Boolean): SearchResult
}

View File

@@ -17,6 +17,7 @@
package org.matrix.android.sdk.api.session.room
import androidx.lifecycle.LiveData
import androidx.paging.PagedList
import org.matrix.android.sdk.api.MatrixCallback
import org.matrix.android.sdk.api.session.events.model.Event
import org.matrix.android.sdk.api.session.room.members.ChangeMembershipState
@@ -24,6 +25,7 @@ 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.CreateRoomParams
import org.matrix.android.sdk.api.session.room.peeking.PeekResult
import org.matrix.android.sdk.api.session.room.summary.RoomAggregateNotificationCount
import org.matrix.android.sdk.api.util.Cancelable
import org.matrix.android.sdk.api.util.Optional
import org.matrix.android.sdk.internal.session.room.alias.RoomAliasDescription
@@ -178,4 +180,29 @@ interface RoomService {
* This call will try to gather some information on this room, but it could fail and get nothing more
*/
fun peekRoom(roomIdOrAlias: String, callback: MatrixCallback<PeekResult>)
/**
* TODO Doc
*/
fun getPagedRoomSummariesLive(queryParams: RoomSummaryQueryParams,
pagedListConfig: PagedList.Config = defaultPagedListConfig): LiveData<PagedList<RoomSummary>>
/**
* TODO Doc
*/
fun getFilteredPagedRoomSummariesLive(queryParams: RoomSummaryQueryParams,
pagedListConfig: PagedList.Config = defaultPagedListConfig): UpdatableFilterLivePageResult
/**
* TODO Doc
*/
fun getNotificationCountForRooms(queryParams: RoomSummaryQueryParams): RoomAggregateNotificationCount
private val defaultPagedListConfig
get() = PagedList.Config.Builder()
.setPageSize(10)
.setInitialLoadSizeHint(20)
.setEnablePlaceholders(false)
.setPrefetchDistance(10)
.build()
}

View File

@@ -17,6 +17,8 @@
package org.matrix.android.sdk.api.session.room
import org.matrix.android.sdk.api.query.QueryStringValue
import org.matrix.android.sdk.api.query.RoomCategoryFilter
import org.matrix.android.sdk.api.query.RoomTagQueryFilter
import org.matrix.android.sdk.api.session.room.model.Membership
fun roomSummaryQueryParams(init: (RoomSummaryQueryParams.Builder.() -> Unit) = {}): RoomSummaryQueryParams {
@@ -31,7 +33,9 @@ data class RoomSummaryQueryParams(
val roomId: QueryStringValue,
val displayName: QueryStringValue,
val canonicalAlias: QueryStringValue,
val memberships: List<Membership>
val memberships: List<Membership>,
val roomCategoryFilter: RoomCategoryFilter?,
val roomTagQueryFilter: RoomTagQueryFilter?
) {
class Builder {
@@ -40,12 +44,16 @@ data class RoomSummaryQueryParams(
var displayName: QueryStringValue = QueryStringValue.IsNotEmpty
var canonicalAlias: QueryStringValue = QueryStringValue.NoCondition
var memberships: List<Membership> = Membership.all()
var roomCategoryFilter: RoomCategoryFilter? = RoomCategoryFilter.ALL
var roomTagQueryFilter: RoomTagQueryFilter? = null
fun build() = RoomSummaryQueryParams(
roomId = roomId,
displayName = displayName,
canonicalAlias = canonicalAlias,
memberships = memberships
memberships = memberships,
roomCategoryFilter = roomCategoryFilter,
roomTagQueryFilter = roomTagQueryFilter
)
}
}

View File

@@ -1,11 +1,11 @@
/*
* Copyright 2019 New Vector Ltd
* Copyright (c) 2021 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
* 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,
@@ -14,12 +14,14 @@
* limitations under the License.
*/
package im.vector.app.features.home
package org.matrix.android.sdk.api.session.room
import im.vector.app.core.utils.BehaviorDataSource
import androidx.lifecycle.LiveData
import androidx.paging.PagedList
import org.matrix.android.sdk.api.session.room.model.RoomSummary
import javax.inject.Inject
import javax.inject.Singleton
@Singleton
class HomeRoomListDataSource @Inject constructor() : BehaviorDataSource<List<RoomSummary>>()
interface UpdatableFilterLivePageResult {
val livePagedList: LiveData<PagedList<RoomSummary>>
fun updateQuery(queryParams: RoomSummaryQueryParams)
}

View File

@@ -17,10 +17,8 @@
package org.matrix.android.sdk.api.session.room.members
import androidx.lifecycle.LiveData
import org.matrix.android.sdk.api.MatrixCallback
import org.matrix.android.sdk.api.session.identity.ThreePid
import org.matrix.android.sdk.api.session.room.model.RoomMemberSummary
import org.matrix.android.sdk.api.util.Cancelable
/**
* This interface defines methods to handling membership. It's implemented at the room level.
@@ -29,9 +27,8 @@ interface MembershipService {
/**
* This methods load all room members if it was done yet.
* @return a [Cancelable]
*/
fun loadRoomMembersIfNeeded(matrixCallback: MatrixCallback<Unit>): Cancelable
suspend fun loadRoomMembersIfNeeded()
/**
* Return the roomMember with userId or null.
@@ -60,47 +57,35 @@ interface MembershipService {
/**
* Invite a user in the room
*/
fun invite(userId: String,
reason: String? = null,
callback: MatrixCallback<Unit>): Cancelable
suspend fun invite(userId: String, reason: String? = null)
/**
* Invite a user with email or phone number in the room
*/
fun invite3pid(threePid: ThreePid,
callback: MatrixCallback<Unit>): Cancelable
suspend fun invite3pid(threePid: ThreePid)
/**
* Ban a user from the room
*/
fun ban(userId: String,
reason: String? = null,
callback: MatrixCallback<Unit>): Cancelable
suspend fun ban(userId: String, reason: String? = null)
/**
* Unban a user from the room
*/
fun unban(userId: String,
reason: String? = null,
callback: MatrixCallback<Unit>): Cancelable
suspend fun unban(userId: String, reason: String? = null)
/**
* Kick a user from the room
*/
fun kick(userId: String,
reason: String? = null,
callback: MatrixCallback<Unit>): Cancelable
suspend fun kick(userId: String, reason: String? = null)
/**
* Join the room, or accept an invitation.
*/
fun join(reason: String? = null,
viaServers: List<String> = emptyList(),
callback: MatrixCallback<Unit>): Cancelable
suspend fun join(reason: String? = null, viaServers: List<String> = emptyList())
/**
* Leave the room, or reject an invitation.
*/
fun leave(reason: String? = null,
callback: MatrixCallback<Unit>): Cancelable
suspend fun leave(reason: String? = null)
}

View File

@@ -23,24 +23,13 @@ import com.squareup.moshi.JsonClass
* Represents the membership of a user on a room
*/
@JsonClass(generateAdapter = false)
enum class Membership(val value: String) {
NONE("none"),
@Json(name = "invite")
INVITE("invite"),
@Json(name = "join")
JOIN("join"),
@Json(name = "knock")
KNOCK("knock"),
@Json(name = "leave")
LEAVE("leave"),
@Json(name = "ban")
BAN("ban");
enum class Membership {
NONE,
@Json(name = "invite") INVITE,
@Json(name = "join") JOIN,
@Json(name = "knock") KNOCK,
@Json(name = "leave") LEAVE,
@Json(name = "ban") BAN;
fun isLeft(): Boolean {
return this == KNOCK || this == LEAVE || this == BAN

Some files were not shown because too many files have changed in this diff Show More