mirror of
https://gitdab.com/cadence/out-of-your-element.git
synced 2025-09-10 04:12:50 +02:00
Generate public urls for media.discordapp.net too
This commit is contained in:
parent
6bc3eaf866
commit
ae9acbcc52
3 changed files with 38 additions and 33 deletions
|
@ -366,7 +366,7 @@ async function messageToEvent(message, guild, options = {}, di) {
|
|||
* Translate Discord attachment links into links that go via the bridge, so they last forever.
|
||||
*/
|
||||
function transformAttachmentLinks(content) {
|
||||
return content.replace(/https:\/\/cdn\.discord(?:app)?\.com\/attachments\/([0-9]+)\/([0-9]+)\/([-A-Za-z0-9_.,]+)/g, url => dUtils.getPublicUrlForCdn(url))
|
||||
return content.replace(/https:\/\/(cdn|media)\.discordapp\.(?:com|net)\/attachments\/([0-9]+)\/([0-9]+)\/([-A-Za-z0-9_.,]+)/g, url => dUtils.getPublicUrlForCdn(url))
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue