diff --git a/lib/shared/dm-ops/create-thread-spec.js b/lib/shared/dm-ops/create-thread-spec.js --- a/lib/shared/dm-ops/create-thread-spec.js +++ b/lib/shared/dm-ops/create-thread-spec.js @@ -75,7 +75,6 @@ description, color, containingThreadID, - community, sourceMessageID, repliesCount, pinnedCount, @@ -117,7 +116,6 @@ avatar, description, containingThreadID, - community, }; if (sourceMessageID) { newThread.sourceMessageID = sourceMessageID; diff --git a/lib/shared/thread-utils.js b/lib/shared/thread-utils.js --- a/lib/shared/thread-utils.js +++ b/lib/shared/thread-utils.js @@ -500,7 +500,6 @@ parentThreadInfo, thickThreadType, ), - community: getCommunity(parentThreadInfo), members: members.map(member => minimallyEncodeMemberInfo({ id: member.id, diff --git a/lib/types/dm-ops.js b/lib/types/dm-ops.js --- a/lib/types/dm-ops.js +++ b/lib/types/dm-ops.js @@ -42,7 +42,6 @@ +description?: ?string, +color?: ?string, +containingThreadID?: ?string, - +community?: ?string, +sourceMessageID?: ?string, +repliesCount?: ?number, +pinnedCount?: ?number, @@ -61,7 +60,6 @@ description: t.maybe(t.String), color: t.maybe(t.String), containingThreadID: t.maybe(t.String), - community: t.maybe(t.String), sourceMessageID: t.maybe(t.String), repliesCount: t.maybe(t.Number), pinnedCount: t.maybe(t.Number), diff --git a/lib/types/thread-types.js b/lib/types/thread-types.js --- a/lib/types/thread-types.js +++ b/lib/types/thread-types.js @@ -131,7 +131,6 @@ +creationTime: number, // millisecond timestamp +parentThreadID?: ?string, +containingThreadID?: ?string, - +community?: ?string, +members: $ReadOnlyArray, +roles: { +[id: string]: ClientLegacyRoleInfo }, +currentUser: LegacyThreadCurrentUserInfo, diff --git a/lib/utils/thread-ops-utils.js b/lib/utils/thread-ops-utils.js --- a/lib/utils/thread-ops-utils.js +++ b/lib/utils/thread-ops-utils.js @@ -44,6 +44,7 @@ roles: JSON.stringify(rawThreadInfo.roles), currentUser: JSON.stringify(rawThreadInfo.currentUser), avatar: rawThreadInfo.avatar ? JSON.stringify(rawThreadInfo.avatar) : null, + community: rawThreadInfo.community, }; } @@ -108,7 +109,6 @@ creationTime: Number(clientDBThreadInfo.creationTime), parentThreadID: clientDBThreadInfo.parentThreadID, containingThreadID: clientDBThreadInfo.containingThreadID, - community: clientDBThreadInfo.community, members: minimallyEncodedMembers, roles: minimallyEncodedRoles, currentUser: minimallyEncodedCurrentUser, diff --git a/native/redux/persist.js b/native/redux/persist.js --- a/native/redux/persist.js +++ b/native/redux/persist.js @@ -93,7 +93,10 @@ type RawMessageInfo, } from 'lib/types/message-types.js'; import { minimallyEncodeRawThreadInfoWithMemberPermissions } from 'lib/types/minimally-encoded-thread-permissions-types.js'; -import type { RawThreadInfo } from 'lib/types/minimally-encoded-thread-permissions-types.js'; +import type { + RawThreadInfo, + ThinRawThreadInfo, +} from 'lib/types/minimally-encoded-thread-permissions-types.js'; import type { ReportStore, ClientReportCreationRequest, @@ -103,6 +106,7 @@ import type { ClientDBThreadInfo, LegacyRawThreadInfo, + LegacyThinRawThreadInfo, MixedRawThreadInfos, RawThreadInfos, } from 'lib/types/thread-types.js'; @@ -398,7 +402,7 @@ ], }, }), - [28]: (state: AppState) => { + [28]: (state: any) => { const threadParentToChildren: { [string]: string[] } = {}; for (const threadID in state.threadStore.threadInfos) { const threadInfo = state.threadStore.threadInfos[threadID]; @@ -420,7 +424,7 @@ } const threadInfos: { - [string]: LegacyRawThreadInfo | RawThreadInfo, + [string]: LegacyThinRawThreadInfo | ThinRawThreadInfo, } = {}; const stack = [...rootIDs]; while (stack.length > 0) {