Merge branch 'store-fix-query' into 'master'

[Store] Fix event query

See merge request famedly/famedlysdk!70
This commit is contained in:
Marcel 2019-09-03 11:42:13 +00:00
commit c2bfc7a749

View file

@ -398,7 +398,7 @@ class Store {
/// Searches for the event in the store.
Future<Event> getEventById(String eventID, Room room) async {
List<Map<String, dynamic>> res = await db.rawQuery(
"SELECT * FROM Events WHERE id=? AND room_id=?", [eventID, room.id]);
"SELECT * FROM Events WHERE event_id=? AND room_id=?", [eventID, room.id]);
if (res.length == 0) return null;
return Event.fromJson(res[0], room);
}