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', () => {