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

[FIX] Missing user data on files uploaded through the API #10473

Merged

Conversation

Hudell
Copy link
Contributor

@Hudell Hudell commented Apr 16, 2018

Closes #10449

Files uploaded through the API were missing the userId of the uploader. This caused those files to not be included in some endpoints.

@theorenck theorenck added this to the 0.64.0 milestone Apr 18, 2018
@theorenck theorenck requested a review from sampaiodiego April 18, 2018 21:08
@rodrigok
Copy link
Member

@Hudell could you add a migration to fix the existent ones?


const update = {
$set: {
userId: message.u._id
Copy link
Member

Choose a reason for hiding this comment

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

Can you test if the message's object exists to prevent an exception here?

@rodrigok rodrigok merged commit bc548e7 into RocketChat:develop Apr 20, 2018
@rodrigok rodrigok mentioned this pull request Apr 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants