fix: auto logout on stale token (#144)
This commit is contained in:
parent
2d16c4868e
commit
94f2f95bcf
3 changed files with 35 additions and 5 deletions
|
@ -78,3 +78,17 @@ export function directMessageUser(account: Account) {
|
|||
visibility: 'direct',
|
||||
}))
|
||||
}
|
||||
|
||||
export function clearUserDrafts(account?: Account) {
|
||||
if (!account)
|
||||
account = currentUser.value?.account
|
||||
|
||||
if (!account)
|
||||
return
|
||||
|
||||
const id = `${account.acct}@${currentUser.value?.server}`
|
||||
if (!allDrafts.value[id])
|
||||
return
|
||||
|
||||
delete allDrafts.value[id]
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue