Fix: Pleroma image unshown

This commit is contained in:
Cutls 2019-05-29 23:13:38 +09:00
parent 2692967b7d
commit 5f22d2427e

View File

@ -594,14 +594,12 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
var sense = ""
var blur = null
}
if (media.pleroma) {
if (media.pleroma.mime_type.indexOf("video") !== -1) {
if (media.pleroma && media.pleroma.mime_type.indexOf("video") !== -1) {
viewer = viewer + '<a onclick="imgv(\'' + id + '\',\'' + key2 + '\',' +
acct_id + ')" id="' + id + '-image-' + key2 + '" data-url="' + url +
'" data-type="video" class="img-parsed"><video src="' +
purl + '" class="' + sense +
' toot-img pointer" style="max-width:100%;"></a></span>';
}
} else {
if (media.type == "unknown") {
viewer = viewer + '<a href="' + media.remote_url + '" title="' + media.remote_url + '">[' + lang.lang_parse_unknown + ']</a> '