Use same intervention flag text in send and view
This commit is contained in:
parent
ed4991a5b1
commit
b022e2f800
6 changed files with 78 additions and 66 deletions
|
|
@ -109,6 +109,12 @@ const ruleScreenshotC2PA = (): FlagMatchRule[] => {
|
|||
match: [C2PASourceTypeScreenCapture],
|
||||
description: "Screen capture",
|
||||
},
|
||||
{
|
||||
field:
|
||||
"integrity/c2pa/manifest_info/manifests[]/assertions[label=c2pa.actions.v2]/data/actions[action=c2pa.created]/digitalSourceType",
|
||||
match: [C2PASourceTypeScreenCapture],
|
||||
description: "Screen capture",
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
|
|
@ -131,6 +137,12 @@ const ruleCamera = (): FlagMatchRule[] => {
|
|||
match: [C2PASourceTypeDigitalCapture, C2PASourceTypeComputationalCapture, C2PASourceTypeCompositeCapture],
|
||||
description: "Captured by camera",
|
||||
},
|
||||
{
|
||||
field:
|
||||
"integrity/c2pa/manifest_info/manifests[]/assertions[label=c2pa.actions.v2]/data/actions[action=c2pa.created]/digitalSourceType",
|
||||
match: [C2PASourceTypeDigitalCapture, C2PASourceTypeComputationalCapture, C2PASourceTypeCompositeCapture],
|
||||
description: "Captured by camera",
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
|
|
@ -142,6 +154,12 @@ const ruleAiGenerated = (): FlagMatchRule[] => {
|
|||
match: [C2PASourceTypeTrainedAlgorithmicMedia, C2PASourceTypeCompositeWithTrainedAlgorithmicMedia],
|
||||
description: "Generated by AI",
|
||||
},
|
||||
{
|
||||
field:
|
||||
"integrity/c2pa/manifest_info/manifests[]/assertions[label=c2pa.actions.v2]/data/actions[action=c2pa.created]/digitalSourceType",
|
||||
match: [C2PASourceTypeTrainedAlgorithmicMedia, C2PASourceTypeCompositeWithTrainedAlgorithmicMedia],
|
||||
description: "Generated by AI",
|
||||
},
|
||||
];
|
||||
};
|
||||
|
||||
|
|
@ -319,10 +337,16 @@ export const extractProofHintFlags = (proof?: Proof): ProofHintFlags | undefined
|
|||
let dateCreated: Date | undefined = undefined;
|
||||
let dateCreatedSource: ProofHintFlagSource | undefined = undefined;
|
||||
|
||||
const creationAction = extractFlagValues(
|
||||
let creationAction = extractFlagValues(
|
||||
"integrity/c2pa/manifest_info/manifests[]/assertions[label=c2pa.actions]/data/actions[action=c2pa.created]",
|
||||
rootMatchPath
|
||||
);
|
||||
if (creationAction.length == 0) {
|
||||
creationAction = extractFlagValues(
|
||||
"integrity/c2pa/manifest_info/manifests[]/assertions[label=c2pa.actions.v2]/data/actions[action=c2pa.created]",
|
||||
rootMatchPath
|
||||
);
|
||||
}
|
||||
if (creationAction.length > 0) {
|
||||
source = softwareAgentFromAction(creationAction[0]);
|
||||
dateCreated = getFirstWithDataAsDate(["when", "../../metadata/dateTime", "../../../signature_info/time"], creationAction[0].path);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue