Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge previous jsonMetadata when saving post #1007

Merged
merged 2 commits into from
Nov 4, 2017

Conversation

Sekhmet
Copy link
Contributor

@Sekhmet Sekhmet commented Nov 4, 2017

Fixes #914

Changes:

  • If draft has metadata already it will be merged into new metadata. Topics, images, users, and links will be updated anyway to match current content.

@Sekhmet Sekhmet added the bug label Nov 4, 2017
@Sekhmet Sekhmet self-assigned this Nov 4, 2017
@bonustrack bonustrack temporarily deployed to busy-nd-pr-1007 November 4, 2017 12:44 Inactive
community: 'busy',
app: `busy/${version}`,
format: 'markdown',
};

// Merging jsonMetadata makes sure that users don't lose any metadata when they edit post using
// Busy (like video data from DTube)
if (this.props.draftPosts[this.draftId] && this.props.draftPosts[this.draftId].jsonMetadata) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you could use _.has (https://lodash.com/docs/4.17.4#has) for this so:

_.has(this.props.draftPosts[this.draftId], 'jsonMetadata')

Copy link
Contributor

@bonustrack bonustrack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried upload a movie https://busy.org/dtube/@siol/9sc3nplb and edited the post, it's working well so far. Well done!

Copy link
Contributor

@jm90m jm90m left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small comment, your call, lgtm, both do same thing anyways

@Sekhmet Sekhmet merged commit e2ad690 into busyorg:new-design Nov 4, 2017
@Sekhmet Sekhmet deleted the json-metadata-merge branch November 4, 2017 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants