forked from karx/dircord
Strip away discord's "link embed escape" syntax
This commit is contained in:
parent
245cb167bb
commit
5fb4e69b6d
|
@ -255,10 +255,13 @@ async fn discord_to_irc_processing(
|
|||
static EMOJI_RE = r"<:(\w+):[0-9]+>";
|
||||
static CHANNEL_RE = r"<#([0-9]+)>";
|
||||
static ROLE_RE = r"<@&([0-9]+)>";
|
||||
static URL_ESCAPE_RE = r"<(https?://[^\s/$.?#].\S*)>";
|
||||
}
|
||||
|
||||
let mut computed = message.to_owned();
|
||||
|
||||
computed = URL_ESCAPE_RE.replace_all(&computed, "$1").into_owned();
|
||||
|
||||
computed = PING_RE_1
|
||||
.replace_all(&computed, MemberReplacer { members })
|
||||
.into_owned();
|
||||
|
|
Loading…
Reference in a new issue