diff --git a/src/fetcher/activitypub.js b/src/fetcher/activitypub.js index 6658453..1201adf 100644 --- a/src/fetcher/activitypub.js +++ b/src/fetcher/activitypub.js @@ -70,6 +70,7 @@ module.exports.fn = async (data, opts) => { host, date: now.toUTCString(), accept: 'application/activity+json', + // @ts-ignore 'User-Agent': `doipjs/${require('../../package.json').version}` } diff --git a/src/fetcher/graphql.js b/src/fetcher/graphql.js index 3b3be5b..e92f8bd 100644 --- a/src/fetcher/graphql.js +++ b/src/fetcher/graphql.js @@ -60,6 +60,7 @@ module.exports.fn = async (data, opts) => { axios.post(data.url, jsonData, { headers: { 'Content-Type': 'application/json', + // @ts-ignore 'User-Agent': `doipjs/${require('../../package.json').version}` }, validateStatus: function (status) { diff --git a/src/fetcher/http.js b/src/fetcher/http.js index 834e62d..497caf9 100644 --- a/src/fetcher/http.js +++ b/src/fetcher/http.js @@ -56,6 +56,7 @@ module.exports.fn = async (data, opts) => { axios.get(data.url, { headers: { Accept: 'application/json', + // @ts-ignore 'User-Agent': `doipjs/${require('../../package.json').version}` }, validateStatus: function (status) { diff --git a/src/fetcher/irc.js b/src/fetcher/irc.js index 3d1a1db..4177225 100644 --- a/src/fetcher/irc.js +++ b/src/fetcher/irc.js @@ -71,9 +71,11 @@ if (jsEnv.isNode) { const reEnd = /End\sof\s.*\staxonomy./ const keys = [] + // @ts-ignore client.addListener('registered', (message) => { client.send(`PRIVMSG NickServ TAXONOMY ${data.nick}`) }) + // @ts-ignore client.addListener('notice', (nick, to, text, message) => { if (reKey.test(text)) { const match = text.match(reKey) diff --git a/src/fetcher/matrix.js b/src/fetcher/matrix.js index 4a3ff94..e264611 100644 --- a/src/fetcher/matrix.js +++ b/src/fetcher/matrix.js @@ -63,6 +63,7 @@ module.exports.fn = async (data, opts) => { { headers: { Accept: 'application/json', + // @ts-ignore 'User-Agent': `doipjs/${require('../../package.json').version}` } }) diff --git a/src/fetcher/telegram.js b/src/fetcher/telegram.js index e90b352..5d80fe8 100644 --- a/src/fetcher/telegram.js +++ b/src/fetcher/telegram.js @@ -66,6 +66,7 @@ module.exports.fn = async (data, opts) => { axios.get(url, { headers: { Accept: 'application/json', + // @ts-ignore 'User-Agent': `doipjs/${require('../../package.json').version}` }, validateStatus: (status) => status === 200 diff --git a/src/keys.js b/src/keys.js index 0c97149..efa4f77 100644 --- a/src/keys.js +++ b/src/keys.js @@ -40,6 +40,7 @@ const fetchHKP = async (identifier, keyserverDomain) => { ? `https://${keyserverDomain}` : 'https://keys.openpgp.org' + // @ts-ignore const hkp = new HKP(keyserverBaseUrl) const lookupOpts = { query: identifier @@ -72,6 +73,7 @@ const fetchHKP = async (identifier, keyserverDomain) => { * const key = doip.keys.fetchWKD('alice@domain.tld'); */ const fetchWKD = async (identifier) => { + // @ts-ignore const wkd = new WKD() const lookupOpts = { email: identifier diff --git a/src/signatures.js b/src/signatures.js index c69a201..c70e358 100644 --- a/src/signatures.js +++ b/src/signatures.js @@ -55,9 +55,12 @@ const process = async (signature) => { throw new Error(`Signature could not be read (${e.message})`) } + // @ts-ignore const issuerKeyID = sigData.signature.packets[0].issuerKeyID.toHex() + // @ts-ignore const signersUserID = sigData.signature.packets[0].signersUserID const preferredKeyServer = + // @ts-ignore sigData.signature.packets[0].preferredKeyServer || 'https://keys.openpgp.org/' const text = sigData.getText() @@ -112,6 +115,7 @@ const process = async (signature) => { // Verify the signature const verificationResult = await openpgp.verify({ + // @ts-ignore message: sigData, verificationKeys: result.key.data })