Skip to content

LocalMessageReference

Kevin Quick edited this page Oct 24, 2019 · 1 revision

Via the web interface, the user can select the triple-dots next to a posting and via the popup menu, get a permalink to the message. As an example: https://mattermost.mycompany.com/myteam/pl/gdy76sncrpbr9qttqjnoci3ejy, which is a link that can be used anywhere, and following it will open up the web Mattermost client to the team, channel, and message specified by the message ID (the final part of the URL).

If this URL is posted back into a Mattermost message, then the web client seems to have some ability to recognize this URL and simply scroll the current Mattermost instance to the specified team, channel, and message instead of opening a new tab or completely restarting the current one.

It might be useful to supply similar functionality in Matterhorn: recognize the URL as being a local message reference and jump to that message.

Considerations:

  • The URL might have additional path elements that are interpreted by a reverse-proxy configuration.
  • The web Mattermost interface starts with the URL base, but Matterhorn starts with a hostname and port configuration, so it's not always possible for Matterhorn to reconstruct the proper URL (see previous item).
  • Reconstruction of the base URL might be less important if a heuristic like the following were used: attempt to lookup a MessageID based on the final component of the URL string, and if the Mattermost server responds with a valid message, assume the full URL was correct, and if not, defer the URL to the external browser.
    • What about false positives?
  • How to handle these for the Ctrl-O "Open URL" operation.
  • Should these be rendered any differently for the user to indicate they are (suspected to be) a local message reference?
  • If the server provided rich data in messages, then the server's recognition of this being a local message reference could be used instead of locally attempting it; rich data responses are a general enhancement request to the Mattermost server developers and this is yet another instance where it would be useful.
Clone this wiki locally