mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2024-12-17 17:20:21 +01:00
5a74b8066f
* update servers * update version * update simplexmq version * update database file names * update server fingerprints and simlexmq * update simplexmq commit * fix port in tests * update tls fixtures (#193) * add -v cli option; print update instructions on -v and /v (#194) Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com> Co-authored-by: Efim Poberezkin <8711996+efim-poberezkin@users.noreply.github.com>
28 lines
784 B
Haskell
28 lines
784 B
Haskell
{-# LANGUAGE DuplicateRecordFields #-}
|
|
{-# LANGUAGE FlexibleContexts #-}
|
|
{-# LANGUAGE NamedFieldPuns #-}
|
|
{-# LANGUAGE OverloadedStrings #-}
|
|
|
|
module Main where
|
|
|
|
import Simplex.Chat
|
|
import Simplex.Chat.Controller (versionNumber)
|
|
import Simplex.Chat.Options
|
|
import System.Directory (getAppUserDataDirectory)
|
|
import System.Terminal (withTerminal)
|
|
|
|
main :: IO ()
|
|
main = do
|
|
opts <- welcomeGetOpts
|
|
t <- withTerminal pure
|
|
simplexChat defaultChatConfig opts t
|
|
|
|
welcomeGetOpts :: IO ChatOpts
|
|
welcomeGetOpts = do
|
|
appDir <- getAppUserDataDirectory "simplex"
|
|
opts@ChatOpts {dbFile} <- getChatOpts appDir
|
|
putStrLn $ "SimpleX Chat v" ++ versionNumber
|
|
putStrLn $ "db: " <> dbFile <> "_chat.db, " <> dbFile <> "_agent.db"
|
|
putStrLn "type \"/help\" or \"/h\" for usage info"
|
|
pure opts
|