sendMessage mhMetadata

Send the header metadata with a message instead of ignoring the header
metadata and sending "{}".

The header metadata is handled correctly on receipt of a message. Why
was it ignored on sending? Probably no-one ever needed it.
This commit is contained in:
James Brock 2020-06-19 02:34:18 +09:00
parent a992ad8370
commit 88018234e5

View File

@ -344,6 +344,6 @@ sendMessage debug hmackey sock msg = do
hdr = header msg
parentHeaderStr = maybe "{}" encodeStrict $ mhParentHeader hdr
idents = mhIdentifiers hdr
metadata = "{}"
metadata = let Metadata mdobject = mhMetadata hdr in encodeStrict mdobject
content = encodeStrict msg
headStr = encodeStrict hdr