to streaming notifications with new subscription type streaming
This commit is contained in:
parent
52a8ec8033
commit
700de676d0
|
@ -116,7 +116,7 @@ function notfColumn(acct_id, tlid, sys) {
|
|||
var start = 'wss://' + domain + '/?i=' + at
|
||||
}
|
||||
}
|
||||
function notfCommon(acct_id, tlid, sys) {
|
||||
function notfCommon(acct_id, tlid, sys, stream) {
|
||||
todo('Notifications Loading...')
|
||||
var native = localStorage.getItem('nativenotf')
|
||||
var at = localStorage.getItem('acct_' + acct_id + '_at')
|
||||
|
@ -147,6 +147,10 @@ function notfCommon(acct_id, tlid, sys) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if(stream == 'only') {
|
||||
notfWS(misskey, acct_id, tlid, domain, at)
|
||||
return false
|
||||
}
|
||||
fetch(start, i)
|
||||
.then(function(response) {
|
||||
console.log('header to get param:' + response.headers.get('link'))
|
||||
|
@ -203,7 +207,7 @@ function notfCommon(acct_id, tlid, sys) {
|
|||
}
|
||||
$('#notf-box').addClass('fetched')
|
||||
todc()
|
||||
notfWS(misskey, acct_id, tlid, domain, at)
|
||||
if(stream != 'no') notfWS(misskey, acct_id, tlid, domain, at)
|
||||
})
|
||||
}
|
||||
function notfWS(misskey, acct_id, tlid, domain, at) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user