From db3c3f0c6d9a51e23410b736bd111d51d2a95e7a Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Wed, 12 Jun 2019 12:30:22 +0200 Subject: [PATCH] Fix membership table column --- lib/src/Room.dart | 1 + test/Room_test.dart | 3 +++ 2 files changed, 4 insertions(+) diff --git a/lib/src/Room.dart b/lib/src/Room.dart index b755aa6..7f65e3a 100644 --- a/lib/src/Room.dart +++ b/lib/src/Room.dart @@ -364,6 +364,7 @@ class Room { return Room( id: row["id"], name: name, + membership: row["membership"], topic: row["description"], avatar: MxContent(avatarUrl), notificationCount: row["notification_count"], diff --git a/test/Room_test.dart b/test/Room_test.dart index 4ac607b..91d2c2b 100644 --- a/test/Room_test.dart +++ b/test/Room_test.dart @@ -42,6 +42,7 @@ void main() { final String id = "!localpart:server.abc"; final String name = "My Room"; + final String membership = "join"; final String topic = "This is my own room"; final int unread = DateTime.now().millisecondsSinceEpoch; final int notificationCount = 2; @@ -60,6 +61,7 @@ void main() { final Map jsonObj = { "id": id, + "membership": membership, "topic": name, "description": topic, "avatar_url": "", @@ -93,6 +95,7 @@ void main() { room = await Room.getRoomFromTableRow(jsonObj, matrix); expect(room.id, id); + expect(room.membership, membership); expect(room.name, name); expect(room.topic, topic); expect(room.avatar.mxc, "");