From 166d8d5cf3ae46dba248c380a477f745482316a8 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Sun, 12 Mar 2023 21:44:32 +0100 Subject: [PATCH] feat: Add EntityEncodingFormat to claim defs --- src/claimDefinitions/activitypub.js | 3 +++ src/claimDefinitions/discourse.js | 1 + src/claimDefinitions/dns.js | 1 + src/claimDefinitions/forem.js | 1 + src/claimDefinitions/forgejo.js | 1 + src/claimDefinitions/gitea.js | 1 + src/claimDefinitions/github.js | 1 + src/claimDefinitions/gitlab.js | 1 + src/claimDefinitions/hackernews.js | 1 + src/claimDefinitions/irc.js | 1 + src/claimDefinitions/keybase.js | 1 + src/claimDefinitions/liberapay.js | 1 + src/claimDefinitions/lichess.js | 1 + src/claimDefinitions/lobsters.js | 1 + src/claimDefinitions/matrix.js | 1 + src/claimDefinitions/owncast.js | 1 + src/claimDefinitions/reddit.js | 1 + src/claimDefinitions/stackexchange.js | 1 + src/claimDefinitions/telegram.js | 1 + src/claimDefinitions/twitter.js | 1 + src/claimDefinitions/xmpp.js | 13 ++++++------- 21 files changed, 28 insertions(+), 7 deletions(-) diff --git a/src/claimDefinitions/activitypub.js b/src/claimDefinitions/activitypub.js index 4d58558..e6712bc 100644 --- a/src/claimDefinitions/activitypub.js +++ b/src/claimDefinitions/activitypub.js @@ -46,16 +46,19 @@ const processURI = (uri) => { claim: [ { format: E.ClaimFormat.FINGERPRINT, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.CONTAINS, path: ['summary'] }, { format: E.ClaimFormat.FINGERPRINT, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.CONTAINS, path: ['attachment', 'value'] }, { format: E.ClaimFormat.FINGERPRINT, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.CONTAINS, path: ['content'] } diff --git a/src/claimDefinitions/discourse.js b/src/claimDefinitions/discourse.js index 03910e5..9f0157c 100644 --- a/src/claimDefinitions/discourse.js +++ b/src/claimDefinitions/discourse.js @@ -48,6 +48,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.CONTAINS, path: ['user', 'bio_raw'] }] diff --git a/src/claimDefinitions/dns.js b/src/claimDefinitions/dns.js index cde2f61..cc7a418 100644 --- a/src/claimDefinitions/dns.js +++ b/src/claimDefinitions/dns.js @@ -47,6 +47,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.CONTAINS, path: ['records', 'txt'] }] diff --git a/src/claimDefinitions/forem.js b/src/claimDefinitions/forem.js index fcab1df..1af4e32 100644 --- a/src/claimDefinitions/forem.js +++ b/src/claimDefinitions/forem.js @@ -48,6 +48,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.CONTAINS, path: ['body_markdown'] }] diff --git a/src/claimDefinitions/forgejo.js b/src/claimDefinitions/forgejo.js index 939a995..7cae15e 100644 --- a/src/claimDefinitions/forgejo.js +++ b/src/claimDefinitions/forgejo.js @@ -48,6 +48,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.EQUALS, path: ['description'] }] diff --git a/src/claimDefinitions/gitea.js b/src/claimDefinitions/gitea.js index 6cecc72..83539e2 100644 --- a/src/claimDefinitions/gitea.js +++ b/src/claimDefinitions/gitea.js @@ -48,6 +48,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.EQUALS, path: ['description'] }] diff --git a/src/claimDefinitions/github.js b/src/claimDefinitions/github.js index 2e4bc02..bfe1c77 100644 --- a/src/claimDefinitions/github.js +++ b/src/claimDefinitions/github.js @@ -48,6 +48,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.CONTAINS, path: ['files', 'openpgp.md', 'content'] }] diff --git a/src/claimDefinitions/gitlab.js b/src/claimDefinitions/gitlab.js index f4af8e6..16976c1 100644 --- a/src/claimDefinitions/gitlab.js +++ b/src/claimDefinitions/gitlab.js @@ -48,6 +48,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.EQUALS, path: ['description'] }] diff --git a/src/claimDefinitions/hackernews.js b/src/claimDefinitions/hackernews.js index 4381884..5068177 100644 --- a/src/claimDefinitions/hackernews.js +++ b/src/claimDefinitions/hackernews.js @@ -48,6 +48,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.HTML, relation: E.ClaimRelation.CONTAINS, path: ['about'] }] diff --git a/src/claimDefinitions/irc.js b/src/claimDefinitions/irc.js index 18338c9..a79d460 100644 --- a/src/claimDefinitions/irc.js +++ b/src/claimDefinitions/irc.js @@ -48,6 +48,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.CONTAINS, path: [] }] diff --git a/src/claimDefinitions/keybase.js b/src/claimDefinitions/keybase.js index a313ffe..1d2d734 100644 --- a/src/claimDefinitions/keybase.js +++ b/src/claimDefinitions/keybase.js @@ -48,6 +48,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.FINGERPRINT, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.CONTAINS, path: ['them', 'public_keys', 'primary', 'key_fingerprint'] }] diff --git a/src/claimDefinitions/liberapay.js b/src/claimDefinitions/liberapay.js index be2907d..e5a23bf 100644 --- a/src/claimDefinitions/liberapay.js +++ b/src/claimDefinitions/liberapay.js @@ -48,6 +48,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.CONTAINS, path: ['statements', 'content'] }] diff --git a/src/claimDefinitions/lichess.js b/src/claimDefinitions/lichess.js index 0ba74d6..9e6a57a 100644 --- a/src/claimDefinitions/lichess.js +++ b/src/claimDefinitions/lichess.js @@ -48,6 +48,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.FINGERPRINT, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.CONTAINS, path: ['profile', 'links'] }] diff --git a/src/claimDefinitions/lobsters.js b/src/claimDefinitions/lobsters.js index b3e7eb0..3b89f15 100644 --- a/src/claimDefinitions/lobsters.js +++ b/src/claimDefinitions/lobsters.js @@ -48,6 +48,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.CONTAINS, path: ['about'] }] diff --git a/src/claimDefinitions/matrix.js b/src/claimDefinitions/matrix.js index 4a83e90..c93069d 100644 --- a/src/claimDefinitions/matrix.js +++ b/src/claimDefinitions/matrix.js @@ -64,6 +64,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.CONTAINS, path: ['content', 'body'] }] diff --git a/src/claimDefinitions/owncast.js b/src/claimDefinitions/owncast.js index 16de454..6631c3f 100644 --- a/src/claimDefinitions/owncast.js +++ b/src/claimDefinitions/owncast.js @@ -48,6 +48,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.FINGERPRINT, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.CONTAINS, path: ['socialHandles', 'url'] }] diff --git a/src/claimDefinitions/reddit.js b/src/claimDefinitions/reddit.js index c54eaf0..6fde6ed 100644 --- a/src/claimDefinitions/reddit.js +++ b/src/claimDefinitions/reddit.js @@ -48,6 +48,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.CONTAINS, path: ['data', 'children', 'data', 'selftext'] }] diff --git a/src/claimDefinitions/stackexchange.js b/src/claimDefinitions/stackexchange.js index 1316476..6a99772 100644 --- a/src/claimDefinitions/stackexchange.js +++ b/src/claimDefinitions/stackexchange.js @@ -50,6 +50,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.CONTAINS, path: ['items', 'about_me'] }] diff --git a/src/claimDefinitions/telegram.js b/src/claimDefinitions/telegram.js index 08d6e66..84d64fa 100644 --- a/src/claimDefinitions/telegram.js +++ b/src/claimDefinitions/telegram.js @@ -48,6 +48,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.EQUALS, path: ['text'] }] diff --git a/src/claimDefinitions/twitter.js b/src/claimDefinitions/twitter.js index d44692f..5d873e9 100644 --- a/src/claimDefinitions/twitter.js +++ b/src/claimDefinitions/twitter.js @@ -49,6 +49,7 @@ const processURI = (uri) => { }, claim: [{ format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.PLAIN, relation: E.ClaimRelation.CONTAINS, path: ['html'] }] diff --git a/src/claimDefinitions/xmpp.js b/src/claimDefinitions/xmpp.js index 9124221..93714b3 100644 --- a/src/claimDefinitions/xmpp.js +++ b/src/claimDefinitions/xmpp.js @@ -45,13 +45,12 @@ const processURI = (uri) => { } } }, - claim: [ - { - format: E.ClaimFormat.URI, - relation: E.ClaimRelation.CONTAINS, - path: [] - } - ] + claim: [{ + format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.PLAIN, + relation: E.ClaimRelation.CONTAINS, + path: [] + }] } }