mirror of
https://github.com/element-hq/element-web.git
synced 2024-12-04 13:15:58 +03:00
Only apply room pills to matrix.to room links, exclude event links
This fixes https://github.com/vector-im/riot-web/issues/4680 and fixes https://github.com/vector-im/riot-web/issues/4670
This commit is contained in:
parent
91e74b3333
commit
dff79c4688
1 changed files with 2 additions and 2 deletions
|
@ -25,8 +25,8 @@ import { getDisplayAliasForRoom } from '../../../Rooms';
|
||||||
const REGEX_MATRIXTO = new RegExp(MATRIXTO_URL_PATTERN);
|
const REGEX_MATRIXTO = new RegExp(MATRIXTO_URL_PATTERN);
|
||||||
|
|
||||||
// For URLs of matrix.to links in the timeline which have been reformatted by
|
// For URLs of matrix.to links in the timeline which have been reformatted by
|
||||||
// HttpUtils transformTags to relative links
|
// HttpUtils transformTags to relative links. This excludes event URLs (with `[^\/]*`)
|
||||||
const REGEX_LOCAL_MATRIXTO = /^#\/(?:user|room)\/(([\#\!\@\+]).*)$/;
|
const REGEX_LOCAL_MATRIXTO = /^#\/(?:user|room)\/(([\#\!\@\+])[^\/]*)$/;
|
||||||
|
|
||||||
const Pill = React.createClass({
|
const Pill = React.createClass({
|
||||||
statics: {
|
statics: {
|
||||||
|
|
Loading…
Reference in a new issue