mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Don't send account data or receipts for left/forgotten rooms (#2382)
* Only include account data and receipts for rooms in a complete sync that we care about * Fix global account data
This commit is contained in:
parent
66b397b3c6
commit
dca4afd2f0
3 changed files with 29 additions and 0 deletions
|
@ -25,6 +25,23 @@ type SyncRequest struct {
|
|||
IgnoredUsers IgnoredUsers
|
||||
}
|
||||
|
||||
func (r *SyncRequest) IsRoomPresent(roomID string) bool {
|
||||
membership, ok := r.Rooms[roomID]
|
||||
if !ok {
|
||||
return false
|
||||
}
|
||||
switch membership {
|
||||
case gomatrixserverlib.Join:
|
||||
return true
|
||||
case gomatrixserverlib.Invite:
|
||||
return true
|
||||
case gomatrixserverlib.Peek:
|
||||
return true
|
||||
default:
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
type StreamProvider interface {
|
||||
Setup()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue