Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3495526
D11954.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D11954.diff
View Options
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
@@ -1,9 +1,7 @@
// @flow
-import type { EnabledApps } from './enabled-apps.js';
-
export type CommunityInfo = {
- +enabledApps: EnabledApps,
+ +farcasterChannelID: ?string,
};
export type CommunityInfos = { +[threadID: string]: CommunityInfo };
diff --git a/web/shared-worker/queries/communities-queries.test.js b/web/shared-worker/queries/communities-queries.test.js
--- a/web/shared-worker/queries/communities-queries.test.js
+++ b/web/shared-worker/queries/communities-queries.test.js
@@ -14,21 +14,11 @@
const FILE_PATH = 'test.sqlite';
const TEST_COMMUNITY_1: CommunityInfo = {
- enabledApps: {
- calendar: false,
- wiki: false,
- tasks: true,
- files: true,
- },
+ farcasterChannelID: null,
};
const TEST_COMMUNITY_2: CommunityInfo = {
- enabledApps: {
- calendar: true,
- wiki: false,
- tasks: false,
- files: false,
- },
+ farcasterChannelID: 'test',
};
describe('Community Store queries', () => {
@@ -82,14 +72,9 @@
expect(communities).toHaveLength(0);
});
- it('should update community enabled apps', () => {
+ it('should update community farcaster ID', () => {
const community2Updated: CommunityInfo = {
- enabledApps: {
- calendar: true,
- wiki: true,
- tasks: true,
- files: true,
- },
+ farcasterChannelID: 'test2',
};
queryExecutor?.replaceCommunity(
@@ -110,10 +95,7 @@
communityStoreOpsHandlers.translateClientDBData(communities);
expect(communitiesFromDB['2']).toBeDefined();
- expect(communitiesFromDB['2'].enabledApps.calendar).toBe(true);
- expect(communitiesFromDB['2'].enabledApps.wiki).toBe(true);
- expect(communitiesFromDB['2'].enabledApps.tasks).toBe(true);
- expect(communitiesFromDB['2'].enabledApps.files).toBe(true);
+ expect(communitiesFromDB['2'].farcasterChannelID).toBe('test2');
});
it('should remove community', () => {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Dec 20, 9:01 AM (15 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2681248
Default Alt Text
D11954.diff (2 KB)
Attached To
Mode
D11954: [lib/web] update CommunityInfo type
Attached
Detach File
Event Timeline
Log In to Comment