Separate handling of case-sensitive and case-insensitive mention keywords

Description

Right now, we store both case-sensitive and case-insensitive mention keys when looking for mention keywords (link).

This is done by storing the case-insensitive ones in lower case while the case-sensitive ones are in upper case. When we look for the keywords in a post's text, we check the text against the keywords twice, one in the original case to find case-sensitive mention keys and then a second time in lower case to find case-insensitive mention keys.

If we differentiate between the case-sensitive and case-insensitive mention keys more clearly (eg by storing them separately or returning some additional data with them), we can avoid effectively looking through the post text twice when finding mentions.

QA Test Steps

None

Status

Mana

None

Assignee

Unassigned

Reporter

Harrison Healey

Epic Link

None

Fix versions

Mattermost Team

Platform

Sprint

None

Labels

GitHub Issue

None