Revert "core: include commit information in /v response (#1705)"

This reverts commit 3d4e4e2ef9.
This commit is contained in:
Evgeny Poberezkin
2023-01-08 13:13:13 +00:00
parent 3d4e4e2ef9
commit 4dc2a1b72d
5 changed files with 3 additions and 40 deletions

View File

@@ -8,7 +8,6 @@
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TemplateHaskell #-}
module Simplex.Chat.Controller where
@@ -34,7 +33,6 @@ import Data.Time (ZonedTime)
import Data.Time.Clock (UTCTime)
import Data.Version (showVersion)
import GHC.Generics (Generic)
import GitHash
import Numeric.Natural
import qualified Paths_simplex_chat as SC
import Simplex.Chat.Call
@@ -63,19 +61,6 @@ import UnliftIO.STM
versionNumber :: String
versionNumber = showVersion SC.version
coreVersionInfo :: CoreVersionInfo
coreVersionInfo =
CoreVersionInfo
{ commitHash = giHash gi,
commitDate = giCommitDate gi,
commitMessage = giCommitMessage gi,
branch = giBranch gi,
tag = giTag gi,
dirty = giDirty gi
}
where
gi = $$tGitInfoCwd
versionStr :: String
versionStr = "SimpleX Chat v" <> versionNumber
@@ -349,7 +334,7 @@ data ChatResponse
| CRFileTransferStatus (FileTransfer, [Integer]) -- TODO refactor this type to FileTransferStatus
| CRUserProfile {profile :: Profile}
| CRUserProfileNoChange
| CRVersionInfo {version :: String, coreVersion :: CoreVersionInfo}
| CRVersionInfo {version :: String}
| CRInvitation {connReqInvitation :: ConnReqInvitation}
| CRSentConfirmation
| CRSentInvitation {customUserProfile :: Maybe Profile}
@@ -558,18 +543,6 @@ tmeToPref currentTTL tme = uncurry TimedMessagesPreference $ case tme of
TMEEnableKeepTTL -> (FAYes, currentTTL)
TMEDisableKeepTTL -> (FANo, currentTTL)
data CoreVersionInfo = CoreVersionInfo
{ commitHash :: String,
commitDate :: String,
commitMessage :: String,
branch :: String,
tag :: String,
dirty :: Bool
}
deriving (Show, Generic)
instance ToJSON CoreVersionInfo where toEncoding = J.genericToEncoding J.defaultOptions
data ChatError
= ChatError {errorType :: ChatErrorType}
| ChatErrorAgent {agentError :: AgentErrorType, connectionEntity_ :: Maybe ConnectionEntity}