~amindfv/jmms

403ce281b5c91563d4372740ce7dc8e7165578a0 — amindfv 2 years ago f9e8ff0
mms send: better call out to editor
1 files changed, 3 insertions(+), 3 deletions(-)

M ReadMessages.hs
M ReadMessages.hs => ReadMessages.hs +3 -3
@@ 135,9 135,9 @@ sendMessageTo :: [BS.ByteString] -> IO ()
sendMessageTo recipients = do
         homeDir <- getHomeDirectory
         textLocation <- emptySystemTempFile "temp.mms"
         -- TODO: $EDITOR:
         readProcessWithExitCode "nano" [textLocation] "" >>= \case
            (ExitSuccess, _, _) -> do
         -- TODO: $EDITOR. Also use 'proc' to escape filename:
         (system $ "nano "++show textLocation) >>= \case
            ExitSuccess -> do
               r <- readProcessWithExitCode "python3" [homeDir++"/"++Settings.mmsSenderLoc, L.intercalate "," (map BS8.unpack recipients), "", "cid-1,text/plain,"++textLocation] ""
               case r of
                  _ -> print r