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)
Mon, Jun 24, 5:30 PM
Unknown Object (File)
Mon, Jun 24, 10:06 AM
Unknown Object (File)
Sun, Jun 23, 9:34 PM
Unknown Object (File)
Sun, Jun 23, 9:14 PM
Unknown Object (File)
Thu, Jun 20, 10:22 AM
Unknown Object (File)
Wed, Jun 19, 11:07 PM
Unknown Object (File)
Wed, Jun 19, 7:50 PM
Unknown Object (File)
Wed, Jun 19, 9:49 AM
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!