mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Flatten out element well known data fetching
This commit is contained in:
committed by
Stefan Ceriu
parent
1a7f58711b
commit
abc731e299
@@ -55,9 +55,8 @@ extension ClientSDKMock {
|
||||
sessionReturnValue = configuration.session
|
||||
getUrlUrlClosure = { url in
|
||||
guard url.contains(".well-known/element/element.json") else { throw MockError.generic }
|
||||
if let elementWellKnown = configuration.elementWellKnown {
|
||||
guard let data = elementWellKnown.data(using: .utf8) else { fatalError() }
|
||||
return data
|
||||
if let elementWellKnownData = configuration.elementWellKnown?.data(using: .utf8) {
|
||||
return elementWellKnownData
|
||||
} else {
|
||||
throw MockError.generic
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user