core: return user unread counts on ListUsers command (#1763)

* core: return user unread counts on ListUsers command

* split

* tests

* refactor

* viewUserInfo

* refactor

* remove omit nothing

* corrections

* fix

Co-authored-by: Evgeny Poberezkin <2769109+epoberezkin@users.noreply.github.com>
This commit is contained in:
JRoberts
2023-01-16 22:57:31 +04:00
committed by GitHub
parent 91a39cae23
commit 2fdc23274d
6 changed files with 35 additions and 10 deletions

View File

@@ -283,9 +283,7 @@ processChatCommand = \case
setActive ActiveNone
atomically . writeTVar u $ Just user
pure $ CRActiveUser user
ListUsers -> do
users <- withStore' getUsers
pure $ CRUsersList users
ListUsers -> CRUsersList <$> withStore' getUsersInfo
APISetActiveUser userId -> do
u <- asks currentUser
user <- withStore $ \db -> getSetActiveUser db userId