diff --git a/src/claimDefinitions/devto.js b/src/claimDefinitions/devto.js index b6ed1b9..81f4656 100644 --- a/src/claimDefinitions/devto.js +++ b/src/claimDefinitions/devto.js @@ -47,7 +47,7 @@ const processURI = (uri) => { } }, claim: { - format: E.ClaimFormat.MESSAGE, + format: E.ClaimFormat.URI, relation: E.ClaimRelation.CONTAINS, path: ['body_markdown'] } diff --git a/src/claimDefinitions/discourse.js b/src/claimDefinitions/discourse.js index d044aa3..e2c376b 100644 --- a/src/claimDefinitions/discourse.js +++ b/src/claimDefinitions/discourse.js @@ -47,7 +47,7 @@ const processURI = (uri) => { } }, claim: { - format: E.ClaimFormat.MESSAGE, + format: E.ClaimFormat.URI, relation: E.ClaimRelation.CONTAINS, path: ['user', 'bio_raw'] } diff --git a/src/claimDefinitions/gitea.js b/src/claimDefinitions/gitea.js index dab70a8..cf2ad16 100644 --- a/src/claimDefinitions/gitea.js +++ b/src/claimDefinitions/gitea.js @@ -47,7 +47,7 @@ const processURI = (uri) => { } }, claim: { - format: E.ClaimFormat.MESSAGE, + format: E.ClaimFormat.URI, relation: E.ClaimRelation.EQUALS, path: ['description'] } diff --git a/src/claimDefinitions/github.js b/src/claimDefinitions/github.js index c90f688..3849596 100644 --- a/src/claimDefinitions/github.js +++ b/src/claimDefinitions/github.js @@ -47,7 +47,7 @@ const processURI = (uri) => { } }, claim: { - format: E.ClaimFormat.MESSAGE, + format: E.ClaimFormat.URI, relation: E.ClaimRelation.CONTAINS, path: ['files', 'openpgp.md', 'content'] } diff --git a/src/claimDefinitions/gitlab.js b/src/claimDefinitions/gitlab.js index 130d5ec..e4a2923 100644 --- a/src/claimDefinitions/gitlab.js +++ b/src/claimDefinitions/gitlab.js @@ -47,7 +47,7 @@ const processURI = (uri) => { } }, claim: { - format: E.ClaimFormat.MESSAGE, + format: E.ClaimFormat.URI, relation: E.ClaimRelation.EQUALS, path: ['description'] } diff --git a/src/claimDefinitions/liberapay.js b/src/claimDefinitions/liberapay.js index 8e0faa8..2feb1f8 100644 --- a/src/claimDefinitions/liberapay.js +++ b/src/claimDefinitions/liberapay.js @@ -47,7 +47,7 @@ const processURI = (uri) => { } }, claim: { - format: E.ClaimFormat.MESSAGE, + format: E.ClaimFormat.URI, relation: E.ClaimRelation.CONTAINS, path: ['statements', 'content'] } diff --git a/src/claimDefinitions/lobsters.js b/src/claimDefinitions/lobsters.js index a33e9e6..020a9de 100644 --- a/src/claimDefinitions/lobsters.js +++ b/src/claimDefinitions/lobsters.js @@ -47,7 +47,7 @@ const processURI = (uri) => { } }, claim: { - format: E.ClaimFormat.MESSAGE, + format: E.ClaimFormat.URI, relation: E.ClaimRelation.CONTAINS, path: ['about'] } diff --git a/src/claimDefinitions/matrix.js b/src/claimDefinitions/matrix.js index d2c8bdb..62d94aa 100644 --- a/src/claimDefinitions/matrix.js +++ b/src/claimDefinitions/matrix.js @@ -61,7 +61,7 @@ const processURI = (uri) => { } }, claim: { - format: E.ClaimFormat.MESSAGE, + format: E.ClaimFormat.URI, relation: E.ClaimRelation.CONTAINS, path: ['content', 'body'] } diff --git a/src/claimDefinitions/reddit.js b/src/claimDefinitions/reddit.js index d9968b3..859f970 100644 --- a/src/claimDefinitions/reddit.js +++ b/src/claimDefinitions/reddit.js @@ -47,7 +47,7 @@ const processURI = (uri) => { } }, claim: { - format: E.ClaimFormat.MESSAGE, + format: E.ClaimFormat.URI, relation: E.ClaimRelation.CONTAINS, path: ['data', 'children', 'data', 'selftext'] } diff --git a/src/claimDefinitions/stackexchange.js b/src/claimDefinitions/stackexchange.js index 949314d..a923b39 100644 --- a/src/claimDefinitions/stackexchange.js +++ b/src/claimDefinitions/stackexchange.js @@ -49,7 +49,7 @@ const processURI = (uri) => { } }, claim: { - format: E.ClaimFormat.MESSAGE, + format: E.ClaimFormat.URI, relation: E.ClaimRelation.CONTAINS, path: ['items', 'about_me'] } diff --git a/src/claimDefinitions/twitter.js b/src/claimDefinitions/twitter.js index 026d1a1..7101585 100644 --- a/src/claimDefinitions/twitter.js +++ b/src/claimDefinitions/twitter.js @@ -46,7 +46,7 @@ const processURI = (uri) => { } }, claim: { - format: E.ClaimFormat.MESSAGE, + format: E.ClaimFormat.URI, relation: E.ClaimRelation.CONTAINS, path: [] } diff --git a/src/claimDefinitions/xmpp.js b/src/claimDefinitions/xmpp.js index c862dce..29c9cb3 100644 --- a/src/claimDefinitions/xmpp.js +++ b/src/claimDefinitions/xmpp.js @@ -47,7 +47,7 @@ const processURI = (uri) => { } }, claim: { - format: E.ClaimFormat.MESSAGE, + format: E.ClaimFormat.URI, relation: E.ClaimRelation.CONTAINS, path: [] } diff --git a/src/enums.js b/src/enums.js index 6e16b53..c2813fe 100644 --- a/src/enums.js +++ b/src/enums.js @@ -95,9 +95,7 @@ const ClaimFormat = { /** `openpgp4fpr:123123123` */ URI: 0, /** `123123123` */ - FINGERPRINT: 1, - /** `[Verifying my OpenPGP key: openpgp4fpr:123123123]` */ - MESSAGE: 2 + FINGERPRINT: 1 } Object.freeze(ClaimFormat) diff --git a/src/utils.js b/src/utils.js index fd5430c..56fb7c0 100644 --- a/src/utils.js +++ b/src/utils.js @@ -56,8 +56,6 @@ const generateClaim = (fingerprint, format) => { switch (format) { case E.ClaimFormat.URI: return `openpgp4fpr:${fingerprint}` - case E.ClaimFormat.MESSAGE: - return `[Verifying my OpenPGP key: openpgp4fpr:${fingerprint}]` case E.ClaimFormat.FINGERPRINT: return fingerprint default: diff --git a/test/utils.test.js b/test/utils.test.js index 18e7d58..9c52103 100644 --- a/test/utils.test.js +++ b/test/utils.test.js @@ -28,11 +28,6 @@ describe('utils.generateClaim', () => { doipjs.utils.generateClaim('123456789', doipjs.enums.ClaimFormat.URI) ).to.equal('openpgp4fpr:123456789') }) - it('should generate a correct "message" claim', () => { - expect( - doipjs.utils.generateClaim('123456789', doipjs.enums.ClaimFormat.MESSAGE) - ).to.equal('[Verifying my OpenPGP key: openpgp4fpr:123456789]') - }) it('should generate a correct "fingerprint" claim', () => { expect( doipjs.utils.generateClaim(