Skip to content

[FIX] Real names were not displayed in the reactions (API/UI)#13495

Merged
rodrigok merged 9 commits intodevelopfrom
fix-real-names-reactions
Apr 6, 2019
Merged

[FIX] Real names were not displayed in the reactions (API/UI)#13495
rodrigok merged 9 commits intodevelopfrom
fix-real-names-reactions

Conversation

@MarcosSpessatto
Copy link
Contributor

@MarcosSpessatto MarcosSpessatto commented Feb 15, 2019

Closes #12889

@MarcosSpessatto MarcosSpessatto added this to the 0.75.0 milestone Feb 15, 2019
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-13495 February 15, 2019 14:13 Inactive
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-13495 February 15, 2019 19:48 Inactive
@MarcosSpessatto MarcosSpessatto changed the title [FIX] Fix display real names in api when it is enabled [FIX] Real names were not displayed in the reactions (API/UI) Feb 15, 2019
@MarcosSpessatto MarcosSpessatto added type: bug area: ui Touches the code on client side labels Feb 15, 2019
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-13495 March 6, 2019 18:49 Inactive
@MarcosSpessatto
Copy link
Contributor Author

@rodrigok done

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-13495 March 7, 2019 21:12 Inactive
@sampaiodiego sampaiodiego temporarily deployed to rocket-chat-pr-13495 March 12, 2019 12:18 Inactive
if (message.u && message.u._id && settings.get('UI_Use_Real_Name')) {
const user = getUser(message.u._id);
message.u.name = user && user.name;
if (message.u && message.u.name && !settings.get('UI_Use_Real_Name')) {
Copy link
Member

Choose a reason for hiding this comment

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

why did you change to remove the field instead of adding it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this case, because the real name is already saved in the Messages collection(mentions and username). So if you are not using Real Names, we remove the real name.

Copy link
Member

Choose a reason for hiding this comment

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

the problem is that property is not updated (like if an user changes its name), that's why we always inject it before sending to client. I don't even know why we save it there in the first place.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed to the old behavior.

@rodrigok
Copy link
Member

@MarcosSpessatto can you fix the conflicts?

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-13495 March 13, 2019 19:15 Inactive
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-13495 March 13, 2019 19:16 Inactive
@MarcosSpessatto
Copy link
Contributor Author

@rodrigok done

@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-13495 March 14, 2019 20:52 Inactive
@engelgabriel engelgabriel temporarily deployed to rocket-chat-pr-13495 March 14, 2019 20:57 Inactive
@rodrigok rodrigok merged commit 409bc3c into develop Apr 6, 2019
@rodrigok rodrigok deleted the fix-real-names-reactions branch April 6, 2019 14:41
@rodrigok rodrigok mentioned this pull request Apr 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui Touches the code on client side feat: api type: bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Comments