mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-16 03:13:11 -06:00
Tidy up a bit
This commit is contained in:
parent
490c40f5f3
commit
54838a7b7a
|
|
@ -82,5 +82,4 @@ func SetupSyncAPIComponent(
|
|||
}
|
||||
|
||||
routing.Setup(base.APIMux, requestPool, syncDB, deviceDB, federation, queryAPI, cfg)
|
||||
//routing.Setup(base.APIMux, requestPool, syncDB, deviceDB)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,17 +160,6 @@ type Response struct {
|
|||
} `json:"rooms"`
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
func NewResponse(pos StreamPosition) *Response {
|
||||
res := Response{}
|
||||
// Fill next_batch with a pagination token. Since this is a response to a sync request, we can assume
|
||||
// we'll always return a stream token.
|
||||
res.NextBatch = NewPaginationTokenFromTypeAndPosition(PaginationTokenTypeStream, pos).String()
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
// NewResponse creates an empty response with initialised maps.
|
||||
func NewResponse(pos SyncPosition) *Response {
|
||||
res := Response{
|
||||
|
|
@ -189,6 +178,10 @@ func NewResponse(pos SyncPosition) *Response {
|
|||
res.AccountData.Events = make([]gomatrixserverlib.ClientEvent, 0)
|
||||
res.Presence.Events = make([]gomatrixserverlib.ClientEvent, 0)
|
||||
|
||||
// Fill next_batch with a pagination token. Since this is a response to a sync request, we can assume
|
||||
// we'll always return a stream token.
|
||||
res.NextBatch = NewPaginationTokenFromTypeAndPosition(PaginationTokenTypeStream, pos).String()
|
||||
|
||||
return &res
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue