hotfix: fixed thread focus booting back to timeline while logged in,
width in chromium browsers
This commit is contained in:
parent
4686a1307f
commit
f5676f5b7a
4 changed files with 3 additions and 25 deletions
|
@ -11,13 +11,11 @@ const save_name = "campfire";
|
|||
export class Client {
|
||||
instance;
|
||||
app;
|
||||
user;
|
||||
#cache;
|
||||
|
||||
constructor() {
|
||||
this.instance = null;
|
||||
this.app = null;
|
||||
this.user = null;
|
||||
this.cache = {
|
||||
users: {},
|
||||
emojis: {},
|
||||
|
@ -76,25 +74,6 @@ export class Client {
|
|||
return await api.revokeToken();
|
||||
}
|
||||
|
||||
async getClientUser() {
|
||||
// already known
|
||||
if (this.user) return this.user;
|
||||
|
||||
// cannot provide- not logged in
|
||||
if (!this.app || !this.app.token) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// logged in- attempt to retrieve using token
|
||||
const data = await api.verifyCredentials();
|
||||
if (!data) {
|
||||
return false;
|
||||
}
|
||||
const user = await api.parseUser(data);
|
||||
console.log(`Logged in as @${user.username}@${user.host}`);
|
||||
return user;
|
||||
}
|
||||
|
||||
async getNotifications(since_id, limit, types) {
|
||||
return await api.getNotifications(since_id, limit, types);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue