my understanding of the current message validation rules is that should not even be allowed.
I think this was my problem -- I was under the impression that ssb-validate was only hooked up to sbot publish
, so my local patch meant that I was publishing a message that others wouldn't replicate. Thanks for helping me troubleshoot this, definitely a learning experience!
So please read it through that lens - lighthearted and jokingly - if you can.
❤️
I've just refactored and posted a new message, which shows up to me as:
{
"key": "%59UufAGSLgEUQWsvdZEHSIGw/x2ezxY5jczavjpKFZ8=.sha256",
"value": {
"previous": "%2+uc1az8Xk9NGV4xMSnaMyXyq2eLeBWGzQlcpT/emac=.sha256",
"sequence": 4925,
"author": "@+oaWWDs8g73EZFUMfW37R/ULtFEjwKN/DczvdYihjbU=.ed25519",
"timestamp": 1537379262052,
"hash": "sha256",
"content": {
"type": "post",
"text": "If you're reading this, #blob-content works.\n\n...or not. Depends on how you're viewing this message.",
"mentions": [
{
"link": "#blob-content"
}
]
},
"signature": "j8/lzTjN/FJYEMHyaJqFdJj5tyDPR9D1R+l8foO3XE7sZTfOVZrLM7zXsggipXEXtWo/WYgylMfE3Hkhie7IDA==.sig.ed25519",
"blob": "&sbBmsB7XWvmIzkBzreYcuzPpLtpeCMDIs6n/OJGSC1U=.sha256",
"blobContent": true
}
}
Currently there seem to be two states:
- Blob is found and returned with
value.blob: "&blob"
andvalue.blobContent: true
. - Blob can't be found/unboxed/etc and the original
value
object is returned as-is.
I'm not familiar enough to understand why, but I've even been able to post a blob message and then add the blob in a later message, and after restarting sbot it seems to be unboxed correctly. I'm sure this throws a wrench in the whole "timestamp" bit, as we now have:
- when the message was received
- when the message was [supposedly] authored
- when the blob was received
Anyway, it turns out that I was able to hook into the unboxing code without setting the invalid value.content: "&blob"
property, which seems to resolve the bug I caused/experienced. Fingers crossed that I didn't just break my feed again!