mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
call: Support voice only incoming call
This commit is contained in:
@@ -9,14 +9,12 @@
|
||||
import MatrixRustSDK
|
||||
|
||||
extension RoomProtocol {
|
||||
var joinCallIntent: Intent {
|
||||
get async {
|
||||
switch await (hasActiveRoomCall(), isDirect()) {
|
||||
case (true, true): .joinExistingDm
|
||||
case (true, false): .joinExisting
|
||||
case (false, true): .startCallDm
|
||||
case (false, false): .startCall
|
||||
}
|
||||
func joinCallIntent(voiceOnly: Bool) async -> Intent {
|
||||
switch await (hasActiveRoomCall(), isDirect()) {
|
||||
case (true, true): voiceOnly ? .joinExistingDmVoice : .joinExistingDm
|
||||
case (true, false): .joinExisting
|
||||
case (false, true): voiceOnly ? .startCallDmVoice : .startCallDm
|
||||
case (false, false): .startCall
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user