Fix #127: Avoid requesting relationships without providing ids.
This commit is contained in:
parent
fcfa767b91
commit
50ee7646fd
@ -230,13 +230,16 @@ requestRelationships client ids =
|
||||
|
||||
loadRelationships : Maybe Client -> List Int -> Cmd Msg
|
||||
loadRelationships client ids =
|
||||
case client of
|
||||
Just client ->
|
||||
requestRelationships client ids
|
||||
|> send (MastodonEvent << AccountRelationships)
|
||||
if List.length ids > 0 then
|
||||
case client of
|
||||
Just client ->
|
||||
requestRelationships client ids
|
||||
|> send (MastodonEvent << AccountRelationships)
|
||||
|
||||
Nothing ->
|
||||
Cmd.none
|
||||
Nothing ->
|
||||
Cmd.none
|
||||
else
|
||||
Cmd.none
|
||||
|
||||
|
||||
loadThread : Maybe Client -> Status -> Cmd Msg
|
||||
|
@ -670,7 +670,7 @@ processMastodonEvent msg model =
|
||||
! [ Command.loadRelationships model.client <| List.map .id decoded ]
|
||||
|
||||
Err error ->
|
||||
{ model | errors = (errorText error) :: model.errors } ! []
|
||||
{ model | errors = (errorText (Debug.log "error" error)) :: model.errors } ! []
|
||||
|
||||
AccountFollowing result ->
|
||||
case result of
|
||||
|
Loading…
Reference in New Issue
Block a user