fixed nil ignored users

This commit is contained in:
Prateek Sachan 2020-02-08 18:04:31 +05:30
parent 4a4dac9fae
commit ec9ccbdfb2

View file

@ -298,7 +298,9 @@ func (s *outputRoomEventsStatements) selectRecentEvents(
} else {
stmt = common.TxStmt(txn, s.selectRecentEventsStmt)
}
if ignoredUsers == nil {
ignoredUsers = []string{}
}
rows, err := stmt.QueryContext(ctx, roomID, fromPos, toPos, limit, pq.StringArray(ignoredUsers))
if err != nil {
return nil, err