Bug Report: Busy.org overwriting comment json_metadata
Project Information
- Repository: https://github.com/busyorg/busy
- Project Name: Busy.org
Expected behavior
If you programatically add json_metadata
to a comment, it should be unaffected when the comment is being edited on busy.org. The json_metadata
should still be intact.
Actual behavior
The json_metadata
actually get's overwritten by the defaults that busy.org sets.
I can't really believe that this wasn't noticed yet... The only related issue I could find was this one. But it's something else. Isn't there someone else than me utilizing comment's json_metadata
?
How to reproduce
Create a comment (NOT A ROOT POST!) with custom json_metadata
, for example with steem.js.
steem.broadcast.comment(wif, parentAuthor, parentPermlink, author, permlink, title, body, jsonMetadata, function(err, result) {
console.log(err, result);
});
Then go to busy.org and edit this comment. If you now look at the json_metadata
you'll notice that your custom values are gone.
On the-magic-frog.com the comment's json_metadata
is used to store the actual submission details. After editing the comment on steemit.com the json_metadata
looks like this:
{
type: 'append',
appendText: 'Bla bla bla',
comment: '',
author: 'mkt',
tags: [ 'themagicfrog', ... ],
app: 'steemit/0.1'
}
Only the app
property gets added. After editing the same comment on busy.org it looks like this:
{ tags: [ 'themagicfrog' ], community: 'busy', app: 'busy/2.4.0' }
How to fix
Just a wild guess but this looks pretty much like the code that causes the problem.
https://github.com/busyorg/busy/blob/2212c3daba84cec828748136492b60c9bd0f0b70/src/client/comments/commentsActions.js#L100
If noone else does, I'll fix this later.
Update: Here's the PR: https://github.com/busyorg/busy/pull/1969
Browser/App version/Operating system: irrelevant
I love busy
Thanks @mkt
Hello @mkt,
Sorry for the delay in the review. I was waiting for the PO's to respond to your PR. Since they are happy and discussing changes with you, I find this post-worthy of Staff-picks.
Thank you for contributing.
Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]
Thanks @sachincool! :)
Hey @mkt
Thanks for contributing on Utopian.
Congratulations! Your contribution was Staff Picked to receive a maximum vote for the bug-hunting category on Utopian for being of significant value to the project and the open source community.
We’re already looking forward to your next contribution!
Contributing on Utopian
Learn how to contribute on our website or by watching this tutorial on Youtube.
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!