Compare commits

..

No commits in common. "425d964af52819e865842846f82086b259c700a7" and "f7837a91c831e1f62f8924f018dbbbca2a6825b0" have entirely different histories.

2 changed files with 4 additions and 21 deletions

View File

@ -35,10 +35,9 @@ import Internal.Api.Request as Request
import Internal.Api.SendMessageEvent.Api
import Internal.Api.Versions.Api
import Internal.Config.Log exposing (Log, log)
import Internal.Config.Text as Text
import Internal.Tools.Json as Json
import Internal.Values.Context as Context exposing (APIContext)
import Internal.Values.Envelope as E exposing (EnvelopeUpdate(..))
import Internal.Values.Envelope exposing (EnvelopeUpdate(..))
import Internal.Values.Room exposing (RoomUpdate(..))
import Internal.Values.Vault exposing (VaultUpdate(..))
import Task
@ -112,20 +111,7 @@ getBaseUrl c =
Nothing ->
Internal.Api.BaseUrl.Api.baseUrl
{ url = Context.fromApiFormat c |> .serverName }
|> C.catchWith
(\_ ->
let
url : String
url =
Context.fromApiFormat c
|> .serverName
in
{ contextChange = Context.setBaseUrl url
, logs = [ log.warn (Text.logs.baseUrlFailed url) ]
, messages = [ E.SetBaseUrl url ]
}
)
|> (|>) c
c
{-| Get the current timestamp

View File

@ -609,8 +609,7 @@ happened. Most of these unexpected results, are taken account of by the Elm SDK,
but logged so that the programmer can do something about it.
-}
logs :
{ baseUrlFailed : String -> String
, baseUrlFound : String -> String -> String
{ baseUrlFound : String -> String -> String
, getEventId : String -> String
, getNow : Int -> String
, httpRequest : String -> String -> String
@ -622,9 +621,7 @@ logs :
, serverReturnedUnknownJSON : String -> String
}
logs =
{ baseUrlFailed =
(++) "Failed to find .well-known, using default server address: "
, baseUrlFound =
{ baseUrlFound =
\url baseUrl ->
String.concat [ "Found baseURL of ", url, " at address ", baseUrl ]
, getEventId = (++) "Received event with id = "