Fix fetch output error

This commit is contained in:
Melon 2023-09-11 22:51:18 +01:00
parent 7629c5aa8e
commit 0906c46c15
Signed by: melon
GPG Key ID: 6C9D970C50D26A25

View File

@ -2,6 +2,7 @@ package imap
import ( import (
"errors" "errors"
"github.com/1f349/lotus/imap/json"
"github.com/emersion/go-imap" "github.com/emersion/go-imap"
"github.com/emersion/go-imap/client" "github.com/emersion/go-imap/client"
"strconv" "strconv"
@ -64,7 +65,7 @@ func (c *Client) HandleWS(action string, args []string) (map[string]any, error)
if err != nil { if err != nil {
return nil, err 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": case "move":
// TODO: implementation // TODO: implementation
case "rename": case "rename":