mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2025-06-28 12:19:54 +00:00
* core: member acceptance * migration * move hook * core: support sending direct messages to members (#5680) * fix compilation, todos * fix test * predicates * comment * extend hook * wip * wip * wip * wip * fix test * mute output * schema * better query * plans * fix test * directory * captcha * captcha works * remove column, add UI types and group status icon * fix test * query plans * exclude messages of pending members from history * commands for filter settings * core: separately delete pending approval members; other apis validation (#5699) * accepted status * send captcha messages as replies * fix blocked words * simpler filter info * info about /filter and /role after group registration * update query plans --------- Co-authored-by: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com>
21 lines
699 B
Haskell
21 lines
699 B
Haskell
{-# LANGUAGE NamedFieldPuns #-}
|
|
|
|
module Main where
|
|
|
|
import Directory.Options
|
|
import Directory.Service
|
|
import Directory.Store
|
|
import Simplex.Chat.Controller (ChatConfig (..), ChatHooks (..), defaultChatHooks)
|
|
import Simplex.Chat.Core
|
|
import Simplex.Chat.Terminal (terminalChatConfig)
|
|
|
|
main :: IO ()
|
|
main = do
|
|
opts@DirectoryOpts {directoryLog, runCLI} <- welcomeGetOpts
|
|
st <- restoreDirectoryStore directoryLog
|
|
if runCLI
|
|
then directoryServiceCLI st opts
|
|
else do
|
|
env <- newServiceState opts
|
|
let cfg = terminalChatConfig {chatHooks = defaultChatHooks {acceptMember = Just $ acceptMemberHook opts env}}
|
|
simplexChatCore cfg (mkChatOpts opts) $ directoryService st opts env
|