WIP: Support using Element Call for voice calls in DMs
This commit is contained in:
parent
66c3bf267a
commit
ec420332c3
26 changed files with 122 additions and 42 deletions
|
|
@ -88,7 +88,8 @@ class RingingCallNotificationCreator(
|
|||
.setImportant(true)
|
||||
.build()
|
||||
|
||||
val answerIntent = IntentProvider.getPendingIntent(context, CallType.RoomCall(sessionId, roomId))
|
||||
// TODO
|
||||
val answerIntent = IntentProvider.getPendingIntent(context, CallType.RoomCall(sessionId, roomId, voiceIntent = false))
|
||||
val notificationData = CallNotificationData(
|
||||
sessionId = sessionId,
|
||||
roomId = roomId,
|
||||
|
|
|
|||
|
|
@ -45,8 +45,9 @@ class DeclineCallBroadcastReceiver : BroadcastReceiver() {
|
|||
callType = CallType.RoomCall(
|
||||
sessionId = notificationData.sessionId,
|
||||
roomId = notificationData.roomId,
|
||||
),
|
||||
notificationData = notificationData,
|
||||
// TODO
|
||||
voiceIntent = false
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -226,6 +226,7 @@ class CallScreenPresenter(
|
|||
sessionId = inputs.sessionId,
|
||||
roomId = inputs.roomId,
|
||||
clientId = UUID.randomUUID().toString(),
|
||||
voiceOnly = inputs.voiceIntent,
|
||||
languageTag = languageTag,
|
||||
theme = theme,
|
||||
).getOrThrow()
|
||||
|
|
|
|||
|
|
@ -112,7 +112,14 @@ class IncomingCallActivity : AppCompatActivity() {
|
|||
}
|
||||
|
||||
private fun onAnswer(notificationData: CallNotificationData) {
|
||||
elementCallEntryPoint.startCall(CallType.RoomCall(notificationData.sessionId, notificationData.roomId))
|
||||
elementCallEntryPoint.startCall(
|
||||
CallType.RoomCall(
|
||||
notificationData.sessionId,
|
||||
notificationData.roomId,
|
||||
// TODO
|
||||
voiceIntent = false
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private fun onCancel() {
|
||||
|
|
|
|||
|
|
@ -146,6 +146,8 @@ class DefaultActiveCallManager(
|
|||
callType = CallType.RoomCall(
|
||||
sessionId = notificationData.sessionId,
|
||||
roomId = notificationData.roomId,
|
||||
// TODO
|
||||
voiceIntent = false,
|
||||
),
|
||||
callState = CallState.Ringing(notificationData),
|
||||
)
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ interface CallWidgetProvider {
|
|||
suspend fun getWidget(
|
||||
sessionId: SessionId,
|
||||
roomId: RoomId,
|
||||
voiceOnly: Boolean,
|
||||
clientId: String,
|
||||
languageTag: String?,
|
||||
theme: String?,
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ class DefaultCallWidgetProvider(
|
|||
override suspend fun getWidget(
|
||||
sessionId: SessionId,
|
||||
roomId: RoomId,
|
||||
voiceOnly: Boolean,
|
||||
clientId: String,
|
||||
languageTag: String?,
|
||||
theme: String?,
|
||||
|
|
@ -50,6 +51,7 @@ class DefaultCallWidgetProvider(
|
|||
baseUrl = baseUrl,
|
||||
encrypted = isEncrypted,
|
||||
direct = room.isDm(),
|
||||
voiceOnly = voiceOnly,
|
||||
hasActiveCall = roomInfo.hasRoomCall,
|
||||
)
|
||||
val callUrl = room.generateWidgetWebViewUrl(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue