parent
9a2ad3928a
commit
8860647477
30 changed files with 203 additions and 736 deletions
|
|
@ -10,7 +10,7 @@ package io.element.android.libraries.push.impl.notifications
|
|||
import dev.zacsweers.metro.AppScope
|
||||
import dev.zacsweers.metro.ContributesBinding
|
||||
import dev.zacsweers.metro.SingleIn
|
||||
import io.element.android.features.call.api.CallType
|
||||
import io.element.android.features.call.api.CallData
|
||||
import io.element.android.features.call.api.ElementCallEntryPoint
|
||||
import io.element.android.libraries.di.annotations.AppCoroutineScope
|
||||
import io.element.android.libraries.matrix.api.core.EventId
|
||||
|
|
@ -215,9 +215,9 @@ class DefaultNotificationResultProcessor(
|
|||
private suspend fun handleRingingCallEvent(notifiableEvent: NotifiableRingingCallEvent) {
|
||||
Timber.i("## handleInternal() : Incoming call.")
|
||||
elementCallEntryPoint.handleIncomingCall(
|
||||
callType = CallType.RoomCall(
|
||||
notifiableEvent.sessionId,
|
||||
notifiableEvent.roomId,
|
||||
callData = CallData(
|
||||
sessionId = notifiableEvent.sessionId,
|
||||
roomId = notifiableEvent.roomId,
|
||||
isAudioCall = notifiableEvent.callIntent == CallIntent.AUDIO
|
||||
),
|
||||
eventId = notifiableEvent.eventId,
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
package io.element.android.libraries.push.impl.notifications
|
||||
|
||||
import com.google.common.truth.Truth.assertThat
|
||||
import io.element.android.features.call.api.CallType
|
||||
import io.element.android.features.call.api.CallData
|
||||
import io.element.android.features.call.test.FakeElementCallEntryPoint
|
||||
import io.element.android.libraries.matrix.api.core.EventId
|
||||
import io.element.android.libraries.matrix.api.core.RoomId
|
||||
|
|
@ -104,7 +104,7 @@ class DefaultNotificationResultProcessorTest {
|
|||
@Test
|
||||
fun `when ringing call PushData is received, the incoming call will be handled`() = runTest {
|
||||
val handleIncomingCallLambda = lambdaRecorder<
|
||||
CallType.RoomCall,
|
||||
CallData,
|
||||
EventId,
|
||||
UserId,
|
||||
String?,
|
||||
|
|
@ -140,7 +140,7 @@ class DefaultNotificationResultProcessorTest {
|
|||
fun `when notify call PushData is received, the incoming call will be treated as a normal notification`() = runTest {
|
||||
val onNotifiableEventsReceived = lambdaRecorder<List<NotifiableEvent>, Unit> {}
|
||||
val handleIncomingCallLambda = lambdaRecorder<
|
||||
CallType.RoomCall,
|
||||
CallData,
|
||||
EventId,
|
||||
UserId,
|
||||
String?,
|
||||
|
|
@ -176,7 +176,7 @@ class DefaultNotificationResultProcessorTest {
|
|||
fun `when notify call PushData is received, the incoming call will be treated as a normal notification even if notification are disabled`() = runTest {
|
||||
val onNotifiableEventsReceived = lambdaRecorder<List<NotifiableEvent>, Unit> {}
|
||||
val handleIncomingCallLambda = lambdaRecorder<
|
||||
CallType.RoomCall,
|
||||
CallData,
|
||||
EventId,
|
||||
UserId,
|
||||
String?,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue