message: fix: correctly identify emoticons
diff: @@ -191,16 +191,19 @@ export default class BasicMessageEditor extends React.Component<IProps, IState>
  public replaceEmoticon(caretPosition: DocumentPosition, regex: RegExp): number {
  const { model } = this.props;
  const range = model.startRange(caretPosition);
  - // expand range max 8 characters backwards from caretPosition,
  + // expand range max 9 characters backwards from caretPosition,
  // as a space to look for an emoticon
  - let n = 8;
  + let n = 9;
  range.expandBackwardsWhile((index, offset) => {
  const part = model.parts[index];
  n -= 1;
  return n >= 0 && [Type.Plain, Type.PillCandidate, Type.Newline].includes(part.type);
  });
  const emoticonMatch = regex.exec(range.text);
  - if (emoticonMatch) {
  + // ignore matches at start of proper substrings
  + // so xd will not match if the string was "mixd 123456"
  + // and we are lookinh at xd 123456 part of the string
  + if (emoticonMatch && (n >= 0 || emoticonMatch.index !== 0)) {
  const query = emoticonMatch[1].replace("-", "");
  // try both exact match and lower-case, this means that xd won't match xD but :P will match :p
  const data = EMOTICON_TO_EMOJI.get(query) || EMOTICON_TO_EMOJI.get(query.toLowerCase());
  