core: refactor terminal commands (#583)

This commit is contained in:
Evgeny Poberezkin
2022-04-28 08:34:21 +01:00
committed by GitHub
parent d9572cef86
commit 1df9a1ec2d
4 changed files with 62 additions and 73 deletions
+10 -13
View File
@@ -97,14 +97,14 @@ data ChatCommand
| StartChat
| SetFilesFolder FilePath
| APIGetChats {pendingConnections :: Bool}
| APIGetChat ChatType Int64 ChatPagination
| APIGetChat ChatRef ChatPagination
| APIGetChatItems Int
| APISendMessage ChatType Int64 (Maybe FilePath) (Maybe ChatItemId) MsgContent
| APISendMessageQuote ChatType Int64 ChatItemId MsgContent -- TODO discontinue
| APIUpdateChatItem ChatType Int64 ChatItemId MsgContent
| APIDeleteChatItem ChatType Int64 ChatItemId CIDeleteMode
| APIChatRead ChatType Int64 (ChatItemId, ChatItemId)
| APIDeleteChat ChatType Int64
| APISendMessage ChatRef (Maybe FilePath) (Maybe ChatItemId) MsgContent
| APISendMessageQuote ChatRef ChatItemId MsgContent -- TODO discontinue
| APIUpdateChatItem ChatRef ChatItemId MsgContent
| APIDeleteChatItem ChatRef ChatItemId CIDeleteMode
| APIChatRead ChatRef (ChatItemId, ChatItemId)
| APIDeleteChat ChatRef
| APIAcceptContact Int64
| APIRejectContact Int64
| APIUpdateProfile Profile
@@ -128,11 +128,11 @@ data ChatCommand
| AddressAutoAccept Bool
| AcceptContact ContactName
| RejectContact ContactName
| SendMessage ContactName ByteString
| SendMessage ChatName ByteString
| SendMessageQuote {contactName :: ContactName, msgDir :: AMsgDirection, quotedMsg :: ByteString, message :: ByteString}
| SendMessageBroadcast ByteString
| DeleteMessage ContactName ByteString
| EditMessage {contactName :: ContactName, editedMsg :: ByteString, message :: ByteString}
| DeleteMessage ChatName ByteString
| EditMessage {chatName :: ChatName, editedMsg :: ByteString, message :: ByteString}
| NewGroup GroupProfile
| AddMember GroupName ContactName GroupMemberRole
| JoinGroup GroupName
@@ -142,10 +142,7 @@ data ChatCommand
| DeleteGroup GroupName
| ListMembers GroupName
| ListGroups
| SendGroupMessage GroupName ByteString
| SendGroupMessageQuote {groupName :: GroupName, contactName_ :: Maybe ContactName, quotedMsg :: ByteString, message :: ByteString}
| DeleteGroupMessage GroupName ByteString
| EditGroupMessage {groupName :: ContactName, editedMsg :: ByteString, message :: ByteString}
| LastMessages (Maybe ChatName) Int
| SendFile ContactName FilePath
| SendFileInv ContactName FilePath