summaryrefslogtreecommitdiff
path: root/src/Identity.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2020-02-02 21:03:02 +0100
committerRoman Smrž <roman.smrz@seznam.cz>2020-02-03 21:21:41 +0100
commit84d7c83bc85ff0862a39d6de3bd227550175ebce (patch)
tree11a517a2efb213a5c547b8505ce58ea7ab69e64c /src/Identity.hs
parent1685c44c5592fb3043bcf6d29ddd3d7659e8346b (diff)
Direct messages in shared state
Diffstat (limited to 'src/Identity.hs')
-rw-r--r--src/Identity.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Identity.hs b/src/Identity.hs
index dcf0ca4..91bd04c 100644
--- a/src/Identity.hs
+++ b/src/Identity.hs
@@ -6,7 +6,7 @@ module Identity (
emptyIdentityData,
validateIdentity, validateIdentityF,
- loadIdentity,
+ loadIdentity, loadUnifiedIdentity,
mergeIdentity, toUnifiedIdentity, toComposedIdentity,
updateIdentity, updateOwners,
@@ -128,6 +128,9 @@ validateIdentityF mdata = do
loadIdentity :: String -> LoadRec ComposedIdentity
loadIdentity name = maybe (throwError "identity validation failed") return . validateIdentityF =<< loadRefs name
+loadUnifiedIdentity :: String -> LoadRec UnifiedIdentity
+loadUnifiedIdentity name = maybe (throwError "identity validation failed") return . validateIdentity =<< loadRef name
+
gatherPrevious :: Set (Stored (Signed IdentityData)) -> [Stored (Signed IdentityData)] -> Set (Stored (Signed IdentityData))
gatherPrevious res (n:ns) | n `S.member` res = gatherPrevious res ns