Page MenuHomePhabricator

[keyserver/lib] introduce fetch_community_infos endpoint
ClosedPublic

Authored by ginsu on May 10 2024, 11:11 AM.
Tags
None
Referenced Files
F3495553: D11995.id41004.diff
Thu, Dec 19, 9:02 AM
F3495552: D11995.id41014.diff
Thu, Dec 19, 9:02 AM
F3495551: D11995.id40547.diff
Thu, Dec 19, 9:02 AM
F3495550: D11995.id40083.diff
Thu, Dec 19, 9:02 AM
F3495549: D11995.id40087.diff
Thu, Dec 19, 9:02 AM
F3495532: D11995.id.diff
Thu, Dec 19, 9:01 AM
F3495523: D11995.diff
Thu, Dec 19, 9:01 AM
Unknown Object (File)
Tue, Dec 17, 4:26 PM
Subscribers

Details

Summary

This diff introduces the fetch_community_infos endpoint. Similar to the fetch_primary_invite_links we will call this endpoint whenever we open the community drawer on native or when the window becomes active on web

Depends on D11978

Test Plan

Called this endpoint later in my stack and confirmed that I was getting all the correct community infos

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Harbormaster returned this revision to the author for changes because remote builds failed.May 10 2024, 11:24 AM
Harbormaster failed remote builds in B28843: Diff 40083!
ginsu requested review of this revision.May 10 2024, 2:04 PM

Similar to the fetch_primary_invite_links we will call this endpoint whenever we open the community drawer on native or when the window becomes active on web

Can you explain to your reviewers why we need to do this?

Looking at the project I think it's so that if the user goes the community settings cog and selects the Farcaster channel option, they will be able to see the Farcaster channel. Similar pattern to how we do it for invite links

tomek added inline comments.
keyserver/src/responders/community-responders.js
14 ↗(On Diff #40087)

Wouldn't that make more sense to place this validator next to FetchCommunityInfosResponse type definition?

22 ↗(On Diff #40087)

Not sure how useful it is to put withHolder in the name - this can easily become outdated by a change in fetchCommunityInfos.

This revision is now accepted and ready to land.May 13 2024, 3:13 AM
ginsu added inline comments.
keyserver/src/responders/community-responders.js
14 ↗(On Diff #40087)

It looks like we now put all our response validators in a separate location in lib/types/validators. Updating this diff to follow this new convention

cc @inka

keyserver/src/responders/community-responders.js
14 ↗(On Diff #40087)

Thank you!