Fix notify-mail.hy
This commit is contained in:
parent
6c6e738342
commit
4b5b0f0e1b
@ -20,10 +20,7 @@
|
||||
:text True)]
|
||||
(match output
|
||||
OutputType.LINES (str.splitlines result.stdout)
|
||||
OutputType.JSON (let [json-root (json.loads result.stdout)]
|
||||
(if (!= (len json-root) 0)
|
||||
(. json-root [0] [0] [(slice None -1)])
|
||||
[])))))
|
||||
OutputType.JSON (json.loads result.stdout))))
|
||||
|
||||
(defclass Message []
|
||||
(setv uid None
|
||||
@ -108,7 +105,7 @@
|
||||
"folder:Inbox"
|
||||
:output OutputType.JSON)]
|
||||
(for [msg-json json-root]
|
||||
(let [msg (Message.from-json msg-json mail-root)]
|
||||
(let [msg (Message.from-json (. msg-json [0] [0]) mail-root)]
|
||||
(Thread.start (Thread :target notify-message
|
||||
:args #(msg))))))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user