finishing touches for x509/pgp store
parent
d82d8b68e4
commit
9f3da82454
|
@ -58,7 +58,7 @@ export default class Keys extends Route {
|
|||
|
||||
<p><strong>Common Name:</strong> ${x509.data.subject.commonName}</p>
|
||||
<p><strong>Email Address:</strong> ${x509.data.emailAddresses[0]}</p>
|
||||
<p><strong>Expires on:</strong> ${x509.data.notAfter.toLocaleString('en-us')}</p>
|
||||
<p><strong>Expires on:</strong> ${new Date(x509.data.notAfter).toLocaleString('en-us')}</p>
|
||||
|
||||
<p><strong>Public Key Algorithm</strong> ${x509.data.publicKeyAlgorithm}</p>
|
||||
<p><strong>Key Bit Length</strong> ${x509.data.bitLength}</p>
|
||||
|
|
|
@ -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]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue