mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-15 08:41:16 -05:00
groupware: jmap: don't collpase threads when searching for emails, and add dumping of JMAP request payloads when trace logging is enabled
This commit is contained in:
@@ -346,7 +346,7 @@ func (j *Client) QueryEmailsWithSnippets(accountId string, filter EmailFilterEle
|
||||
AccountId: accountId,
|
||||
Filter: filter,
|
||||
Sort: []EmailComparator{{Property: emailSortByReceivedAt, IsAscending: false}},
|
||||
CollapseThreads: true,
|
||||
CollapseThreads: false,
|
||||
CalculateTotal: true,
|
||||
}
|
||||
if offset > 0 {
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"net/url"
|
||||
"slices"
|
||||
"strconv"
|
||||
@@ -201,6 +202,13 @@ func (h *HttpJmapClient) Command(ctx context.Context, logger *log.Logger, sessio
|
||||
|
||||
req.Header.Add("Content-Type", "application/json")
|
||||
req.Header.Add("User-Agent", h.userAgent)
|
||||
|
||||
if logger.Trace().Enabled() {
|
||||
requestBytes, err := httputil.DumpRequestOut(req, true)
|
||||
if err == nil {
|
||||
logger.Trace().Str(logEndpoint, endpoint).Msg(string(requestBytes))
|
||||
}
|
||||
}
|
||||
h.auth(session.Username, logger, req)
|
||||
|
||||
res, err := h.client.Do(req)
|
||||
|
||||
Reference in New Issue
Block a user