From 32d6416b628d2e2fad72464a5ca2577d55d468c4 Mon Sep 17 00:00:00 2001 From: KnugiHK <24708955+KnugiHK@users.noreply.github.com> Date: Wed, 8 Jun 2022 22:38:13 +0800 Subject: [PATCH] Add logout_devices to User.create_modify https://github.com/matrix-org/synapse/issues/12952 --- synapse_admin/user.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/synapse_admin/user.py b/synapse_admin/user.py index 0a7e5fa..4eac08f 100644 --- a/synapse_admin/user.py +++ b/synapse_admin/user.py @@ -147,7 +147,8 @@ def create_modify( admin: bool = None, deactivated: bool = None, external_ids: list = None, - user_type: Union[str, None] = "" + user_type: Union[str, None] = "", + logout: bool = None ) -> bool: """Create or modify a user @@ -184,6 +185,8 @@ def create_modify( body["external_ids"] = external_ids if user_type != "": body["user_type"] = user_type + if isinstance(logout, bool): + body["logout_devices"] = logout userid = self.validate_username(userid) resp = self.connection.request(