Closed JefPatat closed 1 month ago
Good to finally meet you sir.. I've been trying to solve the problem but it is quite complex. I tried to upload videos on dtube but I got response like "invalid permlink character: ${s}". Please i need your advice on what to do.
I'm a bit surprised to have found an issue in steem-js. I'm even more surprised to see that this bug has been there since the very first commit of the code. Documentation is still severely lacking and I had to hack my way through this issue. When using steem-js to make a comment on a post one has to provide a comment permlink. steem-js has a function
commentPermlink
to help with creating this permlink. I have been using this function without any issues until today when I used it to comment on a blog post by @diana.catherine.When using this snippet:
The permlink created looks like this:
Using this permlink to post a comment results in an error:
Checking the block explorer revealed a second hint. This is just from a random comment on the mentioned post. It shows the dot is removed from the permlink:
I did some further digging and found that condenser has this extra code to further format the permlink in their own function. It is limited to 255 chars and only letters, numbers and dashes are allowed. Excerpt from the TransactionSaga.js
When using
commentPermlink
it is best to apply the above logic on your code or write your own function to bypass this error.Posted on Utopian.io - Rewarding Open Source Contributors