mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2024-12-22 06:29:28 -07:00
fix: ignore non-issues without current solution
This commit is contained in:
parent
fceb5b6f9b
commit
4f5e5592f4
8 changed files with 13 additions and 0 deletions
|
@ -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}`
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -63,6 +63,7 @@ module.exports.fn = async (data, opts) => {
|
|||
{
|
||||
headers: {
|
||||
Accept: 'application/json',
|
||||
// @ts-ignore
|
||||
'User-Agent': `doipjs/${require('../../package.json').version}`
|
||||
}
|
||||
})
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue