diff --git a/lib/src/Room.dart b/lib/src/Room.dart index 9971108..06c46b9 100644 --- a/lib/src/Room.dart +++ b/lib/src/Room.dart @@ -503,6 +503,8 @@ class Room { final dynamic resp = await client.connection.jsonRequest( type: HTTPType.GET, action: "/client/r0/rooms/$id/event/$eventID"); if (resp is ErrorResponse) return null; - return Event.fromJson(resp, this); + return Event.fromJson(resp, this, + senderUser: + (await client.store.getUser(matrixID: resp["sender"], room: this))); } } diff --git a/lib/src/Store.dart b/lib/src/Store.dart index 6bc7c81..adbcc3e 100644 --- a/lib/src/Store.dart +++ b/lib/src/Store.dart @@ -650,7 +650,9 @@ class Store { List> res = await db.rawQuery( "SELECT * FROM Events WHERE id=? AND chat_id=?", [eventID, room.id]); if (res.length == 0) return null; - return Event.fromJson(res[0], room); + return Event.fromJson(res[0], room, + senderUser: + (await this.getUser(matrixID: res[0]["sender"], room: room))); } Future forgetNotification(String roomID) async {