Remove unused isPillUrl

This commit is contained in:
J. Ryan Stinnett 2021-01-26 14:11:09 +00:00
parent 501c73ae4b
commit 71921ad705

View file

@ -32,10 +32,6 @@ import {Action} from "../../../dispatcher/actions";
const REGEX_LOCAL_PERMALINK = /^#\/(?:user|room|group)\/(([#!@+]).*?)(?=\/|\?|$)/; const REGEX_LOCAL_PERMALINK = /^#\/(?:user|room|group)\/(([#!@+]).*?)(?=\/|\?|$)/;
class Pill extends React.Component { class Pill extends React.Component {
static isPillUrl(url) {
return !!getPrimaryPermalinkEntity(url);
}
static isMessagePillUrl(url) { static isMessagePillUrl(url) {
return !!REGEX_LOCAL_PERMALINK.exec(url); return !!REGEX_LOCAL_PERMALINK.exec(url);
} }
@ -56,7 +52,7 @@ class Pill extends React.Component {
static propTypes = { static propTypes = {
// The Type of this Pill. If url is given, this is auto-detected. // The Type of this Pill. If url is given, this is auto-detected.
type: PropTypes.string, type: PropTypes.string,
// The URL to pillify (no validation is done, see isPillUrl and isMessagePillUrl) // The URL to pillify (no validation is done)
url: PropTypes.string, url: PropTypes.string,
// Whether the pill is in a message // Whether the pill is in a message
inMessage: PropTypes.bool, inMessage: PropTypes.bool,