Sometimes cannot use with Mastodon continuously
This commit is contained in:
parent
2e84fc5cdc
commit
2135f2e4f4
|
@ -307,10 +307,13 @@ async function refresh(target, loadskip) {
|
||||||
let at = obj[target].at
|
let at = obj[target].at
|
||||||
if (obj[target].rt) {
|
if (obj[target].rt) {
|
||||||
console.log('refresh access token')
|
console.log('refresh access token')
|
||||||
at = await refreshPleromaAt(obj[target])
|
const atk = await refreshPleromaAt(obj[target])
|
||||||
localStorage.setItem(`acct_${target}_at`, at)
|
if (atk) {
|
||||||
obj[target].at = at
|
at = atk
|
||||||
localStorage.setItem(`multi`, JSON.stringify(obj))
|
localStorage.setItem(`acct_${target}_at`, at)
|
||||||
|
obj[target].at = at
|
||||||
|
localStorage.setItem(`multi`, JSON.stringify(obj))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var start = 'https://' + obj[target].domain + '/api/v1/accounts/verify_credentials'
|
var start = 'https://' + obj[target].domain + '/api/v1/accounts/verify_credentials'
|
||||||
fetch(start, {
|
fetch(start, {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user