mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +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
|
sessionReturnValue = configuration.session
|
||||||
getUrlUrlClosure = { url in
|
getUrlUrlClosure = { url in
|
||||||
guard url.contains(".well-known/element/element.json") else { throw MockError.generic }
|
guard url.contains(".well-known/element/element.json") else { throw MockError.generic }
|
||||||
if let elementWellKnown = configuration.elementWellKnown {
|
if let elementWellKnownData = configuration.elementWellKnown?.data(using: .utf8) {
|
||||||
guard let data = elementWellKnown.data(using: .utf8) else { fatalError() }
|
return elementWellKnownData
|
||||||
return data
|
|
||||||
} else {
|
} else {
|
||||||
throw MockError.generic
|
throw MockError.generic
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user