diff --git a/src/Simplex/FileTransfer/Server/Store.hs b/src/Simplex/FileTransfer/Server/Store.hs index 10c34819f..46513ea96 100644 --- a/src/Simplex/FileTransfer/Server/Store.hs +++ b/src/Simplex/FileTransfer/Server/Store.hs @@ -54,6 +54,7 @@ fileTimePrecision :: Int64 fileTimePrecision = 3600 -- truncate creation time to 1 hour data FileRecipient = FileRecipient RecipientId RcvPublicAuthKey + deriving (Show) instance StrEncoding FileRecipient where strEncode (FileRecipient rId rKey) = strEncode rId <> ":" <> strEncode rKey diff --git a/src/Simplex/FileTransfer/Server/StoreLog.hs b/src/Simplex/FileTransfer/Server/StoreLog.hs index 9d3919c2c..675e4efdb 100644 --- a/src/Simplex/FileTransfer/Server/StoreLog.hs +++ b/src/Simplex/FileTransfer/Server/StoreLog.hs @@ -44,6 +44,7 @@ data FileStoreLogRecord | AddRecipients SenderId (NonEmpty FileRecipient) | DeleteFile SenderId | AckFile RecipientId + deriving (Show) instance StrEncoding FileStoreLogRecord where strEncode = \case diff --git a/src/Simplex/Messaging/Notifications/Server/StoreLog.hs b/src/Simplex/Messaging/Notifications/Server/StoreLog.hs index d43700ad3..d11c01f76 100644 --- a/src/Simplex/Messaging/Notifications/Server/StoreLog.hs +++ b/src/Simplex/Messaging/Notifications/Server/StoreLog.hs @@ -50,6 +50,7 @@ data NtfStoreLogRecord | CreateSubscription NtfSubRec | SubscriptionStatus NtfSubscriptionId NtfSubStatus | DeleteSubscription NtfSubscriptionId + deriving (Show) data NtfTknRec = NtfTknRec { ntfTknId :: NtfTokenId, @@ -61,6 +62,7 @@ data NtfTknRec = NtfTknRec tknRegCode :: NtfRegCode, tknCronInterval :: Word16 } + deriving (Show) mkTknData :: NtfTknRec -> STM NtfTknData mkTknData NtfTknRec {ntfTknId, token, tknStatus = status, tknVerifyKey, tknDhKeys, tknDhSecret, tknRegCode, tknCronInterval = cronInt} = do @@ -81,6 +83,7 @@ data NtfSubRec = NtfSubRec tokenId :: NtfTokenId, subStatus :: NtfSubStatus } + deriving (Show) mkSubData :: NtfSubRec -> STM NtfSubData mkSubData NtfSubRec {ntfSubId, smpQueue, notifierKey, tokenId, subStatus = status} = do diff --git a/src/Simplex/Messaging/Server/StoreLog.hs b/src/Simplex/Messaging/Server/StoreLog.hs index c47b06eb5..cfe2cd82e 100644 --- a/src/Simplex/Messaging/Server/StoreLog.hs +++ b/src/Simplex/Messaging/Server/StoreLog.hs @@ -55,6 +55,7 @@ data StoreLogRecord | DeleteQueue QueueId | DeleteNotifier QueueId | UpdateTime QueueId RoundedSystemTime + deriving (Show) data SLRTag = CreateQueue_ @@ -74,10 +75,11 @@ instance StrEncoding QueueRec where "sid=" <> strEncode senderId, "sk=" <> strEncode senderKey ] - <> if sndSecure then " sndSecure=" <> strEncode sndSecure else "" + <> sndSecureStr <> maybe "" notifierStr notifier <> maybe "" updatedAtStr updatedAt where + sndSecureStr = if sndSecure then " sndSecure=" <> strEncode sndSecure else "" notifierStr ntfCreds = " notifier=" <> strEncode ntfCreds updatedAtStr t = " updated_at=" <> strEncode t