From 0906c46c159912f4d9b5607df2907d0193d43c81 Mon Sep 17 00:00:00 2001 From: MrMelon54 Date: Mon, 11 Sep 2023 22:51:18 +0100 Subject: [PATCH] Fix fetch output error --- imap/client.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imap/client.go b/imap/client.go index 279b010..f93f586 100644 --- a/imap/client.go +++ b/imap/client.go @@ -2,6 +2,7 @@ package imap import ( "errors" + "github.com/1f349/lotus/imap/json" "github.com/emersion/go-imap" "github.com/emersion/go-imap/client" "strconv" @@ -64,7 +65,7 @@ func (c *Client) HandleWS(action string, args []string) (map[string]any, error) if err != nil { return nil, err } - return map[string]any{"type": "fetch", "value": fetch}, nil + return map[string]any{"type": "fetch", "value": json.ListMessagesJson(fetch)}, nil case "move": // TODO: implementation case "rename":