Add: follow request on notification

This commit is contained in:
cutls
2019-12-17 01:11:12 +09:00
parent 4bcb8104de
commit b2d98948d2
6 changed files with 42 additions and 11 deletions

View File

@@ -94,7 +94,6 @@ function media(b64, type, no, stamped) {
postMessage(['stampImage', [b64, user + '@' + domain]], '*')
return false
}
console.log(b64)
var l = 4
var c = 'abcdefghijklmnopqrstuvwxyz0123456789'
var cl = c.length

View File

@@ -70,12 +70,14 @@ function notfColumn(acct_id, tlid, sys) {
}
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 != 'follow_request') {
if (misskey) {
templete = templete + misskeyParse([obj], 'notf', acct_id, tlid, -1, mute)
} else {
templete = templete + parse([obj], 'notf', acct_id, tlid, -1, mute)
}
} else if (obj.type == 'follow_request') {
templete = templete + userparse([obj.account], 'request', acct_id, tlid, -1)
} else {
if (misskey) {
templete = templete + misskeyUserparse([obj], 'notf', acct_id, tlid, -1, mute)

View File

@@ -1060,7 +1060,9 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
</a>
</div>
<div class="action ${can_rt} ${disp['rt']} ${noauth}">
<a onclick="rt('${toot.id}','${acct_id}','${tlid}')" class="waves-effect waves-dark btn-flat actct bt-btn"
<a onclick="rt('${
toot.id
}','${acct_id}','${tlid}')" class="waves-effect waves-dark btn-flat actct bt-btn"
style="padding:0" title="${lang.lang_parse_bt}">
<i class="fas fa-retweet ${if_rt} rt_${toot.id}"></i>
<span class="rt_ct">${toot.reblogs_count}</span>
@@ -1199,6 +1201,8 @@ function userparse(obj, auth, acct_id, tlid, popup) {
}
} else if (auth == 'moved') {
var ftxt = lang.lang_parse_moved
} else if (auth == 'request') {
var ftxt = lang.lang_parse_request
}
console.log(auth, ftxt)
if (popup > 0 || popup == -1 || notf) {
@@ -1281,7 +1285,7 @@ function userparse(obj, auth, acct_id, tlid, popup) {
}
templete =
templete +
`<div class="cvo" style="padding-top:5px;" user-id="${toot.id}">
`<div class="cusr" style="padding-top:5px;" user-id="${toot.id}">
<div class="area-notice">${notftext}</div>
<div class="area-icon">
${udg}
@@ -1301,21 +1305,20 @@ function userparse(obj, auth, acct_id, tlid, popup) {
class="sml gray"
style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;user-select:auto; cursor:text;"
>
@ ${toot.acct}${locked}</span
>
@ ${toot.acct}${locked}</span>
</div>
</div>
<div class="area-toot acct-note">
${toot.note.replace(/<br\s?\/?>.+/g, '<span class="gray">...</span>')}
</div>
<div style="justify-content:space-around;top:5px" class="area-actions">
<div class="area-status">
<div class="cbadge" style="width:100px;">
${lang.lang_status_follow}:${toot.following_count}
</div>
<div class="cbadge" style="width:100px;">
${lang.lang_status_followers}:${toot.followers_count}
</div>
${latesthtml}${authhtml}
${latesthtml}
</div>
<div class="area-actions" style="justify-content: flex-end;">
${authhtml}
</div>
</div>
`