message: Use getProfileInfo to fetch the displayname
diff: @@ -65,15 +65,25 @@ MatrixAction.prototype.formatMentions = Promise.coroutine(function*(nickUserIdMa
  this.htmlText = this.text;
  }
  userId = ircFormatting.escapeHtmlChars(userId);
  - /* Due to how Riot and friends do push notifications, we need the plain text to match something.
  - Modern client's will pill-ify and will show a displayname, so we can use the localpart so it
  - matches and doesn't degrade too badly on limited clients.*/
  - const localpart = userId.substr(1, userId.indexOf(":")-1);
  + /* Due to how Riot and friends do push notifications, we need the plain text to match something.*/
  + let identifier;
  + try {
  + identifier = yield intent.getProfileInfo(userId, 'displayname', true);
  + }
  + catch (e) {
  + // This shouldn't happen, but let's not fail to match if so.
  +
  + }
  + if (identifier === undefined) {
  + // Fallback to userid.
  + identifier = userId.substr(1, userId.indexOf(":")-1)
  + }
  +
  const regex = MentionRegex(escapeStringRegexp(matchName));
  this.htmlText = this.htmlText.replace(regex,
  -`$1<a href="https://matrix.to/#/${userId}">${ircFormatting.escapeHtmlChars(matchName)}</a>`
  +`$1<a href="https://matrix.to/#/${userId}">${ircFormatting.escapeHtmlChars(identifier)}</a>`
  );
  - this.text = this.text.replace(regex, `$1${localpart}`);
  + this.text = this.text.replace(regex, `$1${identifier}`);
  // Don't match this name twice, we've already replaced all entries.
  matched.add(matchName.toLowerCase());
  }
  