diff --git a/src/api/comm.libraryofcode.org/routes/keys.ts b/src/api/comm.libraryofcode.org/routes/keys.ts index e525b93..b68f9f9 100644 --- a/src/api/comm.libraryofcode.org/routes/keys.ts +++ b/src/api/comm.libraryofcode.org/routes/keys.ts @@ -58,7 +58,7 @@ export default class Keys extends Route {
Common Name: ${x509.data.subject.commonName}
Email Address: ${x509.data.emailAddresses[0]}
-Expires on: ${x509.data.notAfter.toLocaleString('en-us')}
+Expires on: ${new Date(x509.data.notAfter).toLocaleString('en-us')}
Public Key Algorithm ${x509.data.publicKeyAlgorithm}
Key Bit Length ${x509.data.bitLength}
diff --git a/src/commands/whois.ts b/src/commands/whois.ts index ce52fec..0f1c6b9 100644 --- a/src/commands/whois.ts +++ b/src/commands/whois.ts @@ -3,6 +3,7 @@ import moment from 'moment'; import { Message, Member } from 'eris'; import { Client, Command, RichEmbed } from '../class'; import { whois as emotes } from '../configs/emotes.json'; +import { profile } from '.'; export default class Whois extends Command { constructor(client: Client) { @@ -224,6 +225,15 @@ export default class Whois extends Command { if (permissions.length > 0) { embed.addField('Permissions', permissions.join(', ')); } + if (account.x509 || account.pgp) { + if (account.x509 && account.pgp) { + embed.addField('Credentials', `[PGP](https://comm.libraryofcode.org/keys/~/pgp/${member.id}) | [x509](https://comm.libraryofcode.org/keys/~/x509/${member.id})`); + } else if (account.pgp) { + embed.addField('Credentials', `[PGP](https://comm.libraryofcode.org/keys/~/pgp/${member.id})`); + } else if (account.x509) { + embed.addField('Credentials', `[x509](https://comm.libraryofcode.org/keys/~/x509/${member.id})`); + } + } if (serverAcknowledgements.length > 0) { embed.addField('Acknowledgements', serverAcknowledgements[0]); }