Closed tkanos closed 2 years ago
If you decide to merge, can you create a tag for it, in order to be able to install like :
go install github.com/jdtron/twet@latest
Thanks,
@tkanos Why close the PR? Are you going to put up a different one? 🤔
Because that PR was adding Hash to tweets, but apparently a Tweet (that is not a reply) doesn't need to have hash IF it has the same algorithm that all the others. So the real fix will maybe be to fix the algorithm that create Hash. removing the hashes of the text.
Yup! See Twt Hash Extension, specifically:
Each twt’s hash is calculated using its author, timestamp and contents. The author feed URL (see below, it is not necessarily identical to the URL which is being retrieved), RFC 3339 formatted timestamp and twt text are joined with line feeds:
<twt author feed URL> "\n" <twt timestamp in RFC 3339> "\n" <twt text>
This UTF-8 encoded string is Blake2b hashed with 256 bits and Base32 encoded without padding. After converting to lower case the last seven characters make up the twt hash.
In order to produce repliable tweets we need to generate hash on tweets like :
So I fixed it (I have not refactored the code).