From 67ae555d886afa1ef3e67b3b03e357e68143e49a Mon Sep 17 00:00:00 2001 From: shum Date: Thu, 4 Jun 2026 06:07:21 +0000 Subject: [PATCH] chat: fix misleading decodeSimplexName docstring The comment described "@alice.simplex" as the column's surface form, but ToField SimplexNameInfo writes the canonical strEncode output ("simplex:/name@alice.simplex"). Aligns the docstring with what the column actually holds. --- src/Simplex/Chat/Store/Shared.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Simplex/Chat/Store/Shared.hs b/src/Simplex/Chat/Store/Shared.hs index 982dc05b14..af868a2b77 100644 --- a/src/Simplex/Chat/Store/Shared.hs +++ b/src/Simplex/Chat/Store/Shared.hs @@ -230,8 +230,9 @@ type ConnectionRow = (Int64, ConnId, Int, Maybe Int64, Maybe Int64, BoolInt, May type MaybeConnectionRow = (Maybe Int64, Maybe ConnId, Maybe Int, Maybe Int64, Maybe Int64, Maybe BoolInt, Maybe GroupLinkId, Maybe XContactId) :. (Maybe Int64, Maybe ConnStatus, Maybe ConnType, Maybe BoolInt, Maybe LocalAlias) :. EntityIdsRow :. (Maybe UTCTime, Maybe Text, Maybe UTCTime, Maybe PQSupport, Maybe PQEncryption, Maybe PQEncryption, Maybe PQEncryption, Maybe Int, Maybe Int, Maybe VersionChat, Maybe VersionChat, Maybe VersionChat) :. Only (Maybe Text) --- Maybe Text column holds the surface form (e.g. "@alice.simplex"); reads --- that fail to parse degrade to Nothing rather than failing the whole row. +-- Maybe Text column holds the canonical strEncode form +-- (e.g. "simplex:/name@alice.simplex"); reads that fail to parse degrade +-- to Nothing rather than failing the whole row. decodeSimplexName :: Maybe Text -> Maybe SimplexNameInfo decodeSimplexName = (>>= eitherToMaybe . strDecode . encodeUtf8)