diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-11-10 16:30:14 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-11-10 16:30:14 -0600 |
commit | d3707f30e30bb717e95b27cc83a1121815b475b5 (patch) | |
tree | 57fcb61e9e937949526713a778e171a6676c9acf /src/state/models/profile-view.ts | |
parent | ecf56729b0da535f1d0b794268c7856836e76bd6 (diff) | |
download | voidsky-d3707f30e30bb717e95b27cc83a1121815b475b5.tar.zst |
Implement scene invitation and membership controls
Diffstat (limited to 'src/state/models/profile-view.ts')
-rw-r--r-- | src/state/models/profile-view.ts | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/state/models/profile-view.ts b/src/state/models/profile-view.ts index 62a17a6fd..4df338fc0 100644 --- a/src/state/models/profile-view.ts +++ b/src/state/models/profile-view.ts @@ -1,6 +1,7 @@ import {makeAutoObservable, runInAction} from 'mobx' import * as GetProfile from '../../third-party/api/src/client/types/app/bsky/actor/getProfile' import * as Profile from '../../third-party/api/src/client/types/app/bsky/actor/profile' +import {Declaration} from './_common' import {RootStoreModel} from './root-store' import * as apilib from '../lib/api' @@ -9,6 +10,7 @@ export const ACTOR_TYPE_SCENE = 'app.bsky.system.actorScene' export class ProfileViewMyStateModel { follow?: string + member?: string constructor() { makeAutoObservable(this) @@ -26,7 +28,10 @@ export class ProfileViewModel { // data did: string = '' handle: string = '' - actorType = ACTOR_TYPE_USER + declaration: Declaration = { + cid: '', + actorType: '', + } creator: string = '' displayName?: string description?: string @@ -64,11 +69,11 @@ export class ProfileViewModel { } get isUser() { - return this.actorType === ACTOR_TYPE_USER + return this.declaration.actorType === ACTOR_TYPE_USER } get isScene() { - return this.actorType === ACTOR_TYPE_SCENE + return this.declaration.actorType === ACTOR_TYPE_SCENE } // public api @@ -145,7 +150,7 @@ export class ProfileViewModel { console.log(res.data) this.did = res.data.did this.handle = res.data.handle - this.actorType = res.data.actorType + Object.assign(this.declaration, res.data.declaration) this.creator = res.data.creator this.displayName = res.data.displayName this.description = res.data.description |