Source code for matrixctl.addons.adduser.addon
+ Source code for matrixctl.commands.adduser.addon
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -113,7 +114,7 @@ Source code for matrixctl.addons.adduser.addon
-[docs]
+[docs]
def addon(arg: Namespace, yaml: YAML) -> int:
"""Add a User to the synapse instance.
@@ -157,10 +158,11 @@
Source code for matrixctl.addons.adduser.addon
)
return 0
+ user_id = f"@{arg.user}:{yaml.get('server', 'api','domain')}"
req: RequestBuilder = RequestBuilder(
domain=yaml.get("server", "api", "domain"),
token=yaml.get("server", "api", "token"),
- path=f"users/@{arg.user}:{yaml.get('server', 'api','domain')}",
+ path=f"/_synapse/admin/v2/users/{user_id}",
json={"password": passwd, "admin": arg.admin},
method="PUT",
)
diff --git a/_modules/matrixctl/addons/adduser/parser.html b/_modules/matrixctl/commands/adduser/parser.html
similarity index 95%
rename from _modules/matrixctl/addons/adduser/parser.html
rename to _modules/matrixctl/commands/adduser/parser.html
index e1a95b3e..72890c35 100644
--- a/_modules/matrixctl/addons/adduser/parser.html
+++ b/_modules/matrixctl/commands/adduser/parser.html
@@ -5,7 +5,7 @@
- matrixctl.addons.adduser.parser — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.adduser.parser — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.adduser.parser
+ Source code for matrixctl.commands.adduser.parser
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -106,7 +107,7 @@ Source code for matrixctl.addons.adduser.parser
<
-[docs]
+[docs]
@subparser
def subparser_adduser(subparsers: _SubParsersAction[t.Any]) -> None:
"""Create a subparser for the ``matrixctl adduser`` command.
diff --git a/_modules/matrixctl/addons/check/addon.html b/_modules/matrixctl/commands/check/addon.html
similarity index 94%
rename from _modules/matrixctl/addons/check/addon.html
rename to _modules/matrixctl/commands/check/addon.html
index 413af504..a830afd5 100644
--- a/_modules/matrixctl/addons/check/addon.html
+++ b/_modules/matrixctl/commands/check/addon.html
@@ -5,7 +5,7 @@
- matrixctl.addons.check.addon — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.check.addon — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.check.addon
+ Source code for matrixctl.commands.check.addon
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -109,7 +110,7 @@ Source code for matrixctl.addons.check.addon
-[docs]
+[docs]
def addon(_: Namespace, yaml: YAML) -> int:
"""Check the deployment with andible.
diff --git a/_modules/matrixctl/addons/check/parser.html b/_modules/matrixctl/commands/check/parser.html
similarity index 94%
rename from _modules/matrixctl/addons/check/parser.html
rename to _modules/matrixctl/commands/check/parser.html
index daa70cbd..b982f7ab 100644
--- a/_modules/matrixctl/addons/check/parser.html
+++ b/_modules/matrixctl/commands/check/parser.html
@@ -5,7 +5,7 @@
- matrixctl.addons.check.parser — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.check.parser — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.check.parser
+ Source code for matrixctl.commands.check.parser
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -106,7 +107,7 @@ Source code for matrixctl.addons.check.parser
-[docs]
+[docs]
@subparser
def subparser_check(subparsers: _SubParsersAction[t.Any]) -> None:
"""Create a subparser for the ``matrixctl check`` command.
diff --git a/_modules/matrixctl/addons/delete_local_media/addon.html b/_modules/matrixctl/commands/delete_local_media/addon.html
similarity index 94%
rename from _modules/matrixctl/addons/delete_local_media/addon.html
rename to _modules/matrixctl/commands/delete_local_media/addon.html
index ce6093f6..a5958946 100644
--- a/_modules/matrixctl/addons/delete_local_media/addon.html
+++ b/_modules/matrixctl/commands/delete_local_media/addon.html
@@ -5,7 +5,7 @@
- matrixctl.addons.delete_local_media.addon — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.delete_local_media.addon — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.delete_local_media.addon
+ Source code for matrixctl.commands.delete_local_media.addon
# matrixctl
# Copyright (c) 2021-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -119,7 +120,7 @@ Source code for matrixctl.addons.delete_local_media.addon
-[docs]
+[docs]
def addon(arg: Namespace, yaml: YAML) -> int:
"""Delete local media.
@@ -139,16 +140,16 @@ Source code for matrixctl.addons.delete_local_media.addon
timestamp = handle_timestamp(arg.timestamp, force=arg.force)
+ domain = yaml.get("server", "api", "domain")
req: RequestBuilder = RequestBuilder(
token=yaml.get("server", "api", "token"),
domain=yaml.get("server", "api", "domain"),
- path=f"media/{yaml.get('server', 'api', 'domain')}/delete",
+ path=f"/_synapse/admin/v1/media/{domain}/delete",
params={
"before_ts": timestamp,
"keep_profiles": arg.no_keep_profiles,
"size_gt": arg.greater_than,
},
- api_version="v1",
method="POST",
timeout=1200,
)
@@ -176,7 +177,7 @@ Source code for matrixctl.addons.delete_local_media.addon
-[docs]
+[docs]
def handle_timestamp(timestamp: int | None, *, force: bool) -> int:
"""Ask or generate timestamp.
diff --git a/_modules/matrixctl/addons/delete_local_media/parser.html b/_modules/matrixctl/commands/delete_local_media/parser.html
similarity index 95%
rename from _modules/matrixctl/addons/delete_local_media/parser.html
rename to _modules/matrixctl/commands/delete_local_media/parser.html
index 80be58c5..0412e2a2 100644
--- a/_modules/matrixctl/addons/delete_local_media/parser.html
+++ b/_modules/matrixctl/commands/delete_local_media/parser.html
@@ -5,7 +5,7 @@
- matrixctl.addons.delete_local_media.parser — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.delete_local_media.parser — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.delete_local_media.parser
+ Source code for matrixctl.commands.delete_local_media.parser
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -106,7 +107,7 @@ Source code for matrixctl.addons.delete_local_media.parser
-[docs]
+[docs]
@subparser
def subparser_delete_local_media(subparsers: _SubParsersAction[t.Any]) -> None:
"""Create a subparser for the ``matrixctl delete-local_media`` command.
diff --git a/_modules/matrixctl/addons/delroom/addon.html b/_modules/matrixctl/commands/delroom/addon.html
similarity index 95%
rename from _modules/matrixctl/addons/delroom/addon.html
rename to _modules/matrixctl/commands/delroom/addon.html
index 92459ec9..d433eb90 100644
--- a/_modules/matrixctl/addons/delroom/addon.html
+++ b/_modules/matrixctl/commands/delroom/addon.html
@@ -5,7 +5,7 @@
- matrixctl.addons.delroom.addon — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.delroom.addon — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.delroom.addon
+ Source code for matrixctl.commands.delroom.addon
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -115,7 +116,7 @@ Source code for matrixctl.addons.delroom.addon
-[docs]
+[docs]
def addon(arg: Namespace, yaml: YAML) -> int:
"""Delete an empty room from the database.
@@ -137,9 +138,8 @@
Source code for matrixctl.addons.delroom.addon
req: RequestBuilder = RequestBuilder(
token=yaml.get("server", "api", "token"),
domain=yaml.get("server", "api", "domain"),
- path=f"rooms/{arg.room}",
+ path=f"/_synapse/admin/v2/rooms/{arg.room}",
method="DELETE",
- api_version="v2",
json=body,
timeout=1200,
)
@@ -158,7 +158,10 @@
Source code for matrixctl.addons.delroom.addon
raise InternalResponseError(msg) from e
try:
- json_response = handle_status(yaml, json_response["delete_id"])
+ json_response = handle_status(
+ yaml,
+ json_response["delete_id"],
+ )
except InternalResponseError as e:
if e.message:
logger.fatal(e.message)
@@ -176,7 +179,7 @@
Source code for matrixctl.addons.delroom.addon
# TODO: Try to simplify this function
# ruff: noqa: C901
-[docs]
+[docs]
def handle_status(yaml: YAML, delete_id: str) -> JsonDict:
"""Handle the status of a delete room request.
@@ -196,9 +199,8 @@ Source code for matrixctl.addons.delroom.addon
req: RequestBuilder = RequestBuilder(
token=yaml.get("server", "api", "token"),
domain=yaml.get("server", "api", "domain"),
- path=f"rooms/delete_status/{delete_id}",
+ path=f"/_synapse/admin/v2/rooms/delete_status/{delete_id}",
method="GET",
- api_version="v2",
timeout=1200.0,
)
@@ -278,7 +280,7 @@
Source code for matrixctl.addons.delroom.addon
-[docs]
+[docs]
def handle_arguments(arg: Namespace) -> JsonDict:
"""Build the parameters used for the delroom request.
diff --git a/_modules/matrixctl/addons/delroom/parser.html b/_modules/matrixctl/commands/delroom/parser.html
similarity index 96%
rename from _modules/matrixctl/addons/delroom/parser.html
rename to _modules/matrixctl/commands/delroom/parser.html
index d5a0a187..cf44f37c 100644
--- a/_modules/matrixctl/addons/delroom/parser.html
+++ b/_modules/matrixctl/commands/delroom/parser.html
@@ -5,7 +5,7 @@
- matrixctl.addons.delroom.parser — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.delroom.parser — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.delroom.parser
+ Source code for matrixctl.commands.delroom.parser
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -107,7 +108,7 @@ Source code for matrixctl.addons.delroom.parser
<
-[docs]
+[docs]
@subparser
def subparser_delroom(subparsers: _SubParsersAction[t.Any]) -> None:
"""Create a subparser for the ``matrixctl delroom`` command.
diff --git a/_modules/matrixctl/addons/deluser/addon.html b/_modules/matrixctl/commands/deluser/addon.html
similarity index 87%
rename from _modules/matrixctl/addons/deluser/addon.html
rename to _modules/matrixctl/commands/deluser/addon.html
index 754c73fd..80d4caa0 100644
--- a/_modules/matrixctl/addons/deluser/addon.html
+++ b/_modules/matrixctl/commands/deluser/addon.html
@@ -5,7 +5,7 @@
- matrixctl.addons.deluser.addon — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.deluser.addon — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.deluser.addon
+ Source code for matrixctl.commands.deluser.addon
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -111,7 +112,7 @@ Source code for matrixctl.addons.deluser.addon
-[docs]
+[docs]
def addon(arg: Namespace, yaml: YAML) -> int:
"""Delete a user from the the matrix instance.
@@ -128,11 +129,11 @@
Source code for matrixctl.addons.deluser.addon
Non-zero value indicates error code, or zero on success.
"""
+ user_id = f"@{arg.user}:{yaml.get('server', 'api','domain')}"
req: RequestBuilder = RequestBuilder(
token=yaml.get("server", "api", "token"),
domain=yaml.get("server", "api", "domain"),
- path=f"deactivate/@{arg.user}:{yaml.get('server', 'api','domain')}",
- api_version="v1",
+ path=f"/_synapse/admin/v1/deactivate/{user_id}",
method="POST",
json={"erase": True},
)
diff --git a/_modules/matrixctl/addons/deluser/parser.html b/_modules/matrixctl/commands/deluser/parser.html
similarity index 94%
rename from _modules/matrixctl/addons/deluser/parser.html
rename to _modules/matrixctl/commands/deluser/parser.html
index 86ddc167..69e738e5 100644
--- a/_modules/matrixctl/addons/deluser/parser.html
+++ b/_modules/matrixctl/commands/deluser/parser.html
@@ -5,7 +5,7 @@
- matrixctl.addons.deluser.parser — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.deluser.parser — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.deluser.parser
+ Source code for matrixctl.commands.deluser.parser
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -106,7 +107,7 @@ Source code for matrixctl.addons.deluser.parser
<
-[docs]
+[docs]
@subparser
def subparser_deluser(subparsers: _SubParsersAction[t.Any]) -> None:
"""Create a subparser for the ``matrixctl deluser`` command.
diff --git a/_modules/matrixctl/addons/deploy/addon.html b/_modules/matrixctl/commands/deploy/addon.html
similarity index 94%
rename from _modules/matrixctl/addons/deploy/addon.html
rename to _modules/matrixctl/commands/deploy/addon.html
index b72d377d..86a66b6d 100644
--- a/_modules/matrixctl/addons/deploy/addon.html
+++ b/_modules/matrixctl/commands/deploy/addon.html
@@ -5,7 +5,7 @@
- matrixctl.addons.deploy.addon — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.deploy.addon — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.deploy.addon
+ Source code for matrixctl.commands.deploy.addon
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -109,7 +110,7 @@ Source code for matrixctl.addons.deploy.addon
-[docs]
+[docs]
def addon(arg: Namespace, yaml: YAML) -> int:
"""Deploy the ansible playbook.
diff --git a/_modules/matrixctl/addons/deploy/parser.html b/_modules/matrixctl/commands/deploy/parser.html
similarity index 94%
rename from _modules/matrixctl/addons/deploy/parser.html
rename to _modules/matrixctl/commands/deploy/parser.html
index 95cda8b7..7b33d568 100644
--- a/_modules/matrixctl/addons/deploy/parser.html
+++ b/_modules/matrixctl/commands/deploy/parser.html
@@ -5,7 +5,7 @@
- matrixctl.addons.deploy.parser — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.deploy.parser — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.deploy.parser
+ Source code for matrixctl.commands.deploy.parser
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -106,7 +107,7 @@ Source code for matrixctl.addons.deploy.parser
-[docs]
+[docs]
@subparser
def subparser_deploy(subparsers: _SubParsersAction[t.Any]) -> None:
"""Create a subparser for the ``matrixctl deploy`` command.
diff --git a/_modules/matrixctl/addons/download/addon.html b/_modules/matrixctl/commands/download/addon.html
similarity index 93%
rename from _modules/matrixctl/addons/download/addon.html
rename to _modules/matrixctl/commands/download/addon.html
index 21a40eef..90721206 100644
--- a/_modules/matrixctl/addons/download/addon.html
+++ b/_modules/matrixctl/commands/download/addon.html
@@ -5,7 +5,7 @@
- matrixctl.addons.download.addon — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.download.addon — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.download.addon
+ Source code for matrixctl.commands.download.addon
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -111,7 +112,7 @@ Source code for matrixctl.addons.download.addon
<
-[docs]
+[docs]
def addon(arg: Namespace, yaml: YAML) -> int:
"""Download a file or image from the matrix instance.
@@ -147,10 +148,8 @@ Source code for matrixctl.addons.download.addon
<
req: RequestBuilder = RequestBuilder(
token=yaml.get("server", "api", "token"),
domain=yaml.get("server", "api", "domain"),
- path=f"media/download/{homeserver}/{media_id}",
- api_path="_matrix/client",
+ path=f"/_matrix/client/v1/media/download/{homeserver}/{media_id}",
method="GET",
- api_version="v1",
params={"allow_redirect": "true"},
)
# https://matrix.michaelsasser.org/_matrix/media/v3/download/matrix.org/rFzCZiffizZGTyWXWONCVjXw?allow_redirect=true
diff --git a/_modules/matrixctl/addons/download/parser.html b/_modules/matrixctl/commands/download/parser.html
similarity index 94%
rename from _modules/matrixctl/addons/download/parser.html
rename to _modules/matrixctl/commands/download/parser.html
index 8a976d71..c9736e71 100644
--- a/_modules/matrixctl/addons/download/parser.html
+++ b/_modules/matrixctl/commands/download/parser.html
@@ -5,7 +5,7 @@
- matrixctl.addons.download.parser — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.download.parser — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.download.parser
+ Source code for matrixctl.commands.download.parser
# matrixctl
# Copyright (c) 2020-2024 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -106,7 +107,7 @@ Source code for matrixctl.addons.download.parser
-[docs]
+[docs]
@subparser
def subparser_download(subparsers: _SubParsersAction[t.Any]) -> None:
"""Create a subparser for the ``matrixctl download`` command.
diff --git a/_modules/matrixctl/addons/get_event/addon.html b/_modules/matrixctl/commands/get_event/addon.html
similarity index 94%
rename from _modules/matrixctl/addons/get_event/addon.html
rename to _modules/matrixctl/commands/get_event/addon.html
index 4fe247ae..723dc019 100644
--- a/_modules/matrixctl/addons/get_event/addon.html
+++ b/_modules/matrixctl/commands/get_event/addon.html
@@ -5,7 +5,7 @@
- matrixctl.addons.get_event.addon — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.get_event.addon — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.get_event.addon
+ Source code for matrixctl.commands.get_event.addon
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -112,7 +113,7 @@ Source code for matrixctl.addons.get_event.addon
-[docs]
+[docs]
def addon(arg: Namespace, yaml: YAML) -> int:
"""Get an Event from the Server.
@@ -152,7 +153,10 @@ Source code for matrixctl.addons.get_event.addon
return 1
except Exception:
logger.exception(
- "Unable to process the response data to JSON. Response was None"
+ (
+ "Unable to process the response data to JSON."
+ "Response was None"
+ ),
)
return 1
return 0
diff --git a/_modules/matrixctl/addons/get_event/parser.html b/_modules/matrixctl/commands/get_event/parser.html
similarity index 94%
rename from _modules/matrixctl/addons/get_event/parser.html
rename to _modules/matrixctl/commands/get_event/parser.html
index 6f8f9fd7..ba919d08 100644
--- a/_modules/matrixctl/addons/get_event/parser.html
+++ b/_modules/matrixctl/commands/get_event/parser.html
@@ -5,7 +5,7 @@
- matrixctl.addons.get_event.parser — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.get_event.parser — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.get_event.parser
+ Source code for matrixctl.commands.get_event.parser
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -106,7 +107,7 @@ Source code for matrixctl.addons.get_event.parser
-[docs]
+[docs]
@subparser
def subparser_get_event(subparsers: _SubParsersAction[t.Any]) -> None:
"""Create a subparser for the ``matrixctl get-event`` command.
diff --git a/_modules/matrixctl/addons/get_event_context/addon.html b/_modules/matrixctl/commands/get_event_context/addon.html
similarity index 92%
rename from _modules/matrixctl/addons/get_event_context/addon.html
rename to _modules/matrixctl/commands/get_event_context/addon.html
index 0e851e33..74ad9dee 100644
--- a/_modules/matrixctl/addons/get_event_context/addon.html
+++ b/_modules/matrixctl/commands/get_event_context/addon.html
@@ -5,7 +5,7 @@
- matrixctl.addons.get_event_context.addon — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.get_event_context.addon — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.get_event_context.addon
+ Source code for matrixctl.commands.get_event_context.addon
# matrixctl
# Copyright (c) 2021-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -113,7 +114,7 @@ Source code for matrixctl.addons.get_event_context.addon
-[docs]
+[docs]
def addon(arg: Namespace, yaml: YAML) -> int:
"""Find the context of an event.
@@ -133,8 +134,7 @@ Source code for matrixctl.addons.get_event_context.addon
req: RequestBuilder = RequestBuilder(
token=yaml.get("server", "api", "token"),
domain=yaml.get("server", "api", "domain"),
- path=f"rooms/{arg.room}/context/{arg.event}",
- api_version="v1",
+ path=f"/_synapse/admin/v1/rooms/{arg.room}/context/{arg.event}",
method="GET",
timeout=120, # Usually takes 20 to 30 seconds
)
diff --git a/_modules/matrixctl/addons/get_event_context/parser.html b/_modules/matrixctl/commands/get_event_context/parser.html
similarity index 94%
rename from _modules/matrixctl/addons/get_event_context/parser.html
rename to _modules/matrixctl/commands/get_event_context/parser.html
index b524e475..a296e189 100644
--- a/_modules/matrixctl/addons/get_event_context/parser.html
+++ b/_modules/matrixctl/commands/get_event_context/parser.html
@@ -5,7 +5,7 @@
- matrixctl.addons.get_event_context.parser — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.get_event_context.parser — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.get_event_context.parser
+ Source code for matrixctl.commands.get_event_context.parser
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -106,7 +107,7 @@ Source code for matrixctl.addons.get_event_context.parser
-[docs]
+[docs]
@subparser
def subparser_get_event_context(subparsers: _SubParsersAction[t.Any]) -> None:
"""Create a subparser for the ``matrixctl get-event-context`` command.
diff --git a/_modules/matrixctl/addons/get_events/addon.html b/_modules/matrixctl/commands/get_events/addon.html
similarity index 95%
rename from _modules/matrixctl/addons/get_events/addon.html
rename to _modules/matrixctl/commands/get_events/addon.html
index b5ebcbe8..16f72a05 100644
--- a/_modules/matrixctl/addons/get_events/addon.html
+++ b/_modules/matrixctl/commands/get_events/addon.html
@@ -5,7 +5,7 @@
- matrixctl.addons.get_events.addon — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.get_events.addon — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.get_events.addon
+ Source code for matrixctl.commands.get_events.addon
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -115,7 +116,7 @@ Source code for matrixctl.addons.get_events.addon
-[docs]
+[docs]
def addon(arg: Namespace, yaml: YAML) -> int:
"""Get Events from the Server.
@@ -190,7 +191,9 @@ Source code for matrixctl.addons.get_events.addon
)
print("]")
except json.decoder.JSONDecodeError:
- logger.exception("Unable to process the response data to JSON.")
+ logger.exception(
+ "Unable to process the response data to JSON.",
+ )
return 1
return 0
diff --git a/_modules/matrixctl/addons/get_events/parser.html b/_modules/matrixctl/commands/get_events/parser.html
similarity index 94%
rename from _modules/matrixctl/addons/get_events/parser.html
rename to _modules/matrixctl/commands/get_events/parser.html
index f8284d16..1874d3dd 100644
--- a/_modules/matrixctl/addons/get_events/parser.html
+++ b/_modules/matrixctl/commands/get_events/parser.html
@@ -5,7 +5,7 @@
- matrixctl.addons.get_events.parser — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.get_events.parser — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.get_events.parser
+ Source code for matrixctl.commands.get_events.parser
# matrixctl
# Copyright (c) 2021-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -106,7 +107,7 @@ Source code for matrixctl.addons.get_events.parser
-[docs]
+[docs]
@subparser
def subparser_get_events(subparsers: _SubParsersAction[t.Any]) -> None:
"""Create a subparser for the ``matrixctl get-event`` command.
diff --git a/_modules/matrixctl/addons/is_admin/addon.html b/_modules/matrixctl/commands/is_admin/addon.html
similarity index 89%
rename from _modules/matrixctl/addons/is_admin/addon.html
rename to _modules/matrixctl/commands/is_admin/addon.html
index 13fccd83..3179525f 100644
--- a/_modules/matrixctl/addons/is_admin/addon.html
+++ b/_modules/matrixctl/commands/is_admin/addon.html
@@ -5,7 +5,7 @@
- matrixctl.addons.is_admin.addon — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.is_admin.addon — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.is_admin.addon
+ Source code for matrixctl.commands.is_admin.addon
# matrixctl
# Copyright (c) 2021-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -115,7 +116,7 @@ Source code for matrixctl.addons.is_admin.addon
<
-[docs]
+[docs]
def addon(arg: Namespace, yaml: YAML) -> int:
"""Delete a user is an admin.
@@ -136,11 +137,11 @@ Source code for matrixctl.addons.is_admin.addon
<
Non-zero value indicates error code, or zero on success.
"""
+ user_id = f"@{arg.user}:{yaml.get('server', 'api','domain')}"
req: RequestBuilder = RequestBuilder(
token=yaml.get("server", "api", "token"),
domain=yaml.get("server", "api", "domain"),
- path=f"users/@{arg.user}:{yaml.get('server', 'api','domain')}/admin",
- api_version="v1",
+ path=f"/_synapse/admin/v1/users/{user_id}/admin",
method="GET",
)
try:
diff --git a/_modules/matrixctl/addons/is_admin/parser.html b/_modules/matrixctl/commands/is_admin/parser.html
similarity index 94%
rename from _modules/matrixctl/addons/is_admin/parser.html
rename to _modules/matrixctl/commands/is_admin/parser.html
index dae2d778..20365577 100644
--- a/_modules/matrixctl/addons/is_admin/parser.html
+++ b/_modules/matrixctl/commands/is_admin/parser.html
@@ -5,7 +5,7 @@
- matrixctl.addons.is_admin.parser — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.is_admin.parser — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.is_admin.parser
+ Source code for matrixctl.commands.is_admin.parser
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -106,7 +107,7 @@ Source code for matrixctl.addons.is_admin.parser
-[docs]
+[docs]
@subparser
def subparser_is_admin(subparsers: _SubParsersAction[t.Any]) -> None:
"""Create a subparser for the ``matrixctl is-admin`` command.
diff --git a/_modules/matrixctl/addons/joinroom/addon.html b/_modules/matrixctl/commands/joinroom/addon.html
similarity index 93%
rename from _modules/matrixctl/addons/joinroom/addon.html
rename to _modules/matrixctl/commands/joinroom/addon.html
index 59e2c064..3bf17243 100644
--- a/_modules/matrixctl/addons/joinroom/addon.html
+++ b/_modules/matrixctl/commands/joinroom/addon.html
@@ -5,7 +5,7 @@
- matrixctl.addons.joinroom.addon — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.joinroom.addon — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.joinroom.addon
+ Source code for matrixctl.commands.joinroom.addon
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -111,7 +112,7 @@ Source code for matrixctl.addons.joinroom.addon
<
-[docs]
+[docs]
def addon(arg: Namespace, yaml: YAML) -> int:
"""Join a user to an room.
@@ -156,15 +157,16 @@ Source code for matrixctl.addons.joinroom.addon
<
request_config: RequestBuilder = RequestBuilder(
token=yaml.get("server", "api", "token"),
domain=yaml.get("server", "api", "domain"),
- path=f"join/{arg.room}",
- api_version="v1",
+ path=f"/_synapse/admin/v1/join/{arg.room}",
method="POST",
json={"user_id": arg.user},
)
try:
request(request_config)
except InternalResponseError:
- logger.exception("Unknown Error. The user was not joined to the room.")
+ logger.exception(
+ "Unknown Error. The user was not joined to the room.",
+ )
return 0
diff --git a/_modules/matrixctl/addons/joinroom/parser.html b/_modules/matrixctl/commands/joinroom/parser.html
similarity index 94%
rename from _modules/matrixctl/addons/joinroom/parser.html
rename to _modules/matrixctl/commands/joinroom/parser.html
index 48d5e78e..38cd5d7c 100644
--- a/_modules/matrixctl/addons/joinroom/parser.html
+++ b/_modules/matrixctl/commands/joinroom/parser.html
@@ -5,7 +5,7 @@
- matrixctl.addons.joinroom.parser — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.joinroom.parser — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.joinroom.parser
+ Source code for matrixctl.commands.joinroom.parser
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -106,7 +107,7 @@ Source code for matrixctl.addons.joinroom.parser
-[docs]
+[docs]
@subparser
def subparser_deluser(subparsers: _SubParsersAction[t.Any]) -> None:
"""Create a subparser for the ``matrixctl joinroom`` command.
diff --git a/_modules/matrixctl/addons/largest_rooms/addon.html b/_modules/matrixctl/commands/largest_rooms/addon.html
similarity index 95%
rename from _modules/matrixctl/addons/largest_rooms/addon.html
rename to _modules/matrixctl/commands/largest_rooms/addon.html
index 27743766..275013a3 100644
--- a/_modules/matrixctl/addons/largest_rooms/addon.html
+++ b/_modules/matrixctl/commands/largest_rooms/addon.html
@@ -5,7 +5,7 @@
- matrixctl.addons.largest_rooms.addon — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.largest_rooms.addon — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.largest_rooms.addon
+ Source code for matrixctl.commands.largest_rooms.addon
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -118,7 +119,7 @@ Source code for matrixctl.addons.largest_rooms.addon
-[docs]
+[docs]
def addon(arg: Namespace, yaml: YAML) -> int:
"""Generate a table of the top 10 matrix rooms in terms of DB storage.
@@ -138,8 +139,7 @@ Source code for matrixctl.addons.largest_rooms.addon
req: RequestBuilder = RequestBuilder(
token=yaml.get("server", "api", "token"),
domain=yaml.get("server", "api", "domain"),
- path="statistics/database/rooms",
- api_version="v1",
+ path="/_synapse/admin/v1/statistics/database/rooms",
)
try:
@@ -159,7 +159,7 @@ Source code for matrixctl.addons.largest_rooms.addon
-[docs]
+[docs]
def generate_output(rooms: list[JsonDict], *, to_json: bool) -> None:
"""Use this helper to generate the output.
diff --git a/_modules/matrixctl/addons/largest_rooms/parser.html b/_modules/matrixctl/commands/largest_rooms/parser.html
similarity index 94%
rename from _modules/matrixctl/addons/largest_rooms/parser.html
rename to _modules/matrixctl/commands/largest_rooms/parser.html
index fbfd5c35..6dd3ef35 100644
--- a/_modules/matrixctl/addons/largest_rooms/parser.html
+++ b/_modules/matrixctl/commands/largest_rooms/parser.html
@@ -5,7 +5,7 @@
- matrixctl.addons.largest_rooms.parser — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.largest_rooms.parser — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.largest_rooms.parser
+ Source code for matrixctl.commands.largest_rooms.parser
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -106,7 +107,7 @@ Source code for matrixctl.addons.largest_rooms.parser
-[docs]
+[docs]
@subparser
def subparser_rooms(subparsers: _SubParsersAction[t.Any]) -> None:
"""Create a subparser for the ``matrixctl largest-rooms`` command.
diff --git a/_modules/matrixctl/addons/largest_rooms/to_table.html b/_modules/matrixctl/commands/largest_rooms/to_table.html
similarity index 95%
rename from _modules/matrixctl/addons/largest_rooms/to_table.html
rename to _modules/matrixctl/commands/largest_rooms/to_table.html
index 37b524f6..bcf315c4 100644
--- a/_modules/matrixctl/addons/largest_rooms/to_table.html
+++ b/_modules/matrixctl/commands/largest_rooms/to_table.html
@@ -5,7 +5,7 @@
- matrixctl.addons.largest_rooms.to_table — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.largest_rooms.to_table — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.largest_rooms.to_table
+ Source code for matrixctl.commands.largest_rooms.to_table
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -109,7 +110,7 @@ Source code for matrixctl.addons.largest_rooms.to_table
-[docs]
+[docs]
def format_bytes(size: int) -> str:
"""Format bytes (storage) into a string using the correct prefix.
@@ -136,7 +137,7 @@ Source code for matrixctl.addons.largest_rooms.to_table
-[docs]
+[docs]
def to_table(rooms_list: list[JsonDict]) -> Generator[str, None, None]:
"""Use this function as helper to pint the largest-room table.
diff --git a/_modules/matrixctl/addons/maintenance/addon.html b/_modules/matrixctl/commands/maintenance/addon.html
similarity index 95%
rename from _modules/matrixctl/addons/maintenance/addon.html
rename to _modules/matrixctl/commands/maintenance/addon.html
index 8d8081ce..c8ef8ab2 100644
--- a/_modules/matrixctl/addons/maintenance/addon.html
+++ b/_modules/matrixctl/commands/maintenance/addon.html
@@ -5,7 +5,7 @@
- matrixctl.addons.maintenance.addon — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.maintenance.addon — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.maintenance.addon
+ Source code for matrixctl.commands.maintenance.addon
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -113,7 +114,7 @@ Source code for matrixctl.addons.maintenance.addon
-[docs]
+[docs]
@unique
class Task(Enum):
"""Use this enum for describing the maintenance task.
@@ -135,7 +136,7 @@ Source code for matrixctl.addons.maintenance.addon
-[docs]
+[docs]
def print_tasks() -> None: # static data
"""Print a list of all available tasks."""
table_generator: Generator[str, None, None] = table(
@@ -152,7 +153,7 @@ Source code for matrixctl.addons.maintenance.addon
-[docs]
+[docs]
def addon(arg: Namespace, yaml: YAML) -> int:
"""Run the maintenance procedure of the ansible playbook.
diff --git a/_modules/matrixctl/addons/maintenance/parser.html b/_modules/matrixctl/commands/maintenance/parser.html
similarity index 94%
rename from _modules/matrixctl/addons/maintenance/parser.html
rename to _modules/matrixctl/commands/maintenance/parser.html
index 5ca5e96a..cbb695df 100644
--- a/_modules/matrixctl/addons/maintenance/parser.html
+++ b/_modules/matrixctl/commands/maintenance/parser.html
@@ -5,7 +5,7 @@
- matrixctl.addons.maintenance.parser — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.maintenance.parser — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.maintenance.parser
+ Source code for matrixctl.commands.maintenance.parser
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -106,7 +107,7 @@ Source code for matrixctl.addons.maintenance.parser
-[docs]
+[docs]
@subparser
def subparser_maintenance(subparsers: _SubParsersAction[t.Any]) -> None:
"""Create a subparser for the ``matrixctl maintenance`` command.
diff --git a/_modules/matrixctl/addons/make_room_admin/addon.html b/_modules/matrixctl/commands/make_room_admin/addon.html
similarity index 93%
rename from _modules/matrixctl/addons/make_room_admin/addon.html
rename to _modules/matrixctl/commands/make_room_admin/addon.html
index 5e3c45f9..a4d1b72b 100644
--- a/_modules/matrixctl/addons/make_room_admin/addon.html
+++ b/_modules/matrixctl/commands/make_room_admin/addon.html
@@ -5,7 +5,7 @@
- matrixctl.addons.make_room_admin.addon — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.make_room_admin.addon — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.make_room_admin.addon
+ Source code for matrixctl.commands.make_room_admin.addon
# matrixctl
# Copyright (c) 2021-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -116,7 +117,7 @@ Source code for matrixctl.addons.make_room_admin.addon
-[docs]
+[docs]
def addon(arg: Namespace, yaml: YAML) -> int:
"""Grant a user room admin status.
@@ -139,8 +140,7 @@ Source code for matrixctl.addons.make_room_admin.addon
req: RequestBuilder = RequestBuilder(
token=yaml.get("server", "api", "token"),
domain=yaml.get("server", "api", "domain"),
- path=f"rooms/{arg.room}/make_room_admin",
- api_version="v1",
+ path=f"/_synapse/admin/v1/rooms/{arg.room}/make_room_admin",
method="POST",
)
diff --git a/_modules/matrixctl/addons/make_room_admin/parser.html b/_modules/matrixctl/commands/make_room_admin/parser.html
similarity index 94%
rename from _modules/matrixctl/addons/make_room_admin/parser.html
rename to _modules/matrixctl/commands/make_room_admin/parser.html
index b97a167b..15725c93 100644
--- a/_modules/matrixctl/addons/make_room_admin/parser.html
+++ b/_modules/matrixctl/commands/make_room_admin/parser.html
@@ -5,7 +5,7 @@
- matrixctl.addons.make_room_admin.parser — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.make_room_admin.parser — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.make_room_admin.parser
+ Source code for matrixctl.commands.make_room_admin.parser
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -106,7 +107,7 @@ Source code for matrixctl.addons.make_room_admin.parser
-[docs]
+[docs]
@subparser
def subparser_make_room_admin(subparsers: _SubParsersAction[t.Any]) -> None:
"""Create a subparser for the ``matrixctl make-room-admin`` command.
diff --git a/_modules/matrixctl/addons/purge_history/addon.html b/_modules/matrixctl/commands/purge_history/addon.html
similarity index 94%
rename from _modules/matrixctl/addons/purge_history/addon.html
rename to _modules/matrixctl/commands/purge_history/addon.html
index b3e50868..26a30412 100644
--- a/_modules/matrixctl/addons/purge_history/addon.html
+++ b/_modules/matrixctl/commands/purge_history/addon.html
@@ -5,7 +5,7 @@
- matrixctl.addons.purge_history.addon — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.purge_history.addon — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.purge_history.addon
+ Source code for matrixctl.commands.purge_history.addon
# matrixctl
# Copyright (c) 2021-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -119,7 +120,7 @@ Source code for matrixctl.addons.purge_history.addon
-[docs]
+[docs]
def addon(arg: Namespace, yaml: YAML) -> int:
"""Purge historic message events from the Database.
@@ -145,9 +146,8 @@ Source code for matrixctl.addons.purge_history.addon
req: RequestBuilder = RequestBuilder(
token=yaml.get("server", "api", "token"),
domain=yaml.get("server", "api", "domain"),
- path=f"purge_history/{arg.room_id.strip()}",
+ path=f"/_synapse/admin/v1/purge_history/{arg.room_id.strip()}",
method="POST",
- api_version="v1",
json=request_body,
timeout=10,
)
diff --git a/_modules/matrixctl/addons/purge_history/dialog.html b/_modules/matrixctl/commands/purge_history/dialog.html
similarity index 96%
rename from _modules/matrixctl/addons/purge_history/dialog.html
rename to _modules/matrixctl/commands/purge_history/dialog.html
index fed4cd21..fc5d4240 100644
--- a/_modules/matrixctl/addons/purge_history/dialog.html
+++ b/_modules/matrixctl/commands/purge_history/dialog.html
@@ -5,7 +5,7 @@
- matrixctl.addons.purge_history.dialog — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.purge_history.dialog — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.purge_history.dialog
+ Source code for matrixctl.commands.purge_history.dialog
# matrixctl
# Copyright (c) 2021-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -115,7 +116,7 @@ Source code for matrixctl.addons.purge_history.dialog
-[docs]
+[docs]
def dialog_input(arg: Namespace) -> dict[str, str | int]:
"""Ask questions and sanitize them.
diff --git a/_modules/matrixctl/addons/purge_history/handler.html b/_modules/matrixctl/commands/purge_history/handler.html
similarity index 94%
rename from _modules/matrixctl/addons/purge_history/handler.html
rename to _modules/matrixctl/commands/purge_history/handler.html
index 7600651e..d1ef5653 100644
--- a/_modules/matrixctl/addons/purge_history/handler.html
+++ b/_modules/matrixctl/commands/purge_history/handler.html
@@ -5,7 +5,7 @@
- matrixctl.addons.purge_history.handler — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.purge_history.handler — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.purge_history.handler
+ Source code for matrixctl.commands.purge_history.handler
# matrixctl
# Copyright (c) 2021-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -115,7 +116,7 @@ Source code for matrixctl.addons.purge_history.handler
-[docs]
+[docs]
def handle_purge_status(yaml: YAML, purge_id: str) -> int:
"""Check the status of the purge history request.
@@ -135,9 +136,8 @@ Source code for matrixctl.addons.purge_history.handler
req: RequestBuilder = RequestBuilder(
token=yaml.get("server", "api", "token"),
domain=yaml.get("server", "api", "domain"),
- path=f"purge_history_status/{purge_id}",
+ path=f"/_synapse/admin/v1/purge_history_status/{purge_id}",
method="GET",
- api_version="v1",
timeout=1200.0,
)
diff --git a/_modules/matrixctl/addons/purge_history/parser.html b/_modules/matrixctl/commands/purge_history/parser.html
similarity index 95%
rename from _modules/matrixctl/addons/purge_history/parser.html
rename to _modules/matrixctl/commands/purge_history/parser.html
index 9b6914e8..3f4c973d 100644
--- a/_modules/matrixctl/addons/purge_history/parser.html
+++ b/_modules/matrixctl/commands/purge_history/parser.html
@@ -5,7 +5,7 @@
- matrixctl.addons.purge_history.parser — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.purge_history.parser — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.purge_history.parser
+ Source code for matrixctl.commands.purge_history.parser
# matrixctl
# Copyright (c) 2021-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -109,7 +110,7 @@ Source code for matrixctl.addons.purge_history.parser
-[docs]
+[docs]
@subparser
def subparser_purge_history(subparsers: _SubParsersAction[t.Any]) -> None:
"""Create a subparser for the ``matrixctl purge-history`` command.
diff --git a/_modules/matrixctl/addons/purge_history/timing.html b/_modules/matrixctl/commands/purge_history/timing.html
similarity index 94%
rename from _modules/matrixctl/addons/purge_history/timing.html
rename to _modules/matrixctl/commands/purge_history/timing.html
index ebfacba7..a64a977f 100644
--- a/_modules/matrixctl/addons/purge_history/timing.html
+++ b/_modules/matrixctl/commands/purge_history/timing.html
@@ -5,7 +5,7 @@
- matrixctl.addons.purge_history.timing — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.purge_history.timing — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.purge_history.timing
+ Source code for matrixctl.commands.purge_history.timing
# matrixctl
# Copyright (c) 2021-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -110,7 +111,7 @@ Source code for matrixctl.addons.purge_history.timing
-[docs]
+[docs]
def check_point_in_time(
event_or_timestamp: str,
) -> dict[str, str | int] | None:
diff --git a/_modules/matrixctl/addons/purge_remote_media/addon.html b/_modules/matrixctl/commands/purge_remote_media/addon.html
similarity index 96%
rename from _modules/matrixctl/addons/purge_remote_media/addon.html
rename to _modules/matrixctl/commands/purge_remote_media/addon.html
index d5396769..5132a710 100644
--- a/_modules/matrixctl/addons/purge_remote_media/addon.html
+++ b/_modules/matrixctl/commands/purge_remote_media/addon.html
@@ -5,7 +5,7 @@
- matrixctl.addons.purge_remote_media.addon — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.purge_remote_media.addon — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.purge_remote_media.addon
+ Source code for matrixctl.commands.purge_remote_media.addon
# matrixctl
# Copyright (c) 2021-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -119,7 +120,7 @@ Source code for matrixctl.addons.purge_remote_media.addon
-[docs]
+[docs]
def addon(arg: Namespace, yaml: YAML) -> int:
"""Remove remote media.
@@ -142,9 +143,8 @@ Source code for matrixctl.addons.purge_remote_media.addon
req: RequestBuilder = RequestBuilder(
token=yaml.get("server", "api", "token"),
domain=yaml.get("server", "api", "domain"),
- path="purge_media_cache",
+ path="/_synapse/admin/v1/purge_media_cache",
params={"before_ts": timestamp},
- api_version="v1",
method="POST",
timeout=1200,
)
@@ -176,7 +176,7 @@ Source code for matrixctl.addons.purge_remote_media.addon
-[docs]
+[docs]
def handle_timestamp(timestamp: int | None, *, force: bool) -> int:
"""Ask or generate timestamp.
diff --git a/_modules/matrixctl/addons/purge_remote_media/parser.html b/_modules/matrixctl/commands/purge_remote_media/parser.html
similarity index 94%
rename from _modules/matrixctl/addons/purge_remote_media/parser.html
rename to _modules/matrixctl/commands/purge_remote_media/parser.html
index 645735c5..abd298cc 100644
--- a/_modules/matrixctl/addons/purge_remote_media/parser.html
+++ b/_modules/matrixctl/commands/purge_remote_media/parser.html
@@ -5,7 +5,7 @@
- matrixctl.addons.purge_remote_media.parser — MatrixCtl 0.12.0 documentation
+ matrixctl.commands.purge_remote_media.parser — MatrixCtl 0.12.0 documentation
@@ -46,6 +46,7 @@
Getting Started
Contributor Documentation
Changelog
+Changelog (deprecated)
@@ -63,7 +64,7 @@
@@ -72,7 +73,7 @@
- Source code for matrixctl.addons.purge_remote_media.parser
+ Source code for matrixctl.commands.purge_remote_media.parser
# matrixctl
# Copyright (c) 2020-2023 Michael Sasser <Michael@MichaelSasser.org>
#
@@ -106,7 +107,7 @@ Source code for matrixctl.addons.purge_remote_media.parser
-