mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-01-03 05:20:12 +01:00
Merge branch 'develop' into feature/bma/widget_url_robustness
This commit is contained in:
commit
d903dfb40b
@ -9,6 +9,8 @@ Improvements 🙌:
|
|||||||
|
|
||||||
Bugfix 🐛:
|
Bugfix 🐛:
|
||||||
- Bug in WidgetContent.computeURL() (#2767)
|
- Bug in WidgetContent.computeURL() (#2767)
|
||||||
|
- Duplicate thumbs | Mobile reactions for 👍 and 👎 are not the same as web (#2776)
|
||||||
|
- Join room by alias other federation error (#2778)
|
||||||
|
|
||||||
Translations 🗣:
|
Translations 🗣:
|
||||||
-
|
-
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
package org.matrix.android.sdk.internal.session.room.peeking
|
package org.matrix.android.sdk.internal.session.room.peeking
|
||||||
|
|
||||||
import org.matrix.android.sdk.api.MatrixPatterns
|
import org.matrix.android.sdk.api.MatrixPatterns
|
||||||
|
import org.matrix.android.sdk.api.extensions.tryOrNull
|
||||||
import org.matrix.android.sdk.api.session.events.model.EventType
|
import org.matrix.android.sdk.api.session.events.model.EventType
|
||||||
import org.matrix.android.sdk.api.session.events.model.toModel
|
import org.matrix.android.sdk.api.session.events.model.toModel
|
||||||
import org.matrix.android.sdk.api.session.room.model.RoomAvatarContent
|
import org.matrix.android.sdk.api.session.room.model.RoomAvatarContent
|
||||||
@ -65,23 +66,29 @@ internal class DefaultPeekRoomTask @Inject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Is it a public room?
|
// Is it a public room?
|
||||||
val publicRepoResult = when (getRoomDirectoryVisibilityTask.execute(GetRoomDirectoryVisibilityTask.Params(roomId))) {
|
val visibilityRes = tryOrNull("## PEEK: failed to get visibility") {
|
||||||
RoomDirectoryVisibility.PRIVATE -> {
|
getRoomDirectoryVisibilityTask.execute(GetRoomDirectoryVisibilityTask.Params(roomId))
|
||||||
// We cannot resolve this room :/
|
}
|
||||||
null
|
val publicRepoResult = when (visibilityRes) {
|
||||||
}
|
RoomDirectoryVisibility.PUBLIC -> {
|
||||||
RoomDirectoryVisibility.PUBLIC -> {
|
|
||||||
// Try to find it in directory
|
// Try to find it in directory
|
||||||
val filter = if (isAlias) PublicRoomsFilter(searchTerm = params.roomIdOrAlias.substring(1))
|
val filter = if (isAlias) PublicRoomsFilter(searchTerm = params.roomIdOrAlias.substring(1))
|
||||||
else null
|
else null
|
||||||
|
|
||||||
getPublicRoomTask.execute(GetPublicRoomTask.Params(
|
tryOrNull("## PEEK: failed to GetPublicRoomTask") {
|
||||||
server = serverList.firstOrNull(),
|
getPublicRoomTask.execute(GetPublicRoomTask.Params(
|
||||||
publicRoomsParams = PublicRoomsParams(
|
server = serverList.firstOrNull(),
|
||||||
filter = filter,
|
publicRoomsParams = PublicRoomsParams(
|
||||||
limit = 20.takeIf { filter != null } ?: 100
|
filter = filter,
|
||||||
)
|
limit = 20.takeIf { filter != null } ?: 100
|
||||||
)).chunk?.firstOrNull { it.roomId == roomId }
|
)
|
||||||
|
))
|
||||||
|
}?.chunk?.firstOrNull { it.roomId == roomId }
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
|
// RoomDirectoryVisibility.PRIVATE or null
|
||||||
|
// We cannot resolve this room :/
|
||||||
|
null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -95,6 +95,6 @@ class EmojiDataSource @Inject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val quickEmojis = listOf("👍", "👎", "😄", "🎉", "😕", "❤️", "🚀", "👀")
|
val quickEmojis = listOf("\uD83D\uDC4D️", "\uD83D\uDC4E️", "😄", "🎉", "😕", "❤️", "🚀", "👀")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user