aboutsummaryrefslogtreecommitdiff
path: root/syncapi/storage/interface.go
diff options
context:
space:
mode:
Diffstat (limited to 'syncapi/storage/interface.go')
-rw-r--r--syncapi/storage/interface.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/syncapi/storage/interface.go b/syncapi/storage/interface.go
index 5a036d88..05542603 100644
--- a/syncapi/storage/interface.go
+++ b/syncapi/storage/interface.go
@@ -27,6 +27,8 @@ import (
type Database interface {
Presence
+ SharedUsers
+
MaxStreamPositionForPDUs(ctx context.Context) (types.StreamPosition, error)
MaxStreamPositionForReceipts(ctx context.Context) (types.StreamPosition, error)
MaxStreamPositionForInvites(ctx context.Context) (types.StreamPosition, error)
@@ -165,3 +167,8 @@ type Presence interface {
PresenceAfter(ctx context.Context, after types.StreamPosition, filter gomatrixserverlib.EventFilter) (map[string]*types.PresenceInternal, error)
MaxStreamPositionForPresence(ctx context.Context) (types.StreamPosition, error)
}
+
+type SharedUsers interface {
+ // SharedUsers returns a subset of otherUserIDs that share a room with userID.
+ SharedUsers(ctx context.Context, userID string, otherUserIDs []string) ([]string, error)
+}