mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 00:47:04 +03:00
Improved autocrypt #342
This commit is contained in:
parent
636ffe5fbb
commit
05d8e7b353
3 changed files with 12 additions and 2 deletions
|
|
@ -75,6 +75,7 @@ export class MessageModel extends AbstractModel {
|
||||||
this.messageId = '';
|
this.messageId = '';
|
||||||
this.inReplyTo = '';
|
this.inReplyTo = '';
|
||||||
this.references = '';
|
this.references = '';
|
||||||
|
this.autocrypt = {};
|
||||||
|
|
||||||
addObservablesTo(this, {
|
addObservablesTo(this, {
|
||||||
subject: '',
|
subject: '',
|
||||||
|
|
@ -111,7 +112,6 @@ export class MessageModel extends AbstractModel {
|
||||||
|
|
||||||
readReceipt: '',
|
readReceipt: '',
|
||||||
|
|
||||||
autocrypt: '',
|
|
||||||
// rfc8621
|
// rfc8621
|
||||||
id: '',
|
id: '',
|
||||||
// threadId: '',
|
// threadId: '',
|
||||||
|
|
|
||||||
|
|
@ -840,6 +840,8 @@ export class ComposePopupView extends AbstractViewPopup {
|
||||||
this.aDraftInfo = ['reply', message.uid, message.folder];
|
this.aDraftInfo = ['reply', message.uid, message.folder];
|
||||||
this.sInReplyTo = message.messageId;
|
this.sInReplyTo = message.messageId;
|
||||||
this.sReferences = (message.messageId + ' ' + message.references).trim();
|
this.sReferences = (message.messageId + ' ' + message.references).trim();
|
||||||
|
// OpenPGP “Transferable Public Key”
|
||||||
|
// message.autocrypt?.keydata
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ComposeType.Forward:
|
case ComposeType.Forward:
|
||||||
|
|
|
||||||
|
|
@ -485,6 +485,14 @@ class Message implements \JsonSerializable
|
||||||
$this->aFlagsLowerCase
|
$this->aFlagsLowerCase
|
||||||
));
|
));
|
||||||
|
|
||||||
|
$aAutocrypt = [];
|
||||||
|
if ($this->sAutocrypt) {
|
||||||
|
foreach (\explode(';', $this->sAutocrypt) as $entry) {
|
||||||
|
$entry = \explode('=', \trim($entry), 2);
|
||||||
|
$aAutocrypt[$entry[0]] = $entry[1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'@Object' => 'Object/Message',
|
'@Object' => 'Object/Message',
|
||||||
'folder' => $this->sFolder,
|
'folder' => $this->sFolder,
|
||||||
|
|
@ -512,7 +520,7 @@ class Message implements \JsonSerializable
|
||||||
'threads' => $this->aThreads,
|
'threads' => $this->aThreads,
|
||||||
'unsubsribeLinks' => $this->UnsubsribeLinks,
|
'unsubsribeLinks' => $this->UnsubsribeLinks,
|
||||||
'readReceipt' => '',
|
'readReceipt' => '',
|
||||||
'autocrypt' => $this->sAutocrypt,
|
'autocrypt' => $aAutocrypt ?: null,
|
||||||
|
|
||||||
'attachments' => $this->Attachments,
|
'attachments' => $this->Attachments,
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue