aboutsummaryrefslogtreecommitdiff
path: root/roomserver/api
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-06-12 15:11:33 +0100
committerGitHub <noreply@github.com>2020-06-12 15:11:33 +0100
commit0dc4ceaa2d8e46aa0134c1aabe96389ba4c1591d (patch)
tree01fc28ca7c7590e37f05923169602622b2144971 /roomserver/api
parentecd7accbad724f26248498a9035a1fbc69e2f08d (diff)
Minor perf/debugging improvements (#1121)
* Minor perf/debugging improvements - publicroomsapi: Don't call QueryEventsByID with no event IDs - appservice: Consume only if there are 1 or more ASes - roomserver: don't keep a copy of the request "for debugging" - we trace now * fedsender: return early if we have no destinations * Unbreak tests
Diffstat (limited to 'roomserver/api')
-rw-r--r--roomserver/api/query.go8
1 files changed, 0 insertions, 8 deletions
diff --git a/roomserver/api/query.go b/roomserver/api/query.go
index b1525342..6586b1af 100644
--- a/roomserver/api/query.go
+++ b/roomserver/api/query.go
@@ -33,8 +33,6 @@ type QueryLatestEventsAndStateRequest struct {
// This is used when sending events to set the prev_events, auth_events and depth.
// It is also used to tell whether the event is allowed by the event auth rules.
type QueryLatestEventsAndStateResponse struct {
- // Copy of the request for debugging.
- QueryLatestEventsAndStateRequest
// Does the room exist?
// If the room doesn't exist this will be false and LatestEvents will be empty.
RoomExists bool `json:"room_exists"`
@@ -66,8 +64,6 @@ type QueryStateAfterEventsRequest struct {
// QueryStateAfterEventsResponse is a response to QueryStateAfterEvents
type QueryStateAfterEventsResponse struct {
- // Copy of the request for debugging.
- QueryStateAfterEventsRequest
// Does the room exist on this roomserver?
// If the room doesn't exist this will be false and StateEvents will be empty.
RoomExists bool `json:"room_exists"`
@@ -89,8 +85,6 @@ type QueryEventsByIDRequest struct {
// QueryEventsByIDResponse is a response to QueryEventsByID
type QueryEventsByIDResponse struct {
- // Copy of the request for debugging.
- QueryEventsByIDRequest
// A list of events with the requested IDs.
// If the roomserver does not have a copy of a requested event
// then it will omit that event from the list.
@@ -187,8 +181,6 @@ type QueryStateAndAuthChainRequest struct {
// QueryStateAndAuthChainResponse is a response to QueryStateAndAuthChain
type QueryStateAndAuthChainResponse struct {
- // Copy of the request for debugging.
- QueryStateAndAuthChainRequest
// Does the room exist on this roomserver?
// If the room doesn't exist this will be false and StateEvents will be empty.
RoomExists bool `json:"room_exists"`