selectAccountDataByType return ClientEvent pointer instead of slice of ClientEvent (#798)

This pull request is an attempt to fix #773.

Signed-off-by: Kouame Behouba Manassé behouba@gmail.com
This commit is contained in:
Behouba Manassé 2019-09-30 19:25:04 +03:00 committed by Andrew Morgan
parent 7b454bdd27
commit 49fd47c863
4 changed files with 18 additions and 29 deletions

View file

@ -196,13 +196,13 @@ func (rp *RequestPool) appendAccountData(
events := []gomatrixserverlib.ClientEvent{}
// Request the missing data from the database
for _, dataType := range dataTypes {
evs, err := rp.accountDB.GetAccountDataByType(
event, err := rp.accountDB.GetAccountDataByType(
req.ctx, localpart, roomID, dataType,
)
if err != nil {
return nil, err
}
events = append(events, evs...)
events = append(events, *event)
}
// Append the data to the response