From e798e394335a749a667a2c5a32608ae28d61ea3b Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Fri, 26 Jul 2019 10:05:08 +0200 Subject: [PATCH] [Room] Fix state requests --- lib/src/Room.dart | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/src/Room.dart b/lib/src/Room.dart index fd6a007e..2513f7a3 100644 --- a/lib/src/Room.dart +++ b/lib/src/Room.dart @@ -147,7 +147,7 @@ class Room { Future setName(String newName) async { dynamic res = await client.connection.jsonRequest( type: HTTPType.PUT, - action: "/client/r0/rooms/${id}/send/m.room.name/${new DateTime.now()}", + action: "/client/r0/rooms/${id}/state/m.room.name}", data: {"name": newName}); if (res is ErrorResponse) client.connection.onError.add(res); return res; @@ -157,8 +157,7 @@ class Room { Future setDescription(String newName) async { dynamic res = await client.connection.jsonRequest( type: HTTPType.PUT, - action: - "/client/r0/rooms/${id}/send/m.room.topic/${new DateTime.now()}", + action: "/client/r0/rooms/${id}/state/m.room.topic}", data: {"topic": newName}); if (res is ErrorResponse) client.connection.onError.add(res); return res; @@ -285,7 +284,7 @@ class Room { dynamic res = await client.connection.jsonRequest( type: HTTPType.PUT, - action: "/client/r0/rooms/$id/state/m.room.power_levels/", + action: "/client/r0/rooms/$id/state/m.room.power_levels", data: {"users": powerMap}); if (res is ErrorResponse) client.connection.onError.add(res); return res;