Page MenuHomePhabricator

[keyserver/lib] introduce fetch_community_infos endpoint
ClosedPublic

Authored by ginsu on May 10 2024, 11:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 15, 4:09 AM
Unknown Object (File)
Thu, Nov 14, 4:58 PM
Unknown Object (File)
Thu, Nov 14, 5:57 AM
Unknown Object (File)
Mon, Nov 11, 3:24 AM
Unknown Object (File)
Mon, Nov 11, 3:16 AM
Unknown Object (File)
Mon, Nov 11, 3:13 AM
Unknown Object (File)
Mon, Nov 11, 1:52 AM
Unknown Object (File)
Sun, Nov 10, 7:20 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
No Lint Coverage
Unit
No Test Coverage

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!