Depends on D11672
Details
Tested with local prod keyserver build with physical iOS device.
Connected my farcaster account and confirmed auxUserStore was populated with farcaster mutuals:
Logs:
LOG dispatching with [{"farcasterID": "388441", "userID": "AF283B63-D6E4-4C16-A10C-ECB96CC975FF", "username": "ginsu-test4"}, {"farcasterID": "389335", "userID": "0FD9CF89-17D9-4DDA-B457-6E4FC1571786", "username": "electrichack"}]
Went on to Warpcast and unfollowed both Ginsu and Varun and upon reconnecting Farcaster account, confirmed they were both null values
On following Ginsu or Varun individually, only one of them is added to auxUserStore.
Diff Detail
- Repository
- rCOMM Comm
- Branch
- farcasterAuxUser
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
Given that we're already checking farcaster friends in a useEffect, should we consider adding a syncing action type that not only adds new farcaster friends but also removes farcaster friends that we've unfollowed as well?
Currently, the "sync" only happens by having a user reconnect their farcaster account, clearing all their prior farcaster friends, and readding everything
Back to you with questions:
should we consider adding a syncing action type that not only adds new farcaster friends but also removes farcaster friends that we've unfollowed as well
Doesn't the current approach (clearing and adding the current ones) achieve the same thing?
Currently, the "sync" only happens by having a user reconnect their farcaster account, clearing all their prior farcaster friends, and readding everything
Interesting... looking at the code, won't this get triggered on every app start?
Separately, thinking about this a bit more... is the purpose of putting FIDs in the aux user store so that we can show Farcaster accounts on user profiles in Comm? If so, shouldn't we fetch FIDs for all users in the UserStore, and not just for Farcaster friends?
Separately, thinking about this a bit more... is the purpose of putting FIDs in the aux user store so that we can show Farcaster accounts on user profiles in Comm? If >> so, shouldn't we fetch FIDs for all users in the UserStore, and not just for Farcaster friends?
Might have misunderstood the spec then. I originally believed this would be used for storing farcaster info for farcaster friends. If it's the case that we want to do this for all users in the UserStore, we'd need another identity rpc that when given a list of userIDs, returns all their associated farcaster infos.
I'll check with @ginsu
we'd need another identity rpc that when given a list of userIDs, returns all their associated farcaster infos
After you sync with @ginsu, let me know and we can discuss the best next steps here. I'm curious about the cost here, and what our alternatives might be if the cost is too high.
Going forward, let's make sure we're thoughtful about starting from concrete product use cases when scoping work.
Updated linear project with new tasks: https://linear.app/comm/project/farcaster-sqlite-followups-a2415120f443.
Canceling this task as we don't want to dispatch on just friends but on all users with farcaster integrations in our UserStore.
We should make this readonly because spreading a type makes it writable.