diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-11-23 14:53:33 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-11-23 14:53:33 -0600 |
commit | 4eb8bc1249ccf6afaa0c77695057a13379cf1aa1 (patch) | |
tree | 788f4d0b0107ff521388f4fc8f2ff413f7a95f18 /src/state/models/profile-view.ts | |
parent | 2b37b6549b6cb17db582a81a2bdca8316b1e4861 (diff) | |
download | voidsky-4eb8bc1249ccf6afaa0c77695057a13379cf1aa1.tar.zst |
Detect links in profile bios
Diffstat (limited to 'src/state/models/profile-view.ts')
-rw-r--r-- | src/state/models/profile-view.ts | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/state/models/profile-view.ts b/src/state/models/profile-view.ts index 8386fbbc4..927374cc6 100644 --- a/src/state/models/profile-view.ts +++ b/src/state/models/profile-view.ts @@ -1,6 +1,8 @@ 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 {Entity} from '../../third-party/api/src/client/types/app/bsky/feed/post' +import {extractEntities} from '../../lib/strings' import {Declaration} from './_common' import {RootStoreModel} from './root-store' import * as apilib from '../lib/api' @@ -41,6 +43,9 @@ export class ProfileViewModel { postsCount: number = 0 myState = new ProfileViewMyStateModel() + // added data + descriptionEntities?: Entity[] + constructor( public rootStore: RootStoreModel, params: GetProfile.QueryParams, @@ -163,5 +168,6 @@ export class ProfileViewModel { if (res.data.myState) { Object.assign(this.myState, res.data.myState) } + this.descriptionEntities = extractEntities(this.description || '') } } |