diff options
author | Roman Smrž <roman.smrz@seznam.cz> | 2020-02-02 21:03:02 +0100 |
---|---|---|
committer | Roman Smrž <roman.smrz@seznam.cz> | 2020-02-03 21:21:41 +0100 |
commit | 84d7c83bc85ff0862a39d6de3bd227550175ebce (patch) | |
tree | 11a517a2efb213a5c547b8505ce58ea7ab69e64c /src/State.hs | |
parent | 1685c44c5592fb3043bcf6d29ddd3d7659e8346b (diff) |
Direct messages in shared state
Diffstat (limited to 'src/State.hs')
-rw-r--r-- | src/State.hs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/src/State.hs b/src/State.hs index bb7c570..15ae7d2 100644 --- a/src/State.hs +++ b/src/State.hs @@ -29,16 +29,13 @@ import qualified Data.UUID as U import System.IO import Identity -import Message import PubKey import Storage -import Storage.List import Storage.Merge data LocalState = LocalState { lsIdentity :: Stored (Signed IdentityData) , lsShared :: [Stored SharedState] - , lsMessages :: StoredList DirectMessageThread -- TODO: move to shared } data SharedState = SharedState @@ -60,12 +57,10 @@ instance Storable LocalState where store' st = storeRec $ do storeRef "id" $ lsIdentity st mapM_ (storeRef "shared") $ lsShared st - storeRef "dmsg" $ lsMessages st load' = loadRec $ LocalState <$> loadRef "id" <*> loadRefs "shared" - <*> loadRef "dmsg" instance Storable SharedState where store' st = storeRec $ do @@ -114,8 +109,6 @@ loadLocalStateHead st = loadHeadDef st "erebos" $ do , iddKeyMessage = Just devPublicMsg } - msgs <- emptySList st - shared <- wrappedStore st $ SharedState { ssPrev = [] , ssType = Just $ sharedTypeID @(Signed IdentityData) Proxy @@ -124,7 +117,6 @@ loadLocalStateHead st = loadHeadDef st "erebos" $ do return $ LocalState { lsIdentity = identity , lsShared = [shared] - , lsMessages = msgs } loadLocalIdentity :: Storage -> IO UnifiedIdentity |