diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-11-10 16:35:13 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-11-10 16:35:13 -0600 |
commit | f6b3e5f9e05801f26b6d34e8868a4c5debd618a9 (patch) | |
tree | 65226ef4c88bc9d6a7571e9da76b69506d774ddb | |
parent | d3707f30e30bb717e95b27cc83a1121815b475b5 (diff) | |
download | voidsky-f6b3e5f9e05801f26b6d34e8868a4c5debd618a9.tar.zst |
Fix follows
-rw-r--r-- | src/state/lib/api.ts | 12 | ||||
-rw-r--r-- | src/state/models/profile-view.ts | 6 | ||||
-rw-r--r-- | todos.txt | 22 |
3 files changed, 25 insertions, 15 deletions
diff --git a/src/state/lib/api.ts b/src/state/lib/api.ts index 701475532..9bc19b78c 100644 --- a/src/state/lib/api.ts +++ b/src/state/lib/api.ts @@ -111,12 +111,18 @@ export async function unrepost(store: RootStoreModel, repostUri: string) { }) } -export async function follow(store: RootStoreModel, subject: string) { - // TODO NOW needs update +export async function follow( + store: RootStoreModel, + subjectDid: string, + subjectDeclarationCid: string, +) { return await store.api.app.bsky.graph.follow.create( {did: store.me.did || ''}, { - subject, + subject: { + did: subjectDid, + declarationCid: subjectDeclarationCid, + }, createdAt: new Date().toISOString(), }, ) diff --git a/src/state/models/profile-view.ts b/src/state/models/profile-view.ts index 4df338fc0..a64c07339 100644 --- a/src/state/models/profile-view.ts +++ b/src/state/models/profile-view.ts @@ -98,7 +98,11 @@ export class ProfileViewModel { this.myState.follow = undefined }) } else { - const res = await apilib.follow(this.rootStore, this.did) + const res = await apilib.follow( + this.rootStore, + this.did, + this.declaration.cid, + ) runInAction(() => { this.followersCount++ this.myState.follow = res.uri diff --git a/todos.txt b/todos.txt index 4ed7ef312..142b57c0d 100644 --- a/todos.txt +++ b/todos.txt @@ -2,26 +2,27 @@ Paul's todo list - General - Update to RN 0.70 - - Cache some profile/userinfo lookups + > Cache some profile/userinfo lookups - Cursor behaviors on all views - Update swipe behaviors: edge always goes back, leftmost always goes back, main connects to selector if present - Onboarding flow - - Confirm email - - Setup rpfoile? + > Confirm email + - Setup profile? - Create scene - - Set profile during creation + > Set profile during creation - Discover scenes view - * - Invite to scene - User search - - Filter out scenes from suggestions - - Filter out unconfirmed invites from suggestions + > Filter out scenes from suggestions + > Filter out unconfirmed invites from suggestions - Use pagination to make sure there are suggestions - Unconfirmed invites - User profile - Scene - - Trending - - Edit profile + > Trending + > Edit profile + > Remove member - Reply gating - Composer - View on post @@ -35,8 +36,7 @@ Paul's todo list - Follows list - Members list - Bugs - - Create account broken - - Follows are broken - - Auth token refresh seems broken + > Create account broken + > Auth token refresh seems broken - Check that sub components arent reloading too much - Titles are getting screwed up (possibly swipe related) \ No newline at end of file |