upload avatar within the room creation

This commit is contained in:
Florian Renaud 2023-05-11 08:32:08 +02:00
parent 17dd489e6a
commit 27f6f5cd3b
5 changed files with 44 additions and 15 deletions

View file

@ -91,6 +91,10 @@ class FakeMatrixClient(
return getProfileResults[userId] ?: Result.failure(IllegalStateException("No profile found for $userId"))
}
override suspend fun searchUsers(searchTerm: String, limit: Long): Result<MatrixSearchUserResults> {
return searchUserResults[searchTerm] ?: Result.failure(IllegalStateException("No response defined for $searchTerm"))
}
override fun startSync() = Unit
override fun stopSync() = Unit
@ -122,6 +126,10 @@ class FakeMatrixClient(
return Result.success(ByteArray(0))
}
override suspend fun uploadMedia(mimeType: String, data: ByteArray): Result<String> {
return Result.success("")
}
override fun sessionVerificationService(): SessionVerificationService = sessionVerificationService
override fun pushersService(): PushersService = pushersService
@ -134,10 +142,6 @@ class FakeMatrixClient(
return RoomMembershipObserver()
}
override suspend fun searchUsers(searchTerm: String, limit: Long): Result<MatrixSearchUserResults> {
return searchUserResults[searchTerm] ?: Result.failure(IllegalStateException("No response defined for $searchTerm"))
}
// Mocks
fun givenLogoutError(failure: Throwable?) {