Page MenuHomePhabricator

[keyserver] introduce fetchCommunityInfos
ClosedPublic

Authored by ginsu on May 8 2024, 11:56 PM.
Tags
None
Referenced Files
F3495539: D11955.id40376.diff
Thu, Dec 19, 9:02 AM
F3495538: D11955.id40372.diff
Thu, Dec 19, 9:02 AM
F3495537: D11955.id40040.diff
Thu, Dec 19, 9:02 AM
F3495536: D11955.id39965.diff
Thu, Dec 19, 9:02 AM
F3495529: D11955.id.diff
Thu, Dec 19, 9:01 AM
F3495527: D11955.diff
Thu, Dec 19, 9:01 AM
Unknown Object (File)
Sat, Dec 14, 8:20 PM
Unknown Object (File)
Thu, Dec 12, 10:47 AM
Subscribers

Details

Summary

This diff introduces fetchCommunityInfos. fetchCommunityInfos returns all the communites where the viewer where the viewer is a member

Linear task: https://linear.app/comm/issue/ENG-7916/introduce-community-info-fetchers

Depends on D11954

Test Plan

Tested calling this endpoint from the client w/ several different accounts

User account w/ no community memberships (just GENESIS):

[NODEM] communityInfos [
[NODEM] 	{
[NODEM] 		"id": "1",
[NODEM] 		"farcasterChannelID": null,
[NODEM] 		"blobHolder": null
[NODEM] 	}
[NODEM] ]

User account w/ 1 community membership + GENESIS:

[NODEM] communityInfos [
[NODEM] 	{
[NODEM] 		"id": "1",
[NODEM] 		"farcasterChannelID": null,
[NODEM] 		"blobHolder": null
[NODEM] 	},
[NODEM] 	{
[NODEM] 		"id": "83943",
[NODEM] 		"farcasterChannelID": null,
[NODEM] 		"blobHolder": null
[NODEM] 	}
[NODEM] ]

User account w/ 2 community memberships + GENESIS:

[NODEM] communityInfos [
[NODEM] 	{
[NODEM] 		"id": "1",
[NODEM] 		"farcasterChannelID": null,
[NODEM] 		"blobHolder": null
[NODEM] 	},
[NODEM] 	{
[NODEM] 		"id": "83887",
[NODEM] 		"farcasterChannelID": "farcaster",
[NODEM] 		"blobHolder": "89e7240a-c869-4896-b6ae-392d1dce20f4"
[NODEM] 	},
[NODEM] 	{
[NODEM] 		"id": "83943",
[NODEM] 		"farcasterChannelID": null,
[NODEM] 		"blobHolder": null
[NODEM] 	}
[NODEM] ]

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

ginsu edited the test plan for this revision. (Show Details)
ginsu added reviewers: tomek, kamil.
ginsu requested review of this revision.May 9 2024, 12:12 AM
tomek added inline comments.
keyserver/src/fetchers/community-fetchers.js
8–12 ↗(On Diff #39965)

We should make this readonly because spreading a type makes it writable.

32–38 ↗(On Diff #39965)
This revision is now accepted and ready to land.May 9 2024, 4:00 AM
keyserver/src/fetchers/community-fetchers.js
17 ↗(On Diff #40040)

This check doesn't make sense. Did you mean to check loggedIn?

address comments + rebase before landing

This revision was landed with ongoing or failed builds.May 20 2024, 2:58 AM
This revision was automatically updated to reflect the committed changes.