diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-11-04 17:39:54 -0500 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-11-04 17:39:54 -0500 |
commit | f333a90fab79d582bbb7f9114f0b005fdb1cae8b (patch) | |
tree | 631755be2dd6976e9d0efd90f33751c52a09ef37 /src/state/models/me.ts | |
parent | 8ae6e67eea8890f639dbaa9423e99cad5e28502f (diff) | |
download | voidsky-f333a90fab79d582bbb7f9114f0b005fdb1cae8b.tar.zst |
Update to the latest APIs
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 }) |