Page MenuHomePhabricator

[keyserver] introduce fetchCommunityInfos
ClosedPublic

Authored by ginsu on May 8 2024, 11:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 22, 4:43 AM
Unknown Object (File)
Wed, Jun 19, 9:49 AM
Unknown Object (File)
Fri, Jun 14, 5:16 AM
Unknown Object (File)
Wed, Jun 12, 5:29 PM
Unknown Object (File)
Wed, Jun 12, 4:33 PM
Unknown Object (File)
Tue, Jun 11, 8:14 AM
Unknown Object (File)
Mon, Jun 10, 10:36 AM
Unknown Object (File)
Mon, Jun 10, 5:02 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.