Add action to copy permalink #2650

This commit is contained in:
Benoit Marty 2024-04-03 15:36:39 +02:00
parent a65e073aca
commit bf068f4f25
10 changed files with 86 additions and 0 deletions

View file

@ -84,6 +84,7 @@ class FakeMatrixRoom(
override val activeMemberCount: Long = 234L,
val notificationSettingsService: NotificationSettingsService = FakeNotificationSettingsService(),
private val matrixTimeline: MatrixTimeline = FakeMatrixTimeline(),
private var permalinkResult: () -> Result<String> = { Result.success("link") },
canRedactOwn: Boolean = false,
canRedactOther: Boolean = false,
) : MatrixRoom {
@ -273,6 +274,10 @@ class FakeMatrixRoom(
return cancelSendResult
}
override suspend fun getPermalinkFor(eventId: EventId): Result<String> {
return permalinkResult()
}
override suspend fun editMessage(
originalEventId: EventId?,
transactionId: TransactionId?,