deleteRoomTag method
Remove a tag from the room.
userId
The id of the user to remove a tag for. The access token must be
authorized to make requests for this user ID.
roomId
The ID of the room to remove a tag from.
tag
The tag to remove.
Implementation
Future<void> deleteRoomTag(String userId, String roomId, String tag) async {
final requestUri = Uri(
path:
'_matrix/client/v3/user/${Uri.encodeComponent(userId)}/rooms/${Uri.encodeComponent(roomId)}/tags/${Uri.encodeComponent(tag)}');
final request = Request('DELETE', baseUri!.resolveUri(requestUri));
request.headers['authorization'] = 'Bearer ${bearerToken!}';
final response = await httpClient.send(request);
final responseBody = await response.stream.toBytes();
if (response.statusCode != 200) unexpectedResponse(response, responseBody);
final responseString = utf8.decode(responseBody);
final json = jsonDecode(responseString);
return ignore(json);
}