Skip to content

Commit de194e0

Browse files
authored
Merge pull request #4834 from element-hq/renovate/org.matrix.rustcomponents-sdk-android-25.x
fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v25.6.6
2 parents b880a11 + 36c287a commit de194e0

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

gradle/libs.versions.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ jsoup = "org.jsoup:jsoup:1.20.1"
172172
appyx_core = { module = "com.bumble.appyx:core", version.ref = "appyx" }
173173
molecule-runtime = "app.cash.molecule:molecule-runtime:2.1.0"
174174
timber = "com.jakewharton.timber:timber:5.0.1"
175-
matrix_sdk = "org.matrix.rustcomponents:sdk-android:25.6.3"
175+
matrix_sdk = "org.matrix.rustcomponents:sdk-android:25.6.6"
176176
matrix_richtexteditor = { module = "io.element.android:wysiwyg", version.ref = "wysiwyg" }
177177
matrix_richtexteditor_compose = { module = "io.element.android:wysiwyg-compose", version.ref = "wysiwyg" }
178178
sqldelight-driver-android = { module = "app.cash.sqldelight:android-driver", version.ref = "sqldelight" }

libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/item/event/EventMessageMapper.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ import org.matrix.rustcomponents.sdk.FormattedBody as RustFormattedBody
3131
import org.matrix.rustcomponents.sdk.MessageFormat as RustMessageFormat
3232
import org.matrix.rustcomponents.sdk.MessageType as RustMessageType
3333

34+
// https://github.com/Johennes/matrix-spec-proposals/blob/johannes/msgtype-galleries/proposals/4274-inline-media-galleries.md#unstable-prefix
35+
private const val MSG_TYPE_GALLERY_UNSTABLE = "dm.filament.gallery"
36+
3437
class EventMessageMapper {
3538
private val inReplyToMapper by lazy { InReplyToMapper(TimelineEventContentMapper()) }
3639

@@ -112,6 +115,10 @@ class EventMessageMapper {
112115
is MessageType.Other -> {
113116
OtherMessageType(type.msgtype, type.body)
114117
}
118+
is MessageType.Gallery -> {
119+
// TODO expose the GalleryType.
120+
OtherMessageType(MSG_TYPE_GALLERY_UNSTABLE, type.content.body)
121+
}
115122
}
116123
}
117124

libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/timeline/reply/InReplyToMapper.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,31 @@ import io.element.android.libraries.matrix.api.core.UserId
1212
import io.element.android.libraries.matrix.api.timeline.item.event.InReplyTo
1313
import io.element.android.libraries.matrix.impl.timeline.item.event.TimelineEventContentMapper
1414
import io.element.android.libraries.matrix.impl.timeline.item.event.map
15+
import org.matrix.rustcomponents.sdk.EmbeddedEventDetails
1516
import org.matrix.rustcomponents.sdk.InReplyToDetails
16-
import org.matrix.rustcomponents.sdk.RepliedToEventDetails
1717

1818
class InReplyToMapper(
1919
private val timelineEventContentMapper: TimelineEventContentMapper,
2020
) {
2121
fun map(inReplyToDetails: InReplyToDetails): InReplyTo {
2222
val inReplyToId = EventId(inReplyToDetails.eventId())
2323
return when (val event = inReplyToDetails.event()) {
24-
is RepliedToEventDetails.Ready -> {
24+
is EmbeddedEventDetails.Ready -> {
2525
InReplyTo.Ready(
2626
eventId = inReplyToId,
2727
content = timelineEventContentMapper.map(event.content),
2828
senderId = UserId(event.sender),
2929
senderProfile = event.senderProfile.map(),
3030
)
3131
}
32-
is RepliedToEventDetails.Error -> InReplyTo.Error(
32+
is EmbeddedEventDetails.Error -> InReplyTo.Error(
3333
eventId = inReplyToId,
3434
message = event.message,
3535
)
36-
RepliedToEventDetails.Pending -> InReplyTo.Pending(
36+
EmbeddedEventDetails.Pending -> InReplyTo.Pending(
3737
eventId = inReplyToId,
3838
)
39-
is RepliedToEventDetails.Unavailable -> InReplyTo.NotLoaded(
39+
is EmbeddedEventDetails.Unavailable -> InReplyTo.NotLoaded(
4040
eventId = inReplyToId
4141
)
4242
}

0 commit comments

Comments
 (0)