Page MenuHomePhorge

D13397.1768382255.diff
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

D13397.1768382255.diff

diff --git a/keyserver/src/responders/community-responders.js b/keyserver/src/responders/community-responders.js
--- a/keyserver/src/responders/community-responders.js
+++ b/keyserver/src/responders/community-responders.js
@@ -1,8 +1,14 @@
// @flow
-import type { FetchCommunityInfosResponse } from 'lib/types/community-types.js';
+import type {
+ FetchCommunityInfosResponse,
+ FetchAllCommunityInfosWithNamesResponse,
+} from 'lib/types/community-types.js';
-import { fetchCommunityInfos } from '../fetchers/community-fetchers.js';
+import {
+ fetchCommunityInfos,
+ fetchAllCommunityInfosWithNames,
+} from '../fetchers/community-fetchers.js';
import { Viewer } from '../session/viewer.js';
async function fetchCommunityInfosResponder(
@@ -18,4 +24,19 @@
return { communityInfos };
}
-export { fetchCommunityInfosResponder };
+async function fetchAllCommunityInfosWithNamesResponder(
+ viewer: Viewer,
+): Promise<FetchAllCommunityInfosWithNamesResponse> {
+ if (!viewer.loggedIn) {
+ return { allCommunityInfosWithNames: [] };
+ }
+
+ const allCommunityInfosWithNames = await fetchAllCommunityInfosWithNames();
+
+ return { allCommunityInfosWithNames };
+}
+
+export {
+ fetchCommunityInfosResponder,
+ fetchAllCommunityInfosWithNamesResponder,
+};
diff --git a/lib/types/community-types.js b/lib/types/community-types.js
--- a/lib/types/community-types.js
+++ b/lib/types/community-types.js
@@ -39,6 +39,10 @@
+communityInfos: $ReadOnlyArray<ServerCommunityInfo>,
};
+export type FetchAllCommunityInfosWithNamesResponse = {
+ +allCommunityInfosWithNames: $ReadOnlyArray<ServerCommunityInfoWithCommunityName>,
+};
+
export type CreateOrUpdateFarcasterChannelTagRequest = {
+commCommunityID: string,
+farcasterChannelID: string,

File Metadata

Mime Type
text/plain
Expires
Wed, Jan 14, 9:17 AM (2 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5931279
Default Alt Text
D13397.1768382255.diff (1 KB)

Event Timeline