summaryrefslogtreecommitdiff
path: root/src/Message.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Message.hs')
-rw-r--r--src/Message.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Message.hs b/src/Message.hs
index 874e375..2d00de2 100644
--- a/src/Message.hs
+++ b/src/Message.hs
@@ -115,8 +115,8 @@ findMsgProperty pid sel mss = concat $ flip findProperty mss $ \x -> do
sendDirectMessage :: (MonadIO m, MonadError String m) => Head LocalState -> Peer -> Text -> m (Stored DirectMessage)
sendDirectMessage h peer text = do
- pid <- case peerIdentity peer of PeerIdentityFull pid -> return pid
- _ -> throwError "incomplete peer identity"
+ pid <- peerIdentity peer >>= \case PeerIdentityFull pid -> return pid
+ _ -> throwError "incomplete peer identity"
let st = refStorage $ headRef h
self = headLocalIdentity h
powner = finalOwner pid