mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
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:
+11
@@ -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,
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user