aboutsummaryrefslogtreecommitdiff
path: root/syncapi/storage/tables/interface.go
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2022-04-28 16:12:40 +0200
committerGitHub <noreply@github.com>2022-04-28 15:12:40 +0100
commit21ee5b36a41f2cb3960f63ef6f19106d36312aae (patch)
tree6047bef017ef2716eadd59d14deb4d1936415a70 /syncapi/storage/tables/interface.go
parent8683ff78b1bee6b7c35e7befb9903c794a17510c (diff)
Limit presence in `/sync` responses (#2394)
* Use filter and limit presence count * More limiting * More limiting * Fix unit test * Also limit presence by last_active_ts * Update query, use "from" as the initial lastPos * Get 1000 presence events, they are filtered later Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
Diffstat (limited to 'syncapi/storage/tables/interface.go')
-rw-r--r--syncapi/storage/tables/interface.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/syncapi/storage/tables/interface.go b/syncapi/storage/tables/interface.go
index 4ff4689e..6fdd9483 100644
--- a/syncapi/storage/tables/interface.go
+++ b/syncapi/storage/tables/interface.go
@@ -188,5 +188,5 @@ type Presence interface {
UpsertPresence(ctx context.Context, txn *sql.Tx, userID string, statusMsg *string, presence types.Presence, lastActiveTS gomatrixserverlib.Timestamp, fromSync bool) (pos types.StreamPosition, err error)
GetPresenceForUser(ctx context.Context, txn *sql.Tx, userID string) (presence *types.PresenceInternal, err error)
GetMaxPresenceID(ctx context.Context, txn *sql.Tx) (pos types.StreamPosition, err error)
- GetPresenceAfter(ctx context.Context, txn *sql.Tx, after types.StreamPosition) (presences map[string]*types.PresenceInternal, err error)
+ GetPresenceAfter(ctx context.Context, txn *sql.Tx, after types.StreamPosition, filter gomatrixserverlib.EventFilter) (presences map[string]*types.PresenceInternal, err error)
}