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, "");