Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

PLT-8104: @here should not be added to search on clicking @ icon to display mentions #293

Merged
merged 1 commit into from
Nov 13, 2017

Conversation

MusikPolice
Copy link
Contributor

Summary

Explicitly removed @here from search terms when the mentions button is pressed, regardless of notification preferences. Tidied up search term removal code to avoid unnecessary whitespace between search terms

Ticket Link

https://mattermost.atlassian.net/browse/PLT-8104

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • Ran make check-style to check for style errors (required for all pull requests)

…s pressed, regardless of notification preferences. Tidied up search term removal code to avoid unecessary whitespace between search terms
@MusikPolice MusikPolice added the 2: Dev Review Requires review by a core commiter label Nov 13, 2017
@MusikPolice MusikPolice added this to the v4.4.0 milestone Nov 13, 2017

const indexOfHere = termKeys.indexOf('@here');
if (indexOfHere !== -1) {
termKeys.splice(indexOfHere, 1);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the actual bug fix - suspect that we changed default mention keys to include @here, but didn't update this code. The rest of the change is just removing terms from the array, rather than replacing them with empty string to avoid building up unnecessary whitespace when the array elements are joined on line 492

Copy link
Member

Choose a reason for hiding this comment

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

I've checked this issue and it might be related to this added key here - https://github.com/mattermost/mattermost-webapp/blob/master/stores/user_store.jsx#L464

@crspeller crspeller self-assigned this Nov 13, 2017
@saturninoabril saturninoabril added the 4: Reviews Complete All reviewers have approved the pull request label Nov 13, 2017
@crspeller crspeller merged commit 8a57fc5 into release-4.4 Nov 13, 2017
@crspeller crspeller deleted the PLT-8104 branch November 13, 2017 19:33
@lindalumitchell lindalumitchell added the Tests/Done Release tests have been written label Nov 14, 2017
@jasonblais jasonblais added Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation labels Jan 4, 2018
@hanzei hanzei removed the 2: Dev Review Requires review by a core commiter label Mar 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4: Reviews Complete All reviewers have approved the pull request Changelog/Not Needed Does not require a changelog entry Docs/Not Needed Does not require documentation Tests/Done Release tests have been written
Projects
None yet
7 participants