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] Add user object to responses in /*.files Rest endpoints #10480

Merged
merged 1 commit into from
Apr 20, 2018

Conversation

MarcosSpessatto
Copy link
Member

Add user object to responses in /[groups, channels, im].files Rest endpoints.
Closes #10449.

@MarcosSpessatto MarcosSpessatto self-assigned this Apr 17, 2018
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-10480 April 17, 2018 14:09 Inactive
@rafaelks rafaelks added this to Desireable in 0.64.0 via automation Apr 17, 2018
@rafaelks rafaelks added this to the 0.64.0 milestone Apr 17, 2018
@theorenck theorenck moved this from Desireable to Ready to merge in 0.64.0 Apr 18, 2018
@MarcosSpessatto MarcosSpessatto moved this from Ready to merge to Review/QA in 0.64.0 Apr 18, 2018
Hudell
Hudell previously approved these changes Apr 20, 2018
RocketChat.API.helperMethods.set('replaceUserIdKeyByUserObject', function _addUserToObject({ object, userId }) {
const { username, name } = RocketChat.models.Users.findOneById(userId);
if (object.hasOwnProperty('userId')) {
delete object.userId;
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure if removing the userId is a good idea, as it may break something that relies on it, but I tested the application and didn't find any problem.

@rodrigok rodrigok temporarily deployed to rocket-chat-pr-10480 April 20, 2018 22:06 Inactive
@rodrigok rodrigok merged commit 81a3fb1 into develop Apr 20, 2018
0.64.0 automation moved this from Review/QA to Done Apr 20, 2018
@rodrigok rodrigok deleted the fix-rest-files branch April 20, 2018 23:47
@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
Projects
No open projects
0.64.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

5 participants