cli: option to mark shown messages as read (off by default) (#3506)

* cli: option to mark shown messages as read (off by default)

* fix tests

* fix tests
This commit is contained in:
Evgeny Poberezkin
2023-12-03 15:42:26 +00:00
committed by GitHub
parent f94c0311c1
commit 6a9a67db14
7 changed files with 28 additions and 17 deletions
+8
View File
@@ -42,6 +42,7 @@ data ChatOpts = ChatOpts
allowInstantFiles :: Bool,
autoAcceptFileSize :: Integer,
muteNotifications :: Bool,
markRead :: Bool,
maintenance :: Bool
}
@@ -268,6 +269,12 @@ chatOptsP appDir defaultDbFileName = do
( long "mute"
<> help "Mute notifications"
)
markRead <-
switch
( long "mark-read"
<> short 'r'
<> help "Mark shown messages as read"
)
maintenance <-
switch
( long "maintenance"
@@ -286,6 +293,7 @@ chatOptsP appDir defaultDbFileName = do
allowInstantFiles,
autoAcceptFileSize,
muteNotifications,
markRead,
maintenance
}