diff --git a/CHANGELOG.md b/CHANGELOG.md index c0d5021e..a64e9b32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ For more information about each release including git tags and artifacts, see [R ## [Unreleased] +### Added + +- Setting to add media from accepted NCMEC reports to a hash bank ([#1208](https://github.com/roostorg/coop/pull/1208) by [@maarkN](https://github.com/maarkN), closes [#196](https://github.com/roostorg/coop/issues/196)) + ## [1.1.0] - 2026-09-29 ### Added diff --git a/client/src/graphql/generated.ts b/client/src/graphql/generated.ts index c3ac37ae..3d93045e 100644 --- a/client/src/graphql/generated.ts +++ b/client/src/graphql/generated.ts @@ -3153,6 +3153,7 @@ export type GQLNcmecOrgSettings = { readonly ncmecAdditionalInfoEndpoint?: Maybe; readonly ncmecPreservationEndpoint?: Maybe; readonly password: Scalars['String']['output']; + readonly reportedMediaHashBankId?: Maybe; readonly termsOfService?: Maybe; readonly username: Scalars['String']['output']; }; @@ -3173,6 +3174,7 @@ export type GQLNcmecOrgSettingsInput = { readonly ncmecAdditionalInfoEndpoint?: InputMaybe; readonly ncmecPreservationEndpoint?: InputMaybe; readonly password: Scalars['String']['input']; + readonly reportedMediaHashBankId?: InputMaybe; readonly termsOfService?: InputMaybe; readonly username: Scalars['String']['input']; }; @@ -25065,7 +25067,13 @@ export type GQLNcmecOrgSettingsQuery = { readonly contactPersonPhone?: string | null; readonly mediaReviewRequirement?: GQLNcmecMediaReviewRequirement | null; readonly minMediaToReview?: number | null; + readonly reportedMediaHashBankId?: number | null; } | null; + readonly hashBanks: ReadonlyArray<{ + readonly __typename: 'HashBank'; + readonly id: string; + readonly name: string; + }>; readonly myOrg?: { readonly __typename: 'Org'; readonly hasNCMECReportingEnabled: boolean; @@ -44318,6 +44326,11 @@ export const GQLNcmecOrgSettingsDocument = gql` contactPersonPhone mediaReviewRequirement minMediaToReview + reportedMediaHashBankId + } + hashBanks { + id + name } myOrg { hasNCMECReportingEnabled diff --git a/client/src/webpages/settings/NCMECSettings.tsx b/client/src/webpages/settings/NCMECSettings.tsx index 1fd50124..f4390e5d 100644 --- a/client/src/webpages/settings/NCMECSettings.tsx +++ b/client/src/webpages/settings/NCMECSettings.tsx @@ -48,6 +48,11 @@ gql` contactPersonPhone mediaReviewRequirement minMediaToReview + reportedMediaHashBankId + } + hashBanks { + id + name } myOrg { hasNCMECReportingEnabled @@ -83,6 +88,7 @@ type NcmecSettings = { contactPersonPhone: string; mediaReviewRequirement: GQLNcmecMediaReviewRequirement; minMediaToReview: string; + reportedMediaHashBankId: string; }; export default function NCMECSettings() { @@ -104,6 +110,7 @@ export default function NCMECSettings() { contactPersonPhone: '', mediaReviewRequirement: GQLNcmecMediaReviewRequirement.All, minMediaToReview: '1', + reportedMediaHashBankId: '', }); const { loading, error, data } = useGQLNcmecOrgSettingsQuery({ @@ -149,6 +156,8 @@ export default function NCMECSettings() { data.ncmecOrgSettings.mediaReviewRequirement ?? GQLNcmecMediaReviewRequirement.All, minMediaToReview: String(data.ncmecOrgSettings.minMediaToReview ?? 1), + reportedMediaHashBankId: + data.ncmecOrgSettings.reportedMediaHashBankId?.toString() ?? '', }); } }, [data?.ncmecOrgSettings]); @@ -237,6 +246,9 @@ export default function NCMECSettings() { contactPersonPhone: settings.contactPersonPhone || null, mediaReviewRequirement: settings.mediaReviewRequirement, minMediaToReview: isMinimumPolicy ? parsedMinMedia : null, + reportedMediaHashBankId: settings.reportedMediaHashBankId + ? Number(settings.reportedMediaHashBankId) + : null, }, }, }); @@ -573,6 +585,43 @@ export default function NCMECSettings() { +
+ + + + Media from each report accepted by NCMEC is added to this bank so + it can be matched if it is uploaded again. Only applies when + reports are sent to the NCMEC production endpoint. + +
+