Page MenuHomePhabricator

[keyserver] introduce fetchCommunityInfos
ClosedPublic

Authored by ginsu on May 8 2024, 11:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Nov 16, 12:03 PM
Unknown Object (File)
Tue, Nov 12, 11:22 AM
Unknown Object (File)
Mon, Nov 11, 5:03 AM
Unknown Object (File)
Sun, Nov 10, 10:44 PM
Unknown Object (File)
Sun, Nov 10, 5:59 PM
Unknown Object (File)
Sun, Nov 10, 4:05 PM
Unknown Object (File)
Sun, Nov 10, 11:42 AM
Unknown Object (File)
Fri, Nov 8, 7:16 PM
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.