feat: improve group member events and push delivery

This commit is contained in:
richjohnrambo
2026-09-18 01:00:41 +08:00
parent 0e2f4e73d1
commit c6e7f6b923
13 changed files with 521 additions and 19 deletions
+6 -3
View File
@@ -1779,8 +1779,9 @@ func (a *adapter) TenantSubsForTopic(id t.TenantID, topic string, keepDeleted bo
if !keepDeleted {
q += " AND deletedat IS NULL"
}
limit := a.maxResults
limit := 0
if opts != nil {
limit = a.maxResults
if !opts.User.IsZero() {
q += " AND userid=?"
args = append(args, decodeUID(opts.User))
@@ -1789,8 +1790,10 @@ func (a *adapter) TenantSubsForTopic(id t.TenantID, topic string, keepDeleted bo
limit = opts.Limit
}
}
q += " LIMIT ?"
args = append(args, limit)
if limit > 0 {
q += " LIMIT ?"
args = append(args, limit)
}
ctx, cancel := a.getContext()
if cancel != nil {
defer cancel()