summaryrefslogtreecommitdiff
path: root/src/Contact.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2023-10-10 21:36:58 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2023-10-19 21:37:01 +0200
commit5b908c86320ee73f2722c85f8a47fa03ec093c6c (patch)
tree96c57bc839f9c8f50a3bba08075fdfb6ab6eaff4 /src/Contact.hs
parent61808c8cd7b30ceaf9915e72d734c4d095ff67d6 (diff)
Use extended identity data for name
Diffstat (limited to 'src/Contact.hs')
-rw-r--r--src/Contact.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Contact.hs b/src/Contact.hs
index 2d1e2a9..a232b8c 100644
--- a/src/Contact.hs
+++ b/src/Contact.hs
@@ -39,7 +39,7 @@ data Contact = Contact
data ContactData = ContactData
{ cdPrev :: [Stored ContactData]
- , cdIdentity :: [Stored (Signed IdentityData)]
+ , cdIdentity :: [Stored (Signed ExtendedIdentityData)]
, cdName :: Maybe Text
}
@@ -59,7 +59,7 @@ instance Mergeable Contact where
mergeSorted cdata = Contact
{ contactData = cdata
- , contactIdentity_ = validateIdentityF $ concat $ findProperty ((\case [] -> Nothing; xs -> Just xs) . cdIdentity) cdata
+ , contactIdentity_ = validateExtendedIdentityF $ concat $ findProperty ((\case [] -> Nothing; xs -> Just xs) . cdIdentity) cdata
, contactCustomName_ = findPropertyFirst cdName cdata
}
@@ -169,7 +169,7 @@ finalizeContact identity = updateLocalHead_ $ updateSharedState_ $ \contacts ->
st <- getStorage
cdata <- wrappedStore st ContactData
{ cdPrev = []
- , cdIdentity = idDataF $ finalOwner identity
+ , cdIdentity = idExtDataF $ finalOwner identity
, cdName = Nothing
}
storeSetAdd st (mergeSorted @Contact [cdata]) contacts