[Room] Fix room id

This commit is contained in:
Christian Pauly 2019-08-28 13:06:41 +02:00
parent e54f134d92
commit 76a1e538c7
2 changed files with 2 additions and 2 deletions

View file

@ -416,7 +416,7 @@ class Room {
{Future<List<Map<String, dynamic>>> states, {Future<List<Map<String, dynamic>>> states,
Future<List<Map<String, dynamic>>> roomAccountData}) async { Future<List<Map<String, dynamic>>> roomAccountData}) async {
Room newRoom = Room( Room newRoom = Room(
id: row["id"], id: row["room_id"],
membership: Membership.values membership: Membership.values
.firstWhere((e) => e.toString() == 'Membership.' + row["membership"]), .firstWhere((e) => e.toString() == 'Membership.' + row["membership"]),
notificationCount: row["notification_count"], notificationCount: row["notification_count"],

View file

@ -63,7 +63,7 @@ void main() {
]; ];
Map<String, dynamic> jsonObj = { Map<String, dynamic> jsonObj = {
"id": id, "room_id": id,
"membership": membership.toString().split('.').last, "membership": membership.toString().split('.').last,
"avatar_url": "", "avatar_url": "",
"notification_count": notificationCount, "notification_count": notificationCount,