Skip to content

Commit 4c33d8a

Browse files
authored
agent: To and FromField instances for AConnShortLink (#1553)
1 parent a94ca62 commit 4c33d8a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Simplex/Messaging/Agent/Protocol.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1413,6 +1413,10 @@ data ContactConnType = CCTContact | CCTChannel | CCTGroup deriving (Eq, Show)
14131413

14141414
data AConnShortLink = forall m. ConnectionModeI m => ACSL (SConnectionMode m) (ConnShortLink m)
14151415

1416+
instance ToField AConnShortLink where toField = toField . Binary . strEncode
1417+
1418+
instance FromField AConnShortLink where fromField = blobFieldDecoder strDecode
1419+
14161420
data ConnectionLink m = CLFull (ConnectionRequestUri m) | CLShort (ConnShortLink m)
14171421
deriving (Eq, Show)
14181422

0 commit comments

Comments
 (0)