Use proxy media url for unknown media

This commit is contained in:
cutls 2020-09-03 22:57:53 +09:00
parent 0522331977
commit 4d1053ce99
2 changed files with 3 additions and 3 deletions

View File

@ -628,7 +628,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var mty = media.remote_url.match(/.+(\..+)$/)[1] var mty = media.remote_url.match(/.+(\..+)$/)[1]
viewer = viewer =
viewer + viewer +
`<a href="${media.remote_url}" title="${media.remote_url}">[${lang.lang_parse_unknown}(${mty})]</a> ` `<a href="${media.url ? media.url : media.remote_url}" title="${media.remote_url} from ${media.url}">[${lang.lang_parse_unknown}(${mty})]</a> `
} else if (media.type == 'audio') { } else if (media.type == 'audio') {
viewer = viewer =
viewer + viewer +

View File

@ -279,8 +279,8 @@ function stremaingSubscribe(type, cc, acct_id, tlid, data, mute, delc, voice, mo
let name = data let name = data
if(data.name) name = data.name if(data.name) name = data.name
arr.push(name) arr.push(name)
if(data.any) arr = arr.concat(data.any.split()) if(data.any) arr = arr.concat(data.any.split(','))
if(data.all) arr = arr.concat(data.all.split()) if(data.all) arr = arr.concat(data.all.split(','))
for(const tag of arr) { for(const tag of arr) {
mastodonBaseWs[domain].send(`{"type":"subscribe","stream":"hashtag","tag":"${tag}"}`) mastodonBaseWs[domain].send(`{"type":"subscribe","stream":"hashtag","tag":"${tag}"}`)
} }