remove log

This commit is contained in:
valere 2023-05-31 14:11:39 +02:00
parent 8c1938987b
commit 7e6376bf90
3 changed files with 4 additions and 8 deletions

View File

@ -27,7 +27,6 @@ import org.matrix.android.sdk.api.session.events.model.toValidDecryptedEvent
import org.matrix.android.sdk.api.session.room.model.message.MessageContent import org.matrix.android.sdk.api.session.room.model.message.MessageContent
import org.matrix.android.sdk.api.session.room.model.message.MessagePollContent import org.matrix.android.sdk.api.session.room.model.message.MessagePollContent
import org.matrix.android.sdk.internal.crypto.store.IMXCommonCryptoStore import org.matrix.android.sdk.internal.crypto.store.IMXCommonCryptoStore
import timber.log.Timber
import javax.inject.Inject import javax.inject.Inject
internal class EventEditValidator @Inject constructor(val cryptoStore: IMXCommonCryptoStore) { internal class EventEditValidator @Inject constructor(val cryptoStore: IMXCommonCryptoStore) {
@ -53,7 +52,6 @@ internal class EventEditValidator @Inject constructor(val cryptoStore: IMXCommon
* If the original event was encrypted, the replacement should be too. * If the original event was encrypted, the replacement should be too.
*/ */
fun validateEdit(originalEvent: Event?, replaceEvent: Event): EditValidity { fun validateEdit(originalEvent: Event?, replaceEvent: Event): EditValidity {
Timber.v("###REPLACE valide event $originalEvent replaced $replaceEvent")
// we might not know the original event at that time. In this case we can't perform the validation // we might not know the original event at that time. In this case we can't perform the validation
// Edits should be revalidated when the original event is received // Edits should be revalidated when the original event is received
if (originalEvent == null) { if (originalEvent == null) {

View File

@ -32,8 +32,8 @@ class DefaultGetDeviceInfoUseCaseTest {
private val getDeviceInfoUseCase = DefaultGetDeviceInfoUseCase(activeSessionHolder.instance) private val getDeviceInfoUseCase = DefaultGetDeviceInfoUseCase(activeSessionHolder.instance)
@Test @Test
fun `when execute, then get crypto device info`() { fun `when execute, then get crypto device info`() = runTest {
val result = runTest { getDeviceInfoUseCase.execute() } val result = getDeviceInfoUseCase.execute()
result shouldBeEqualTo cryptoService.cryptoDeviceInfo result shouldBeEqualTo cryptoService.cryptoDeviceInfo
} }

View File

@ -57,7 +57,7 @@ class PushersManagerTest {
) )
@Test @Test
fun `when enqueueRegisterPusher, then HttpPusher created and enqueued`() { fun `when enqueueRegisterPusher, then HttpPusher created and enqueued`() = runTest {
val pushKey = "abc" val pushKey = "abc"
val gateway = "123" val gateway = "123"
val pusherAppId = "app-id" val pusherAppId = "app-id"
@ -81,9 +81,7 @@ class PushersManagerTest {
withEventIdOnly = true, withEventIdOnly = true,
) )
runTest { pushersManager.enqueueRegisterPusher(pushKey, gateway)
pushersManager.enqueueRegisterPusher(pushKey, gateway)
}
val httpPusher = pushersService.verifyEnqueueAddHttpPusher() val httpPusher = pushersService.verifyEnqueueAddHttpPusher()
httpPusher shouldBeEqualTo expectedHttpPusher httpPusher shouldBeEqualTo expectedHttpPusher