With the introduction of the farcasterBot, it's possible for a user to be added to a community and not have this community in their communityStore. in this scenario, the UpdateHandler should handle adding the community thread to the threadStore. the handler in this diff will check if any of the COMMUNITY_ROOT threads are missing in the communityStore. If there are missing communities, callFetchCommunityInfos is invoked
Details
Details
applied this patch and confirmed with logs that my handler was invoked. also confirmed that communityStore was immediately updated and thread avatars were immediately rendered
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Branch
- arcpatch-D13810
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
Comment Actions
There’s a risk here that if a community root ends up in the thread store, but its keyserver isn’t returning it when queried here, then we could end up querying over and over. Can you make sure that we only trigger a query once for each ID? We have something similar in UserInfosHandler: https://github.com/CommE2E/comm/blob/603f6924736f20014f39c6b57dffe4e39c9ba7d4/lib/handlers/user-infos-handler.react.js#L43
lib/components/sync-community-store-handler.react.js | ||
---|---|---|
29 ↗ | (On Diff #45440) | You aren’t considering announcement roots. There’s a utility function to check if a thread type is a community root |