aboutsummaryrefslogtreecommitdiff
path: root/federationapi
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2022-08-05 11:12:41 +0200
committerGitHub <noreply@github.com>2022-08-05 11:12:41 +0200
commit1b7f84250a46b401eccb89acafdef1b379f2dbc0 (patch)
treec2b9bfd996dddda3236af6299c603d8541f5f64b /federationapi
parentde78eab63a99653edf68f783e263688ad4b701d8 (diff)
Fix linter issues (#2624)
* Try that again * All hail the mighty linter? * And once again * goimport all the things
Diffstat (limited to 'federationapi')
-rw-r--r--federationapi/consumers/roomserver.go8
-rw-r--r--federationapi/routing/join.go21
2 files changed, 16 insertions, 13 deletions
diff --git a/federationapi/consumers/roomserver.go b/federationapi/consumers/roomserver.go
index e50ec66a..2622ecb3 100644
--- a/federationapi/consumers/roomserver.go
+++ b/federationapi/consumers/roomserver.go
@@ -208,9 +208,11 @@ func (s *OutputRoomEventConsumer) processMessage(ore api.OutputNewRoomEvent, rew
// joinedHostsAtEvent works out a list of matrix servers that were joined to
// the room at the event (including peeking ones)
// It is important to use the state at the event for sending messages because:
-// 1) We shouldn't send messages to servers that weren't in the room.
-// 2) If a server is kicked from the rooms it should still be told about the
-// kick event,
+//
+// 1. We shouldn't send messages to servers that weren't in the room.
+// 2. If a server is kicked from the rooms it should still be told about the
+// kick event.
+//
// Usually the list can be calculated locally, but sometimes it will need fetch
// events from the room server.
// Returns an error if there was a problem talking to the room server.
diff --git a/federationapi/routing/join.go b/federationapi/routing/join.go
index 30406a15..9ad3bd8e 100644
--- a/federationapi/routing/join.go
+++ b/federationapi/routing/join.go
@@ -21,13 +21,14 @@ import (
"sort"
"time"
+ "github.com/matrix-org/gomatrixserverlib"
+ "github.com/matrix-org/util"
+ "github.com/sirupsen/logrus"
+
"github.com/matrix-org/dendrite/clientapi/jsonerror"
"github.com/matrix-org/dendrite/internal/eventutil"
"github.com/matrix-org/dendrite/roomserver/api"
"github.com/matrix-org/dendrite/setup/config"
- "github.com/matrix-org/gomatrixserverlib"
- "github.com/matrix-org/util"
- "github.com/sirupsen/logrus"
)
// MakeJoin implements the /make_join API
@@ -435,13 +436,13 @@ func SendJoin(
// a restricted room join. If the room version does not support restricted
// joins then this function returns with no side effects. This returns three
// values:
-// * an optional JSON response body (i.e. M_UNABLE_TO_AUTHORISE_JOIN) which
-// should always be sent back to the client if one is specified
-// * a user ID of an authorising user, typically a user that has power to
-// issue invites in the room, if one has been found
-// * an error if there was a problem finding out if this was allowable,
-// like if the room version isn't known or a problem happened talking to
-// the roomserver
+// - an optional JSON response body (i.e. M_UNABLE_TO_AUTHORISE_JOIN) which
+// should always be sent back to the client if one is specified
+// - a user ID of an authorising user, typically a user that has power to
+// issue invites in the room, if one has been found
+// - an error if there was a problem finding out if this was allowable,
+// like if the room version isn't known or a problem happened talking to
+// the roomserver
func checkRestrictedJoin(
httpReq *http.Request,
rsAPI api.FederationRoomserverAPI,