summaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Main.hs b/src/Main.hs
index aee0cc6..a84e820 100644
--- a/src/Main.hs
+++ b/src/Main.hs
@@ -303,7 +303,10 @@ cmdSend :: Command
cmdSend = void $ do
Just peer <- gets csPeer
text <- asks ciLine
- smsg <- sendDirectMessage peer $ T.pack text
+ powner <- peerIdentity peer >>= \case
+ PeerIdentityFull pid -> return $ finalOwner pid
+ _ -> throwError "incomplete peer identity"
+ smsg <- sendDirectMessage powner $ T.pack text
tzone <- liftIO $ getCurrentTimeZone
liftIO $ putStrLn $ formatMessage tzone $ fromStored smsg