feat(share): share user permalinks via to.healthchat.ch

Mention pills keep the matrix.to wire format other clients expect.
This commit is contained in:
2026-08-03 10:53:51 +02:00
committed by Sedat Qaja
parent e4ca0e6208
commit c8e444e2e0
5 changed files with 28 additions and 2 deletions
@@ -10,6 +10,8 @@ package io.element.android.libraries.matrix.impl.permalink
import dev.zacsweers.metro.AppScope
import dev.zacsweers.metro.ContributesBinding
import io.element.android.appconfig.MatrixConfiguration
import io.element.android.libraries.core.extensions.replacePrefix
import io.element.android.libraries.core.extensions.runCatchingExceptions
import io.element.android.libraries.matrix.api.core.MatrixPatterns
import io.element.android.libraries.matrix.api.core.RoomAlias
@@ -38,4 +40,13 @@ class DefaultPermalinkBuilder : PermalinkBuilder {
matrixToRoomAliasPermalink(roomAlias.value)
}
}
override fun sharePermalinkForUser(userId: UserId): Result<String> {
return permalinkForUser(userId).map { permalink ->
permalink.replacePrefix(
MatrixConfiguration.MATRIX_TO_PERMALINK_BASE_URL,
MatrixConfiguration.HEALTHCHAT_TO_PERMALINK_BASE_URL,
)
}
}
}