MCPcopy Create free account
hub / github.com/mailvelope/mailvelope / onSetArmored

Method onSetArmored

src/controller/decrypt.controller.js:87–104  ·  view source on GitHub ↗
(msg)

Source from the content-addressed store, hash-verified

85 }
86
87 async onSetArmored(msg) {
88 if (msg.options && msg.options.senderAddress) {
89 this.sender = msg.options.senderAddress;
90 }
91 if (msg.keyringId ?? msg.allKeyrings) {
92 this.keyringId = msg.keyringId;
93 }
94 this.armored = msg.data;
95 this.decryptReady.resolve();
96 if (this.reconnect) {
97 return;
98 }
99 if (!this.ports.dFrame || await this.getPopup() || await this.canUnlockKey(this.armored, this.keyringId)) {
100 await this.decrypt(this.armored, this.keyringId);
101 } else {
102 this.ports.dDialog.emit('lock');
103 }
104 }
105
106 async canUnlockKey(armoredMessage, keyringId) {
107 try {

Callers 1

Calls 4

getPopupMethod · 0.95
canUnlockKeyMethod · 0.95
decryptMethod · 0.95
emitMethod · 0.45

Tested by

no test coverage detected