Implement enabling encryption when creating room
This commit is contained in:
parent
e7283f48f1
commit
b34387ad79
|
@ -453,7 +453,7 @@ class MatrixClient(nio.AsyncClient):
|
||||||
name: Optional[str] = None,
|
name: Optional[str] = None,
|
||||||
topic: Optional[str] = None,
|
topic: Optional[str] = None,
|
||||||
public: bool = False,
|
public: bool = False,
|
||||||
encrypt: bool = False, # TODO
|
encrypt: bool = False,
|
||||||
federate: bool = True,
|
federate: bool = True,
|
||||||
) -> str:
|
) -> str:
|
||||||
|
|
||||||
|
@ -464,6 +464,8 @@ class MatrixClient(nio.AsyncClient):
|
||||||
visibility =
|
visibility =
|
||||||
nio.RoomVisibility.public if public else
|
nio.RoomVisibility.public if public else
|
||||||
nio.RoomVisibility.private,
|
nio.RoomVisibility.private,
|
||||||
|
initial_state =
|
||||||
|
[nio.EnableEncryptionBuilder().as_dict()] if encrypt else [],
|
||||||
)
|
)
|
||||||
|
|
||||||
if isinstance(response, nio.RoomCreateError):
|
if isinstance(response, nio.RoomCreateError):
|
||||||
|
|
Loading…
Reference in New Issue
Block a user