~pkal/autocrypt

5fc15d64437c3531b5d61d73c5b9eb19603b2a17 — Philip Kaludercic 1 year, 6 months ago a90aa6b
Use a custom constructor for 'autocrypt-peer'
1 files changed, 3 insertions(+), 3 deletions(-)

M autocrypt.el
M autocrypt.el => autocrypt.el +3 -3
@@ 88,7 88,7 @@ process \"Autocrypt-Gossip\" headers when received."
;;;; Data Structures

;; https://autocrypt.org/level1.html#communication-peers
(cl-defstruct autocrypt-peer
(cl-defstruct (autocrypt-peer (:constructor autocrypt-make-peer))
  last-seen
  timestamp
  pubkey


@@ 384,7 384,7 @@ Argument DATE contains the time value of the \"From\" tag."
                                       date))
                (setf (autocrypt-peer-gossip-timestamp date)
                      (autocrypt-peer-gossip-key (caddr datum)))
              (push (cons addr (make-autocrypt-peer
              (push (cons addr (autocrypt-make-peer
                                :gossip-timestamp date
                                :gossip-key (caddr datum)))
                    autocrypt-peers))))


@@ 406,7 406,7 @@ Argument DATE contains the time value of the \"From\" tag."
                preference (cadr parse)
                keydata (caddr parse)
                peer (or (cdr (assoc addr autocrypt-peers))
                         (make-autocrypt-peer
                         (autocrypt-make-peer
                          :last-seen date
                          :timestamp date
                          :pubkey keydata