parent
b201b1159e
commit
ecc4618ccd
1 changed files with 67 additions and 0 deletions
|
|
@ -482,6 +482,18 @@ class ClientController(final String? accountId) extends AsyncNotifier<int> {
|
|||
Future<void> deleteAlias(String alias) =>
|
||||
_sendCommand("delete_alias", {"alias": alias});
|
||||
|
||||
Future<bool> getRoomPublished(String roomId) async =>
|
||||
(await _sendCommand("get_room_visibility", {
|
||||
"room_id": roomId,
|
||||
}))["visibility"] ==
|
||||
"public";
|
||||
|
||||
Future<void> setRoomPublished(String roomId, bool published) =>
|
||||
_sendCommand("publish_room", {
|
||||
"room_id": roomId,
|
||||
"visibility": published ? "public" : "private",
|
||||
});
|
||||
|
||||
/// The room [alias] points to, or null if it doesn't exist.
|
||||
Future<String?> resolveAlias(String alias) async {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in a new issue