[Room] Fix changename requests

This commit is contained in:
Christian Pauly 2019-07-26 13:32:18 +02:00
parent 670110e661
commit a48f1519b6
1 changed files with 2 additions and 2 deletions

View File

@ -147,7 +147,7 @@ class Room {
Future<dynamic> setName(String newName) async { Future<dynamic> setName(String newName) async {
dynamic res = await client.connection.jsonRequest( dynamic res = await client.connection.jsonRequest(
type: HTTPType.PUT, type: HTTPType.PUT,
action: "/client/r0/rooms/${id}/state/m.room.name}", action: "/client/r0/rooms/${id}/state/m.room.name",
data: {"name": newName}); data: {"name": newName});
if (res is ErrorResponse) client.connection.onError.add(res); if (res is ErrorResponse) client.connection.onError.add(res);
return res; return res;
@ -157,7 +157,7 @@ class Room {
Future<dynamic> setDescription(String newName) async { Future<dynamic> setDescription(String newName) async {
dynamic res = await client.connection.jsonRequest( dynamic res = await client.connection.jsonRequest(
type: HTTPType.PUT, type: HTTPType.PUT,
action: "/client/r0/rooms/${id}/state/m.room.topic}", action: "/client/r0/rooms/${id}/state/m.room.topic",
data: {"topic": newName}); data: {"topic": newName});
if (res is ErrorResponse) client.connection.onError.add(res); if (res is ErrorResponse) client.connection.onError.add(res);
return res; return res;