Unverified Commit 525cd3ed authored by ganfra's avatar ganfra Committed by GitHub
Browse files

Merge branch 'develop' into feature/fga/fix_timeline_read_marker

parents 581847e5 711ee24c
...@@ -25,6 +25,7 @@ Bugfix 🐛: ...@@ -25,6 +25,7 @@ Bugfix 🐛:
- Sent video does not contains duration (#3272) - Sent video does not contains duration (#3272)
- Properly clean the back stack if the user cancel registration when waiting for email validation - Properly clean the back stack if the user cancel registration when waiting for email validation
- Fix read marker visibility/position when filtering some events - Fix read marker visibility/position when filtering some events
- Fix user invitation in case of restricted profile api (#3306)
Translations 🗣: Translations 🗣:
- -
...@@ -35,6 +36,7 @@ SDK API changes ⚠️: ...@@ -35,6 +36,7 @@ SDK API changes ⚠️:
Build 🧱: Build 🧱:
- Upgrade to gradle 7 - Upgrade to gradle 7
- https://github.com/Piasy/BigImageViewer is now hosted on mavenCentral() - https://github.com/Piasy/BigImageViewer is now hosted on mavenCentral()
- Upgrade Realm to version 10.4.0
Test: Test:
- -
......
...@@ -6,13 +6,10 @@ apply plugin: 'realm-android' ...@@ -6,13 +6,10 @@ apply plugin: 'realm-android'
buildscript { buildscript {
repositories { repositories {
// mavenCentral() mavenCentral()
//noinspection GrDeprecatedAPIUsage
jcenter()
} }
dependencies { dependencies {
// Stick to this version until https://github.com/realm/realm-java/issues/7402 is fixed classpath "io.realm:realm-gradle-plugin:10.4.0"
classpath "io.realm:realm-gradle-plugin:10.3.1"
} }
} }
......
...@@ -66,6 +66,7 @@ interface ProfileService { ...@@ -66,6 +66,7 @@ interface ProfileService {
/** /**
* Get the combined profile information for this user. * Get the combined profile information for this user.
* This may return keys which are not limited to displayname or avatar_url. * This may return keys which are not limited to displayname or avatar_url.
* If server is configured as limit_profile_requests_to_users_who_share_rooms: true then response can be HTTP 403.
* @param userId the userId param to look for * @param userId the userId param to look for
* *
*/ */
......
...@@ -144,10 +144,6 @@ class RealmSessionStoreMigration @Inject constructor() : RealmMigration { ...@@ -144,10 +144,6 @@ class RealmSessionStoreMigration @Inject constructor() : RealmMigration {
Timber.d("Step 7 -> 8") Timber.d("Step 7 -> 8")
val editionOfEventSchema = realm.schema.create("EditionOfEvent") val editionOfEventSchema = realm.schema.create("EditionOfEvent")
.apply {
// setEmbedded does not return `this`...
isEmbedded = true
}
.addField(EditionOfEventFields.CONTENT, String::class.java) .addField(EditionOfEventFields.CONTENT, String::class.java)
.addField(EditionOfEventFields.EVENT_ID, String::class.java) .addField(EditionOfEventFields.EVENT_ID, String::class.java)
.setRequired(EditionOfEventFields.EVENT_ID, true) .setRequired(EditionOfEventFields.EVENT_ID, true)
...@@ -162,6 +158,10 @@ class RealmSessionStoreMigration @Inject constructor() : RealmMigration { ...@@ -162,6 +158,10 @@ class RealmSessionStoreMigration @Inject constructor() : RealmMigration {
?.removeField("lastEditTs") ?.removeField("lastEditTs")
?.removeField("sourceLocalEchoEvents") ?.removeField("sourceLocalEchoEvents")
?.addRealmListField(EditAggregatedSummaryEntityFields.EDITIONS.`$`, editionOfEventSchema) ?.addRealmListField(EditAggregatedSummaryEntityFields.EDITIONS.`$`, editionOfEventSchema)
// This has to be done once a parent use the model as a child
// See https://github.com/realm/realm-java/issues/7402
editionOfEventSchema.isEmbedded = true
} }
private fun migrateTo9(realm: DynamicRealm) { private fun migrateTo9(realm: DynamicRealm) {
......
...@@ -33,6 +33,7 @@ internal interface ProfileAPI { ...@@ -33,6 +33,7 @@ internal interface ProfileAPI {
* Get the combined profile information for this user. * Get the combined profile information for this user.
* This API may be used to fetch the user's own profile information or other users; either locally or on remote homeservers. * This API may be used to fetch the user's own profile information or other users; either locally or on remote homeservers.
* This API may return keys which are not limited to displayname or avatar_url. * This API may return keys which are not limited to displayname or avatar_url.
* If server is configured as limit_profile_requests_to_users_who_share_rooms: true then response can be HTTP 403.
* @param userId the user id to fetch profile info * @param userId the user id to fetch profile info
*/ */
@GET(NetworkConstants.URI_API_PREFIX_PATH_R0 + "profile/{userId}") @GET(NetworkConstants.URI_API_PREFIX_PATH_R0 + "profile/{userId}")
......
...@@ -33,7 +33,6 @@ import org.matrix.android.sdk.api.MatrixPatterns ...@@ -33,7 +33,6 @@ import org.matrix.android.sdk.api.MatrixPatterns
import org.matrix.android.sdk.api.session.Session import org.matrix.android.sdk.api.session.Session
import org.matrix.android.sdk.api.session.profile.ProfileService import org.matrix.android.sdk.api.session.profile.ProfileService
import org.matrix.android.sdk.api.session.user.model.User import org.matrix.android.sdk.api.session.user.model.User
import org.matrix.android.sdk.api.util.Optional
import org.matrix.android.sdk.api.util.toMatrixItem import org.matrix.android.sdk.api.util.toMatrixItem
import org.matrix.android.sdk.api.util.toOptional import org.matrix.android.sdk.api.util.toOptional
import org.matrix.android.sdk.rx.rx import org.matrix.android.sdk.rx.rx
...@@ -137,7 +136,15 @@ class UserListViewModel @AssistedInject constructor(@Assisted initialState: User ...@@ -137,7 +136,15 @@ class UserListViewModel @AssistedInject constructor(@Assisted initialState: User
avatarUrl = json[ProfileService.AVATAR_URL_KEY] as? String avatarUrl = json[ProfileService.AVATAR_URL_KEY] as? String
).toOptional() ).toOptional()
} }
.onErrorReturn { Optional.empty() } .onErrorReturn {
// Profile API can be restricted and doesn't have to return result.
// In this case allow inviting valid user ids.
User(
userId = search,
displayName = null,
avatarUrl = null
).toOptional()
}
Single.zip( Single.zip(
searchObservable, searchObservable,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment