hotfix: fixed thread focus booting back to timeline while logged in,

width in chromium browsers
This commit is contained in:
ari melody 2024-07-02 20:54:41 +01:00
parent 4686a1307f
commit f5676f5b7a
Signed by: ari
GPG key ID: CF99829C92678188
4 changed files with 3 additions and 25 deletions

View file

@ -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);
}