mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
EC update and improvements
Use .startCall intent, and always pass rageshakeURL to the widget Updated EC to 0.9.0-rc.4 rageshakeURL is now a parameter
This commit is contained in:
@@ -66,7 +66,11 @@ class ElementCallWidgetDriver: WidgetCapabilitiesProvider, ElementCallWidgetDriv
|
||||
self.deviceID = deviceID
|
||||
}
|
||||
|
||||
func start(baseURL: URL, clientID: String, colorScheme: ColorScheme, analyticsConfiguration: ElementCallAnalyticsConfiguration?) async -> Result<URL, ElementCallWidgetDriverError> {
|
||||
func start(baseURL: URL,
|
||||
clientID: String,
|
||||
colorScheme: ColorScheme,
|
||||
rageshakeURL: String?,
|
||||
analyticsConfiguration: ElementCallAnalyticsConfiguration?) async -> Result<URL, ElementCallWidgetDriverError> {
|
||||
guard let room = room as? Room else {
|
||||
return .failure(.roomInvalid)
|
||||
}
|
||||
@@ -85,12 +89,12 @@ class ElementCallWidgetDriver: WidgetCapabilitiesProvider, ElementCallWidgetDriv
|
||||
confineToRoom: true,
|
||||
font: nil,
|
||||
encryption: useEncryption ? .perParticipantKeys : .unencrypted,
|
||||
intent: nil,
|
||||
intent: .startCall,
|
||||
hideScreensharing: false,
|
||||
posthogUserId: nil,
|
||||
posthogApiHost: analyticsConfiguration?.posthogAPIHost,
|
||||
posthogApiKey: analyticsConfiguration?.posthogAPIKey,
|
||||
rageshakeSubmitUrl: analyticsConfiguration?.rageshakeSubmitURL,
|
||||
rageshakeSubmitUrl: rageshakeURL,
|
||||
sentryDsn: analyticsConfiguration?.sentryDSN,
|
||||
sentryEnvironment: nil))
|
||||
} catch {
|
||||
|
||||
@@ -29,7 +29,11 @@ protocol ElementCallWidgetDriverProtocol {
|
||||
var messagePublisher: PassthroughSubject<String, Never> { get }
|
||||
var actions: AnyPublisher<ElementCallWidgetDriverAction, Never> { get }
|
||||
|
||||
func start(baseURL: URL, clientID: String, colorScheme: ColorScheme, analyticsConfiguration: ElementCallAnalyticsConfiguration?) async -> Result<URL, ElementCallWidgetDriverError>
|
||||
func start(baseURL: URL,
|
||||
clientID: String,
|
||||
colorScheme: ColorScheme,
|
||||
rageshakeURL: String?,
|
||||
analyticsConfiguration: ElementCallAnalyticsConfiguration?) async -> Result<URL, ElementCallWidgetDriverError>
|
||||
|
||||
/// Passes a message from the Widget to the SDK to handle, returning a Bool that represents whether or not the widget driver is still running.
|
||||
func handleMessage(_ message: String) async -> Result<Bool, ElementCallWidgetDriverError>
|
||||
@@ -38,6 +42,5 @@ protocol ElementCallWidgetDriverProtocol {
|
||||
struct ElementCallAnalyticsConfiguration {
|
||||
let posthogAPIHost: String
|
||||
let posthogAPIKey: String
|
||||
let rageshakeSubmitURL: String
|
||||
let sentryDSN: String
|
||||
}
|
||||
|
||||
@@ -23,7 +23,11 @@ class GenericCallLinkWidgetDriver: ElementCallWidgetDriverProtocol {
|
||||
self.url = url
|
||||
}
|
||||
|
||||
func start(baseURL: URL, clientID: String, colorScheme: ColorScheme, analyticsConfiguration: ElementCallAnalyticsConfiguration?) async -> Result<URL, ElementCallWidgetDriverError> {
|
||||
func start(baseURL: URL,
|
||||
clientID: String,
|
||||
colorScheme: ColorScheme,
|
||||
rageshakeURL: String?,
|
||||
analyticsConfiguration: ElementCallAnalyticsConfiguration?) async -> Result<URL, ElementCallWidgetDriverError> {
|
||||
MXLog.error("Nothing to start, use the configuration's URL directly instead.")
|
||||
return .success(url)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user