Fix: Notf TL bugs about Misskey

This commit is contained in:
Cutls 2019-06-25 23:16:36 +09:00
parent fa2d5f8492
commit f1ea5ad8f1

View File

@ -53,11 +53,15 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
var empCli = localStorage.getItem("client_emp"); var empCli = localStorage.getItem("client_emp");
if (empCli) { if (empCli) {
var empCli = JSON.parse(empCli); var empCli = JSON.parse(empCli);
} else {
var empCli = [];
} }
//クライアントミュート //クライアントミュート
var muteCli = localStorage.getItem("client_mute"); var muteCli = localStorage.getItem("client_mute");
if (muteCli) { if (muteCli) {
var muteCli = JSON.parse(muteCli); var muteCli = JSON.parse(muteCli);
} else {
var muteCli = [];
} }
//ユーザー強調 //ユーザー強調
var useremp = localStorage.getItem("user_emp"); var useremp = localStorage.getItem("user_emp");
@ -267,7 +271,7 @@ function misskeyParse(obj, mix, acct_id, tlid, popup, mutefilter) {
if (os == "darwin") { if (os == "darwin") {
var n = new Notification('TheDesk:' + domain, options); var n = new Notification('TheDesk:' + domain, options);
} else { } else {
var nativeNotfOpt=[ var nativeNotfOpt = [
'TheDesk:' + domain, 'TheDesk:' + domain,
toot.user.name + "(" + toot.user.username + ")" + what + "\n\n" + $.strip_tagstemp(toot.note.text), toot.user.name + "(" + toot.user.username + ")" + what + "\n\n" + $.strip_tagstemp(toot.note.text),
toot.user.avatarUrl, toot.user.avatarUrl,
@ -916,7 +920,7 @@ function misskeyUserparse(obj, auth, acct_id, tlid, popup) {
if (os == "darwin") { if (os == "darwin") {
var n = new Notification('TheDesk:' + domain, options); var n = new Notification('TheDesk:' + domain, options);
} else { } else {
var nativeNotfOpt=[ var nativeNotfOpt = [
'TheDesk:' + domain, 'TheDesk:' + domain,
toot.display_name + "(" + toot.acct + ")" + ftxt, toot.display_name + "(" + toot.acct + ")" + ftxt,
toot.avatar, toot.avatar,