Update comment

This commit is contained in:
Brendan Abolivier 2017-09-21 19:35:29 +02:00
parent 982a60a3a0
commit 171724d6f8
No known key found for this signature in database
GPG key ID: 8EF1500759F70623

View file

@ -169,8 +169,11 @@ func (rp *RequestPool) currentSyncForUser(req syncRequest, currentPos types.Stre
func (rp *RequestPool) appendAccountData(
data *types.Response, userID string, req syncRequest, currentPos types.StreamPosition,
) (*types.Response, error) {
// TODO: We currently send all account data on every sync response, we should instead send data
// that has changed on incremental sync responses
// TODO: Account data doesn't have a sync position of its own, meaning that
// account data might be sent multiple time to the client if multiple account
// data keys were set between two message. This isn't a huge issue since the
// duplicate data doesn't represent a huge quantity of data, but an optimisation
// here would be making sure each data is sent only once to the client.
localpart, _, err := gomatrixserverlib.SplitID('@', userID)
if err != nil {
return nil, err