Page MenuHomePhabricator

[keyserver] introduce fetchCommunityInfos
ClosedPublic

Authored by ginsu on May 8 2024, 11:56 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 26, 2:28 AM
Unknown Object (File)
Thu, Sep 26, 2:28 AM
Unknown Object (File)
Mon, Sep 9, 12:22 PM
Unknown Object (File)
Mon, Sep 9, 12:22 PM
Unknown Object (File)
Mon, Sep 9, 12:20 PM
Unknown Object (File)
Aug 26 2024, 7:33 PM
Unknown Object (File)
Aug 26 2024, 7:32 PM
Unknown Object (File)
Aug 26 2024, 2:39 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
No Lint Coverage
Unit
No Test Coverage

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.