mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-20 04:51:05 +00:00
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.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user