From 041e22c52d7279ae350bae37b6eeaf5e3df5565f Mon Sep 17 00:00:00 2001 From: Bram Hagens Date: Thu, 8 Feb 2024 10:28:36 +0100 Subject: [PATCH] allow proof in guild name --- src/serviceProviders/discord.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/serviceProviders/discord.js b/src/serviceProviders/discord.js index f15f86c..0eec06a 100644 --- a/src/serviceProviders/discord.js +++ b/src/serviceProviders/discord.js @@ -62,12 +62,20 @@ export function processURI (uri) { response: { format: E.ProofFormat.JSON }, - target: [{ - format: E.ClaimFormat.FINGERPRINT, - encoding: E.EntityEncodingFormat.PLAIN, - relation: E.ClaimRelation.EQUALS, - path: ['guild', 'description'] - }] + target: [ + { + format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.PLAIN, + relation: E.ClaimRelation.CONTAINS, + path: ['guild', 'description'] + }, + { + format: E.ClaimFormat.URI, + encoding: E.EntityEncodingFormat.PLAIN, + relation: E.ClaimRelation.CONTAINS, + path: ['guild', 'name'] + } + ] } }) } @@ -108,7 +116,7 @@ export const tests = [ { uri: 'https://discord.com/invite/', shouldMatch: false - } + }, { uri: 'https://discord.gg/', shouldMatch: false