GitLab rooms should treat shortlinks as relative to GitLab repo

Problem to solve

When I create a Gitter room for a GitLab project, when I reference an issue like #44 it should link to issue 44 for the project which the room relates to. Currently it is a dead link.

Currently, you can post a full link which does transform into an issue decoration:

https://gitlab.com/gitlab-org/gitter/webapp/issues/1445 ->

Further details

Related to https://gitlab.com/gitlab-org/gitter/webapp/issues/757

For example, procps uses Gitter and GitLab. Even though there is integration, all the links are pointing to GitHub not GitLab, so they are broken. This problem occurs for on the right side panel as well as the chat message markup.

Proposal

For rooms created through the new created Gitter rooms based on GitLab projects, these links should work correctly.

For existing rooms that need to be linked to GitLab, follow https://gitlab.com/gitlab-org/gitter/webapp/issues/757

Relevant code

Edited by Eric Eastwood