When receiving DomainChanged: change or add the domain to you domain list.
This commit is contained in:
parent
ea2160b857
commit
67d0ca700f
@ -407,7 +407,10 @@ handleQuery = case _ of
|
||||
handleAction $ UpdateMyDomains (my_domains <> [ emptyDomainInfo { name = response.domain } ])
|
||||
(DNSManager.MkDomainChanged response) -> do
|
||||
{ my_domains } <- H.get
|
||||
let new_domains = map (\d -> if d.name == response.domain.name then response.domain else d) my_domains
|
||||
let replaced_domains = map (\d -> if d.name == response.domain.name then response.domain else d) my_domains
|
||||
new_domains = if A.elem response.domain replaced_domains
|
||||
then replaced_domains
|
||||
else replaced_domains <> [response.domain]
|
||||
handleAction $ UpdateMyDomains new_domains
|
||||
(DNSManager.MkDomainDeleted response) -> do
|
||||
{ my_domains } <- H.get
|
||||
|
Loading…
Reference in New Issue
Block a user