aboutsummaryrefslogtreecommitdiff
path: root/federationsender/types
diff options
context:
space:
mode:
Diffstat (limited to 'federationsender/types')
-rw-r--r--federationsender/types/types.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/federationsender/types/types.go b/federationsender/types/types.go
index 05ba92f7..398d3267 100644
--- a/federationsender/types/types.go
+++ b/federationsender/types/types.go
@@ -28,6 +28,12 @@ type JoinedHost struct {
ServerName gomatrixserverlib.ServerName
}
+type ServerNames []gomatrixserverlib.ServerName
+
+func (s ServerNames) Len() int { return len(s) }
+func (s ServerNames) Swap(i, j int) { s[i], s[j] = s[j], s[i] }
+func (s ServerNames) Less(i, j int) bool { return s[i] < s[j] }
+
// A EventIDMismatchError indicates that we have got out of sync with the
// room server.
type EventIDMismatchError struct {