mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-26 08:13:09 -06:00
32 lines
580 B
Go
32 lines
580 B
Go
package shared
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/matrix-org/dendrite/syncapi/types"
|
|
)
|
|
|
|
type AccountDataStreamProvider struct {
|
|
StreamProvider
|
|
}
|
|
|
|
func (p *AccountDataStreamProvider) Setup() {
|
|
p.StreamProvider.Setup()
|
|
}
|
|
|
|
func (p *AccountDataStreamProvider) CompleteSync(
|
|
ctx context.Context,
|
|
req *types.SyncRequest,
|
|
) types.StreamPosition {
|
|
return p.IncrementalSync(ctx, req, 0, p.LatestPosition(ctx))
|
|
}
|
|
|
|
func (p *AccountDataStreamProvider) IncrementalSync(
|
|
ctx context.Context,
|
|
req *types.SyncRequest,
|
|
from, to types.StreamPosition,
|
|
) types.StreamPosition {
|
|
|
|
return to
|
|
}
|