diff options
Diffstat (limited to 'src/state/models/me.ts')
-rw-r--r-- | src/state/models/me.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/state/models/me.ts b/src/state/models/me.ts index 333cf5626..7a94d63ac 100644 --- a/src/state/models/me.ts +++ b/src/state/models/me.ts @@ -3,7 +3,7 @@ import {RootStoreModel} from './root-store' export class MeModel { did?: string - name?: string + handle?: string displayName?: string description?: string notificationCount: number = 0 @@ -14,7 +14,7 @@ export class MeModel { clear() { this.did = undefined - this.name = undefined + this.handle = undefined this.displayName = undefined this.description = undefined this.notificationCount = 0 @@ -23,9 +23,9 @@ export class MeModel { async load() { const sess = this.rootStore.session if (sess.isAuthed && sess.data) { - this.did = sess.data.userdid || '' - this.name = sess.data.username - const profile = await this.rootStore.api.app.bsky.getProfile({ + this.did = sess.data.did || '' + this.handle = sess.data.handle + const profile = await this.rootStore.api.app.bsky.actor.getProfile({ user: this.did, }) runInAction(() => { @@ -43,7 +43,7 @@ export class MeModel { } async fetchStateUpdate() { - const res = await this.rootStore.api.app.bsky.getNotificationCount({}) + const res = await this.rootStore.api.app.bsky.notification.getCount() runInAction(() => { this.notificationCount = res.data.count }) |