newcomer notifiation

This commit is contained in:
cutls 2022-12-05 23:12:33 +09:00
parent f5d42fa806
commit ccc6d96172
5 changed files with 34 additions and 28 deletions

View File

@ -72,7 +72,7 @@ function notfColumn(acct_id, tlid, sys) {
}
var mute = getFilterTypeByAcct(acct_id, 'notif')
//Pleromaにはmoveというtypeがあるらしい。何が互換APIじゃ
if (obj.type != 'follow' && obj.type != 'move' && obj.type != 'follow_request') {
if (obj.type !== 'follow' && obj.type !== 'move' && obj.type !== 'request' && obj.type !== 'admin.sign_up') {
if (misskey) {
templete = templete + misskeyParse([obj], 'notf', acct_id, tlid, -1, mute)
} else {
@ -192,7 +192,7 @@ function notfCommon(acct_id, tlid, sys, stream) {
}
var mute = getFilterTypeByAcct(acct_id, 'notif')
//Pleromaにはmoveというtypeがあるらしい。何が互換APIじゃ
if (obj.type != 'follow' && obj.type != 'move') {
if (obj.type !== 'follow' && obj.type !== 'move' && obj.type !== 'request' && obj.type !== 'admin.sign_up') {
if (misskey) {
templete = templete + misskeyParse([obj], 'notf', acct_id, 'notf', -1, mute)
} else {
@ -251,7 +251,7 @@ function notfWS(misskey, acct_id, tlid, domain, at) {
localStorage.setItem('lastnotf_' + acct_id, obj.id)
if (!$('#unread_' + tlid + ' .material-icons').hasClass('teal-text')) {
//markers show中はダメ
if (obj.type != 'follow' && obj.type != 'follow_request') {
if (obj.type !== 'follow' && obj.type !== 'move' && obj.type !== 'request' && obj.type !== 'admin.sign_up') {
templete = parse([obj], 'notf', acct_id, 'notf', popup)
} else if (obj.type == 'follow_request') {
templete = userparse([obj.account], 'request', acct_id, 'notf', -1)
@ -346,7 +346,7 @@ function notfmore(tlid) {
Object.keys(json).forEach(function (key) {
var obj = json[key]
var mute = getFilterTypeByAcct(acct_id, 'notif')
if (obj.type != 'follow') {
if (obj.type !== 'follow' && obj.type !== 'move' && obj.type !== 'request' && obj.type !== 'admin.sign_up') {
if (misskey) {
templete = templete + misskeyParse([obj], 'notf', acct_id, 'notf', -1, mute)
} else {

View File

@ -1217,6 +1217,8 @@ function userparse(obj, auth, acct_id, tlid, popup) {
var ftxt = lang.lang_parse_moved
} else if (auth == 'request') {
var ftxt = lang.lang_parse_request
} else if (auth == 'admin.sign_up') {
var ftxt = lang.lang_parse_signup
}
if (popup > 0 || popup == -1 || notf) {
var notftext = ftxt + '<br>'
@ -1585,7 +1587,7 @@ function mastodonBaseStreaming(acct_id) {
if (!popup) {
popup = 0
}
if (obj.type != 'follow' && obj.type != 'follow_request') {
if (obj.type !== 'follow' && obj.type !== 'move' && obj.type !== 'request' && obj.type !== 'admin.sign_up') {
template = parse([obj], 'notf', acct_id, 'notf', popup)
} else if (obj.type == 'follow_request') {
template = userparse([obj.account], 'request', acct_id, 'notf', -1)

View File

@ -176,6 +176,7 @@
"lang_showontl_botacct": "[bot]",
"lang_showontl_followed": "Following you",
"lang_parse_request": "Follow request",
"lang_parse_signup": "Newface",
"lang_showontl_notf": "Notification ",
"lang_showontl_domain": "Domain ",
"lang_showontl_listwarn": "Follow to add this user to lists.",

View File

@ -178,6 +178,8 @@
"lang_showontl_domain": "ドメイン",
"lang_showontl_listwarn": "リストに追加すんにはまずフォローしてな。",
"lang_showontl_verified": "このサイトはこの人のやつやってわかってる。",
"lang_parse_request": "フォローリクエスト",
"lang_parse_signup": "新規登録",
"lang_parse_mentioned": "が返信したで",
"lang_parse_faved": "がお気に入り登録したで",
"lang_parse_bted": "がブーストしたで",

View File

@ -177,6 +177,7 @@
"lang_showontl_botacct": "botアカウント",
"lang_showontl_followed": "フォローされています",
"lang_parse_request": "フォローリクエスト",
"lang_parse_signup": "新規登録",
"lang_showontl_notf": "通知",
"lang_showontl_domain": "ドメイン",
"lang_showontl_listwarn": "リストに追加するためにはフォローが必要です。",