Matridge 0.2.2__tar.gz → 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {matridge-0.2.2 → matridge-0.2.3}/.copier-answers.yml +3 -1
- {matridge-0.2.2 → matridge-0.2.3}/.woodpecker/container.yaml +1 -0
- {matridge-0.2.2 → matridge-0.2.3}/.woodpecker/docs.yaml +1 -2
- {matridge-0.2.2 → matridge-0.2.3}/.woodpecker/test.yaml +1 -2
- matridge-0.2.3/CONTRIBUTING.md +100 -0
- {matridge-0.2.2/matridge.egg-info → matridge-0.2.3}/PKG-INFO +15 -31
- matridge-0.2.3/README.md +42 -0
- matridge-0.2.3/assets/matrix_outline.png +0 -0
- matridge-0.2.3/assets/matrix_outline.svg +71 -0
- {matridge-0.2.2/docs/source → matridge-0.2.3/docs/source/admin}/config.rst +11 -1
- matridge-0.2.3/docs/source/admin/index.rst +15 -0
- matridge-0.2.3/docs/source/admin/install.rst +71 -0
- {matridge-0.2.2 → matridge-0.2.3}/docs/source/conf.py +1 -1
- matridge-0.2.3/docs/source/contributing.rst +5 -0
- matridge-0.2.3/docs/source/index.rst +39 -0
- {matridge-0.2.2/docs/source → matridge-0.2.3/docs/source/user}/features.rst +5 -1
- matridge-0.2.3/docs/source/user/index.rst +14 -0
- matridge-0.2.3/docs/source/user/registration.rst +16 -0
- matridge-0.2.2/docs/source/user.rst → matridge-0.2.3/docs/source/user/usage.rst +4 -3
- {matridge-0.2.2 → matridge-0.2.3}/matridge/gateway.py +3 -1
- {matridge-0.2.2 → matridge-0.2.3}/matridge/matrix.py +4 -3
- {matridge-0.2.2 → matridge-0.2.3}/matridge/session.py +12 -9
- {matridge-0.2.2 → matridge-0.2.3/matridge.egg-info}/PKG-INFO +15 -31
- {matridge-0.2.2 → matridge-0.2.3}/matridge.egg-info/SOURCES.txt +11 -4
- {matridge-0.2.2 → matridge-0.2.3}/uv.lock +216 -170
- matridge-0.2.2/README.md +0 -58
- matridge-0.2.2/docs/source/index.rst +0 -27
- matridge-0.2.2/docs/source/readme.rst +0 -1
- {matridge-0.2.2 → matridge-0.2.3}/.gitignore +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/.pre-commit-config.yaml +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/.woodpecker/autoupdate-deps.yaml +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/.woodpecker/package.yaml +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/Dockerfile +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/LICENSE +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/commitlint.config.js +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/doap.xml +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/docker-compose.yml +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/docs/Makefile +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/docs/source/codeberg.svg +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/matridge/__init__.py +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/matridge/__main__.py +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/matridge/command.py +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/matridge/config.py +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/matridge/contact.py +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/matridge/group.py +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/matridge/reactions.py +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/matridge/util.py +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/matridge.egg-info/dependency_links.txt +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/matridge.egg-info/entry_points.txt +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/matridge.egg-info/requires.txt +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/matridge.egg-info/top_level.txt +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/pyproject.toml +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/setup.cfg +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/tests/test_base.py +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/tests/test_conversion.py +0 -0
- {matridge-0.2.2 → matridge-0.2.3}/tests/test_reactions.py +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Do not edit manually!
|
|
2
2
|
# Changes here will be overwritten by copier.
|
|
3
3
|
# https://copier.readthedocs.io/
|
|
4
|
-
_commit:
|
|
4
|
+
_commit: c2c396f
|
|
5
5
|
_src_path: git+https://codeberg.org/slidge/legacy-module-template
|
|
6
6
|
authors:
|
|
7
7
|
- email: nicoco@nicoco.fr
|
|
@@ -27,6 +27,7 @@ container_runtime_deps: []
|
|
|
27
27
|
custom_build_system: ''
|
|
28
28
|
custom_readme_head: ''
|
|
29
29
|
custom_readme_tail: ''
|
|
30
|
+
debian_bundle: true
|
|
30
31
|
dependencies:
|
|
31
32
|
- matrix-nio[e2e]>=0.25,<0.26
|
|
32
33
|
- beautifulsoup4>=4.12.2,<5
|
|
@@ -42,6 +43,7 @@ mypy_ignores:
|
|
|
42
43
|
native_builds: false
|
|
43
44
|
pre_commit_custom_hooks: ''
|
|
44
45
|
project_name: matridge
|
|
46
|
+
repology: slidge-matridge
|
|
45
47
|
requires_lottie: false
|
|
46
48
|
silo:
|
|
47
49
|
lib:
|
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
when:
|
|
5
5
|
event: [push, tag, pull_request]
|
|
6
|
-
path: ["matridge/**/*.py", "docs/**/*", "
|
|
6
|
+
path: ["matridge/**/*.py", "docs/**/*", "uv.lock", ".woodpecker/docs.yaml"]
|
|
7
7
|
|
|
8
8
|
steps:
|
|
9
9
|
build:
|
|
10
10
|
image: codeberg.org/${CI_REPO_OWNER}/matridge:ci
|
|
11
11
|
pull: true
|
|
12
12
|
commands:
|
|
13
|
-
- cp -r /venv .venv
|
|
14
13
|
- uv sync --all-groups --all-extras
|
|
15
14
|
- cd docs && make html
|
|
16
15
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
when:
|
|
5
5
|
event: [push, pull_request]
|
|
6
|
-
path: [pyproject.toml, uv.lock, "**/*.py"]
|
|
6
|
+
path: [pyproject.toml, uv.lock, "**/*.py", ".woodpecker/test.yaml"]
|
|
7
7
|
|
|
8
8
|
variables:
|
|
9
9
|
- &ci-image codeberg.org/${CI_REPO_OWNER}/matridge:ci
|
|
@@ -13,7 +13,6 @@ steps:
|
|
|
13
13
|
image: *ci-image
|
|
14
14
|
pull: true
|
|
15
15
|
commands:
|
|
16
|
-
- cp -r /venv .venv
|
|
17
16
|
- uv sync --all-groups --all-extras
|
|
18
17
|
|
|
19
18
|
ruff:
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
We are really happy to welcome new contributors to matridge!
|
|
4
|
+
Before starting anything, please join [our chat room](xmpp:slidge@conference.nicoco.fr?join)
|
|
5
|
+
to say hi and see if anyone is already working on the bug you want to fix or
|
|
6
|
+
the feature you want to implement.
|
|
7
|
+
|
|
8
|
+
## Quickstart
|
|
9
|
+
|
|
10
|
+
To start hacking on matridge, you need to:
|
|
11
|
+
|
|
12
|
+
1. Clone the repository: `git clone https://codeberg.org/slidge/matridge`.
|
|
13
|
+
2. Install the required dependencies. (see below)
|
|
14
|
+
3. Spin up a development XMPP server for matridge to connect to. (see below)
|
|
15
|
+
|
|
16
|
+
### Easy mode: docker-compose
|
|
17
|
+
|
|
18
|
+
The easiest way to achieve 2 and 3 at the same time is to use the provided
|
|
19
|
+
`docker-compose.yml` file. Run ``docker compose up`` (or ``podman-compose up``)
|
|
20
|
+
in the directory of the repository you just cloned. It will:
|
|
21
|
+
|
|
22
|
+
- spin up a [prosody](https://prosody.im) instance configured for development;
|
|
23
|
+
- launch matridge in a dedicated container, with hot code reload.
|
|
24
|
+
|
|
25
|
+
You will then be able to connect to that prosody using any XMPP client, using
|
|
26
|
+
"test@localhost" as JID and "password" as password. We recommended
|
|
27
|
+
[gajim](https://gajim.org) which lets you start a different profile than your
|
|
28
|
+
main profile: `gajim -p slidge -c ~/.local/share/gajim-slidge`.
|
|
29
|
+
|
|
30
|
+
To avoid having to accept self-signed certificates, you can add prosody's
|
|
31
|
+
certificate to your local store. In debian, you can do that with:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
# download the certificate
|
|
35
|
+
curl https://codeberg.org/slidge/prosody-dev-container/raw/branch/main/localhost.crt | sudo tee /usr/local/share/ca-certificates/localhost.crt
|
|
36
|
+
# set the right perms
|
|
37
|
+
chmod 600 /usr/local/share/ca-certificates/localhost.crt
|
|
38
|
+
# import it
|
|
39
|
+
sudo update-ca-certificates
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Slightly harder mode: setting up a virtualenv
|
|
43
|
+
|
|
44
|
+
In some situations, developing in containers is not optimal, for instance if
|
|
45
|
+
you want to attach an interactive debugger to the matridge process.
|
|
46
|
+
|
|
47
|
+
matridge defines its dependencies in a [PEP 517](https://peps.python.org/pep-0517/)-compliant
|
|
48
|
+
`pyproject.toml` file. This means that you can use different tools to set up a
|
|
49
|
+
virtualenv with the appropriate dependencies.
|
|
50
|
+
|
|
51
|
+
We recommend using [uv](https://docs.astral.sh/uv/) which is fast and has some
|
|
52
|
+
nice features. By running ``uv sync --frozen --all-groups --all-extras``, a
|
|
53
|
+
standard virtualenv will be installed in `./.venv`. You can then activate it
|
|
54
|
+
with `source .venv/bin/activate` and launch `matridge --help`.
|
|
55
|
+
|
|
56
|
+
NB: you will need to set up a local XMPP server. An easy way to do that is to
|
|
57
|
+
use the `slidge-prosody-dev` container: `docker run --network host codeberg.org/slidge/prosody-slidge-dev`.
|
|
58
|
+
With it you will be able to launch matridge with
|
|
59
|
+
``matridge --jid slidge.localhost --secret secret --debug --home-dir ./persistent``.
|
|
60
|
+
|
|
61
|
+
### Hacking on slidge core simultaneously
|
|
62
|
+
|
|
63
|
+
Maybe you will discover that what you want to change, add or fix is not part
|
|
64
|
+
of matridge but part of slidge core. To modify slidge core, first you
|
|
65
|
+
need to clone [the slidge repo](https://codeberg.org/slidge/slidge) somewhere
|
|
66
|
+
on your computer.
|
|
67
|
+
|
|
68
|
+
Let's assume you cloned `slidge` in the same root dir as `matridge`,
|
|
69
|
+
e.g., `~/src/matridge` and `~/src/slidge`.
|
|
70
|
+
With the `docker-compose`-based dev setup, you will need to add an additional
|
|
71
|
+
mount for the slidge dir, e.g., `../slidge:/build/slidge`. If you opted for
|
|
72
|
+
the virtualenv solution, you can install slidge in your virtualenv in editable
|
|
73
|
+
mode with `[uv] pip install -e ../slidge`.
|
|
74
|
+
|
|
75
|
+
## Guidelines
|
|
76
|
+
|
|
77
|
+
matridge uses these tools to ensure some level of code quality:
|
|
78
|
+
|
|
79
|
+
- [mypy](https://www.mypy-lang.org/)
|
|
80
|
+
for static type checking,
|
|
81
|
+
- [ruff](https://docs.astral.sh/ruff/)
|
|
82
|
+
to detect common python mistakes and enforce a consistent style,
|
|
83
|
+
- [pytest](https://docs.pytest.org/en/stable/)
|
|
84
|
+
for automated tests.
|
|
85
|
+
|
|
86
|
+
Commit messages should be in the form of
|
|
87
|
+
[conventional commits](https://www.conventionalcommits.org/en/v1.0.0/), with
|
|
88
|
+
some additional types defined in [./commitlinx.config.js](https://codeberg.org/slidge/matridge/src/branch/main/commitlint.config.js).
|
|
89
|
+
This makes it possible to automatically generate changelogs on releases, it
|
|
90
|
+
is worth it! We use [git-cliff](https://git-cliff.org/) for this. You don't have
|
|
91
|
+
to install git-cliff locally, the magic happens in CI.
|
|
92
|
+
|
|
93
|
+
We recommended setting up [pre-commit](https://pre-commit.com/) to ensure that
|
|
94
|
+
these pass for each commit: `pre-commit install && pre-commit install --hook-type commit-msg`.
|
|
95
|
+
|
|
96
|
+
Make a new git branch, commit your changes, push it to your fork and open a
|
|
97
|
+
pull request!
|
|
98
|
+
|
|
99
|
+
NB: we also accept contributions without pull requests. Just push your changes
|
|
100
|
+
somewhere and tell us where to pull via the group chat.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: matridge
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.3
|
|
4
4
|
Summary: A Matrix/XMPP gateway
|
|
5
5
|
Author-email: Nicolas Cedilnik <nicoco@nicoco.fr>
|
|
6
6
|
License-Expression: AGPL-3.0-or-later
|
|
@@ -25,58 +25,42 @@ Dynamic: license-file
|
|
|
25
25
|
# matridge
|
|
26
26
|
|
|
27
27
|
A
|
|
28
|
-
[feature-rich](https://slidge.im/docs/matridge/main/features.html)
|
|
28
|
+
[feature-rich](https://slidge.im/docs/matridge/main/user/features.html)
|
|
29
29
|
[Matrix](https://matrix.org) to
|
|
30
30
|
[XMPP](https://xmpp.org/) puppeteering
|
|
31
31
|
[gateway](https://xmpp.org/extensions/xep-0100.html), based on
|
|
32
32
|
[slidge](https://slidge.im) and
|
|
33
33
|
[nio](https://matrix-nio.readthedocs.io/).
|
|
34
34
|
|
|
35
|
-
[](https://pypi.org/project/matridge/)
|
|
36
35
|
[](https://ci.codeberg.org/repos/14069)
|
|
37
36
|
[](https://slidge.im/xmpp-web/#/guest?join=slidge@conference.nicoco.fr)
|
|
37
|
+
[](https://pypi.org/project/matridge/)
|
|
38
38
|
|
|
39
|
+
[](https://repology.org/project/slidge-matridge/versions)
|
|
39
40
|
|
|
40
|
-
## Installation
|
|
41
|
-
|
|
42
|
-
Refer to the [slidge admin documentation](https://slidge.im/docs/slidge/main/admin/)
|
|
43
|
-
for general info on how to set up an XMPP server component.
|
|
44
41
|
|
|
45
|
-
|
|
42
|
+
matridge lets you chat with users of Matrix without leaving your favorite XMPP client.
|
|
46
43
|
|
|
47
|
-
|
|
44
|
+
## Quickstart
|
|
48
45
|
|
|
49
46
|
```sh
|
|
50
|
-
docker run codeberg.org/slidge/matridge # works with podman too
|
|
47
|
+
docker run codeberg.org/slidge/matridge \ # works with podman too
|
|
48
|
+
--jid matrix.example.org \ # can be whatever you want it to be
|
|
49
|
+
--secret some-secret \ # must match your XMPP server config
|
|
50
|
+
--home-dir /somewhere/writeable # for data persistence
|
|
51
51
|
```
|
|
52
52
|
|
|
53
53
|
Use the `:latest` tag for the latest release, `:vX.X.X` for release X.X.X, and `:main`
|
|
54
54
|
for the bleeding edge.
|
|
55
55
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
With [pipx](https://pypa.github.io/pipx/):
|
|
59
|
-
|
|
60
|
-
```sh
|
|
61
|
-
|
|
62
|
-
# for the latest stable release (if any)
|
|
63
|
-
pipx install matridge
|
|
64
|
-
|
|
65
|
-
# for the bleeding edge
|
|
66
|
-
pipx install matridge \
|
|
67
|
-
--pip-args='--extra-index-url https://codeberg.org/api/packages/slidge/pypi/simple/'
|
|
68
|
-
|
|
69
|
-
matridge --help
|
|
70
|
-
```
|
|
56
|
+
If you do not like containers, other installation methods are detailed
|
|
57
|
+
[in the docs](https://slidge.im/docs/matridge/main/admin/install.html).
|
|
71
58
|
|
|
72
59
|
## Documentation
|
|
73
60
|
|
|
74
61
|
Hosted on [codeberg pages](https://slidge.im/docs/matridge/main/).
|
|
75
62
|
|
|
76
|
-
##
|
|
63
|
+
## Contributing
|
|
77
64
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
cd matridge
|
|
81
|
-
docker-compose up # works with podman-compose too
|
|
82
|
-
```
|
|
65
|
+
Contributions are **very** welcome, and we tried our best to make it easy
|
|
66
|
+
to start hacking on matridge. See [CONTRIBUTING.md](./CONTRIBUTING.md).
|
matridge-0.2.3/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# matridge
|
|
2
|
+
|
|
3
|
+
A
|
|
4
|
+
[feature-rich](https://slidge.im/docs/matridge/main/user/features.html)
|
|
5
|
+
[Matrix](https://matrix.org) to
|
|
6
|
+
[XMPP](https://xmpp.org/) puppeteering
|
|
7
|
+
[gateway](https://xmpp.org/extensions/xep-0100.html), based on
|
|
8
|
+
[slidge](https://slidge.im) and
|
|
9
|
+
[nio](https://matrix-nio.readthedocs.io/).
|
|
10
|
+
|
|
11
|
+
[](https://ci.codeberg.org/repos/14069)
|
|
12
|
+
[](https://slidge.im/xmpp-web/#/guest?join=slidge@conference.nicoco.fr)
|
|
13
|
+
[](https://pypi.org/project/matridge/)
|
|
14
|
+
|
|
15
|
+
[](https://repology.org/project/slidge-matridge/versions)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
matridge lets you chat with users of Matrix without leaving your favorite XMPP client.
|
|
19
|
+
|
|
20
|
+
## Quickstart
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
docker run codeberg.org/slidge/matridge \ # works with podman too
|
|
24
|
+
--jid matrix.example.org \ # can be whatever you want it to be
|
|
25
|
+
--secret some-secret \ # must match your XMPP server config
|
|
26
|
+
--home-dir /somewhere/writeable # for data persistence
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Use the `:latest` tag for the latest release, `:vX.X.X` for release X.X.X, and `:main`
|
|
30
|
+
for the bleeding edge.
|
|
31
|
+
|
|
32
|
+
If you do not like containers, other installation methods are detailed
|
|
33
|
+
[in the docs](https://slidge.im/docs/matridge/main/admin/install.html).
|
|
34
|
+
|
|
35
|
+
## Documentation
|
|
36
|
+
|
|
37
|
+
Hosted on [codeberg pages](https://slidge.im/docs/matridge/main/).
|
|
38
|
+
|
|
39
|
+
## Contributing
|
|
40
|
+
|
|
41
|
+
Contributions are **very** welcome, and we tried our best to make it easy
|
|
42
|
+
to start hacking on matridge. See [CONTRIBUTING.md](./CONTRIBUTING.md).
|
|
Binary file
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
+
<svg
|
|
3
|
+
version="1.1"
|
|
4
|
+
viewBox="0 0 28.864001 33.004002"
|
|
5
|
+
id="svg3"
|
|
6
|
+
sodipodi:docname="Matrix (proog) logo.svg"
|
|
7
|
+
width="28.864"
|
|
8
|
+
height="33.004002"
|
|
9
|
+
inkscape:version="1.4.1 (93de688d07, 2025-03-30)"
|
|
10
|
+
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
11
|
+
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
xmlns:svg="http://www.w3.org/2000/svg"
|
|
14
|
+
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
15
|
+
xmlns:cc="http://creativecommons.org/ns#"
|
|
16
|
+
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
|
17
|
+
<defs
|
|
18
|
+
id="defs3" />
|
|
19
|
+
<sodipodi:namedview
|
|
20
|
+
id="namedview3"
|
|
21
|
+
pagecolor="#ffffff"
|
|
22
|
+
bordercolor="#000000"
|
|
23
|
+
borderopacity="0.25"
|
|
24
|
+
inkscape:showpageshadow="2"
|
|
25
|
+
inkscape:pageopacity="0.0"
|
|
26
|
+
inkscape:pagecheckerboard="0"
|
|
27
|
+
inkscape:deskcolor="#d1d1d1"
|
|
28
|
+
inkscape:zoom="24.0625"
|
|
29
|
+
inkscape:cx="11.283117"
|
|
30
|
+
inkscape:cy="23.18961"
|
|
31
|
+
inkscape:window-width="1920"
|
|
32
|
+
inkscape:window-height="978"
|
|
33
|
+
inkscape:window-x="0"
|
|
34
|
+
inkscape:window-y="0"
|
|
35
|
+
inkscape:window-maximized="1"
|
|
36
|
+
inkscape:current-layer="svg3" />
|
|
37
|
+
<title
|
|
38
|
+
id="title1">Matrix (protocol) logo</title>
|
|
39
|
+
<g
|
|
40
|
+
transform="translate(0.414,0.536)"
|
|
41
|
+
fill="#040404"
|
|
42
|
+
id="g3">
|
|
43
|
+
<path
|
|
44
|
+
d="M 27.1,31.2 V 0.7 h -2.19 v -0.732 h 3.04 v 32 h -3.04 v -0.732 z"
|
|
45
|
+
id="path1"
|
|
46
|
+
style="stroke:#ffffff;stroke-opacity:1" />
|
|
47
|
+
<path
|
|
48
|
+
d="M 27.1,31.2 V 0.7 h -2.19 v -0.732 h 3.04 v 32 h -3.04 v -0.732 z"
|
|
49
|
+
id="path1-5" />
|
|
50
|
+
<path
|
|
51
|
+
d="m 8.23,10.4 v 1.54 h 0.044 c 0.385,-0.564 0.893,-1.03 1.49,-1.37 0.58,-0.323 1.25,-0.485 1.99,-0.485 0.72,0 1.38,0.14 1.97,0.42 0.595,0.279 1.05,0.771 1.36,1.48 0.338,-0.5 0.796,-0.941 1.38,-1.32 0.58,-0.383 1.27,-0.574 2.06,-0.574 0.602,0 1.16,0.074 1.67,0.22 0.514,0.148 0.954,0.383 1.32,0.707 0.366,0.323 0.653,0.746 0.859,1.27 0.205,0.522 0.308,1.15 0.308,1.89 v 7.63 h -3.13 v -6.46 c 0,-0.383 -0.015,-0.743 -0.044,-1.08 -0.0209,-0.307 -0.103,-0.607 -0.242,-0.882 -0.133,-0.251 -0.336,-0.458 -0.584,-0.596 -0.257,-0.146 -0.606,-0.22 -1.05,-0.22 -0.44,0 -0.796,0.085 -1.07,0.253 -0.272,0.17 -0.485,0.39 -0.639,0.662 -0.159,0.287 -0.264,0.602 -0.308,0.927 -0.052,0.347 -0.078,0.697 -0.078,1.05 v 6.35 h -3.13 v -6.4 c 0,-0.338 -0.007,-0.673 -0.021,-1 -0.0114,-0.314 -0.0749,-0.623 -0.188,-0.916 -0.108,-0.277 -0.3,-0.512 -0.55,-0.673 -0.258,-0.168 -0.636,-0.253 -1.14,-0.253 -0.198,0.0083 -0.394,0.042 -0.584,0.1 -0.258,0.0745 -0.498,0.202 -0.705,0.374 -0.228,0.184 -0.422,0.449 -0.584,0.794 -0.161,0.346 -0.242,0.798 -0.242,1.36 v 6.62 h -3.13 v -11.4 z"
|
|
52
|
+
id="path2"
|
|
53
|
+
style="stroke:#ffffff;stroke-width:0.5;stroke-dasharray:none;stroke-opacity:1" />
|
|
54
|
+
<path
|
|
55
|
+
d="m 0.936,0.732 v 30.5 h 2.19 v 0.732 h -3.04 v -32 h 3.03 v 0.732 z"
|
|
56
|
+
id="path3"
|
|
57
|
+
style="stroke:#ffffff;stroke-opacity:1" />
|
|
58
|
+
<path
|
|
59
|
+
d="m 0.945,0.763 v 30.5 h 2.19 v 0.732 h -3.04 v -32 h 3.03 v 0.732 z"
|
|
60
|
+
id="path3-6" />
|
|
61
|
+
</g>
|
|
62
|
+
<metadata
|
|
63
|
+
id="metadata5">
|
|
64
|
+
<rdf:RDF>
|
|
65
|
+
<cc:Work
|
|
66
|
+
rdf:about="">
|
|
67
|
+
<dc:title>Matrix (protocol) logo</dc:title>
|
|
68
|
+
</cc:Work>
|
|
69
|
+
</rdf:RDF>
|
|
70
|
+
</metadata>
|
|
71
|
+
</svg>
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
..
|
|
2
|
+
DO NOT EDIT
|
|
3
|
+
This file is automatically generated with copier using https://codeberg.org/slidge/legacy-module-template
|
|
4
|
+
|
|
1
5
|
Configuration
|
|
2
6
|
=============
|
|
3
7
|
|
|
@@ -36,6 +40,12 @@ matridge-specific config
|
|
|
36
40
|
|
|
37
41
|
All `generic slidge configuration options <https://slidge.im/docs/slidge/main/admin/config/#common-config>`_
|
|
38
42
|
apply.
|
|
39
|
-
|
|
43
|
+
|
|
44
|
+
matridge provides the additional component-wide options displayed in the table below.
|
|
45
|
+
They can be used:
|
|
46
|
+
|
|
47
|
+
* in an INI config file by starting matridge with ``-c /path/to/file.ini``;
|
|
48
|
+
* as command line arguments, prepended with ``--``, e.g., ``--some-option=value``;
|
|
49
|
+
* as environment variables, upper case, prepended with ``MATRIDGE_``, and with dashes substituted with underscores, e.g., ``MATRIDGE_SOME_OPTION=value``.
|
|
40
50
|
|
|
41
51
|
.. config-obj:: matridge.config
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
..
|
|
2
|
+
DO NOT EDIT
|
|
3
|
+
This file is automatically generated with copier using https://codeberg.org/slidge/legacy-module-template
|
|
4
|
+
|
|
5
|
+
==========
|
|
6
|
+
For admins
|
|
7
|
+
==========
|
|
8
|
+
|
|
9
|
+
If you are the administrator of an XMPP server and want to set up matridge,
|
|
10
|
+
this part of the documentation is made for you.
|
|
11
|
+
|
|
12
|
+
.. toctree::
|
|
13
|
+
|
|
14
|
+
install
|
|
15
|
+
config
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
..
|
|
2
|
+
DO NOT EDIT
|
|
3
|
+
This file is automatically generated with copier using https://codeberg.org/slidge/legacy-module-template
|
|
4
|
+
|
|
5
|
+
Installation
|
|
6
|
+
------------
|
|
7
|
+
|
|
8
|
+
Containers
|
|
9
|
+
~~~~~~~~~~
|
|
10
|
+
|
|
11
|
+
A container is built on every push to the git repository and uploaded to `the codeberg package
|
|
12
|
+
registry <https://codeberg.org/slidge/-/packages/container/matridge/latest>`__.
|
|
13
|
+
|
|
14
|
+
.. code:: sh
|
|
15
|
+
|
|
16
|
+
docker run codeberg.org/slidge/matridge # works with podman too
|
|
17
|
+
|
|
18
|
+
Use the ``:latest`` tag for the latest release, ``:vX.X.X`` for release
|
|
19
|
+
X.X.X, and ``:main`` for the bleeding edge.
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
Distribution packages
|
|
23
|
+
~~~~~~~~~~~~~~~~~~~~~
|
|
24
|
+
|
|
25
|
+
matridge is available in the official repositories of a few linux distributions.
|
|
26
|
+
|
|
27
|
+
.. image:: https://repology.org/badge/vertical-allrepos/slidge-matridge.svg
|
|
28
|
+
:alt: Packaging status
|
|
29
|
+
:target: https://repology.org/project/slidge-matridge/versions
|
|
30
|
+
|
|
31
|
+
Python packages
|
|
32
|
+
~~~~~~~~~~~~~~~
|
|
33
|
+
|
|
34
|
+
.. image:: https://badge.fury.io/py/matridge.svg
|
|
35
|
+
:alt: PyPI package version
|
|
36
|
+
:target: https://pypi.org/project/matridge/
|
|
37
|
+
|
|
38
|
+
matridge is available on the `python package index (PyPI) <https://pypi.org/project/matridge/>`__.
|
|
39
|
+
|
|
40
|
+
If you are not familiar with python packaging, we recommend using `pipx <https://pypa.github.io/pipx/>`__ to
|
|
41
|
+
set up matridge and its dependencies, isolated from the rest of your system.
|
|
42
|
+
|
|
43
|
+
.. code:: sh
|
|
44
|
+
|
|
45
|
+
# for the latest stable release published to PyPI, if any
|
|
46
|
+
pipx install matridge
|
|
47
|
+
|
|
48
|
+
matridge --help
|
|
49
|
+
|
|
50
|
+
Bleeding edge versions are also available on `codeberg's python index <https://codeberg/slidge/-/packages/pypi/matridge>`_.
|
|
51
|
+
|
|
52
|
+
.. code:: sh
|
|
53
|
+
|
|
54
|
+
# for the bleeding edge
|
|
55
|
+
pipx install matridge \
|
|
56
|
+
--pip-args='--extra-index-url https://codeberg.org/api/packages/slidge/pypi/simple/ --pre'
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
Unofficial debian package
|
|
60
|
+
~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
61
|
+
|
|
62
|
+
If you are using debian you might be interested in installing the
|
|
63
|
+
`slidge (unofficial) debian
|
|
64
|
+
package <https://codeberg.org/slidge/debian>`__ which bundles matridge
|
|
65
|
+
along with other slidge-based XMPP gateways.
|
|
66
|
+
|
|
67
|
+
Follow the instructions in the repository README; edit
|
|
68
|
+
``/etc/slidge/conf.d/common.conf`` and
|
|
69
|
+
``/etc/slidge/matrix.conf``; run
|
|
70
|
+
``sudo systemctl start slidge@matrix``; watch the logs with
|
|
71
|
+
``sudo journalctl -u slidge@matrix -f``.
|
|
@@ -5,7 +5,7 @@ import os
|
|
|
5
5
|
from datetime import datetime
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
|
|
8
|
-
from slidge
|
|
8
|
+
from slidge import __version__ as slidge_version
|
|
9
9
|
|
|
10
10
|
project = "matridge"
|
|
11
11
|
copyright = f"{datetime.today().year}, the {project} contributors"
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
..
|
|
2
|
+
DO NOT EDIT
|
|
3
|
+
This file is automatically generated with copier using https://codeberg.org/slidge/legacy-module-template
|
|
4
|
+
|
|
5
|
+
matridge
|
|
6
|
+
========
|
|
7
|
+
|
|
8
|
+
.. sidebar:: Useful links
|
|
9
|
+
|
|
10
|
+
`Source <https://codeberg.org/slidge/matridge>`_
|
|
11
|
+
|
|
12
|
+
`Chat room <xmpp:slidge@conference.nicoco.fr?join>`_
|
|
13
|
+
|
|
14
|
+
`Bug tracker <https://codeberg.org/slidge/matridge/issues>`_
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
A
|
|
18
|
+
`feature-rich <user/features.html>`_
|
|
19
|
+
`Matrix <https://matrix.org>`_ to
|
|
20
|
+
`XMPP <https://xmpp.org/>`_ puppeteering
|
|
21
|
+
`gateway <https://xmpp.org/extensions/xep-0100.html>`_, based on
|
|
22
|
+
`slidge <https://slidge.im>`_ and
|
|
23
|
+
`nio <https://matrix-nio.readthedocs.io/>`_.
|
|
24
|
+
|
|
25
|
+
.. toctree::
|
|
26
|
+
:maxdepth: 3
|
|
27
|
+
|
|
28
|
+
admin/index
|
|
29
|
+
user/index
|
|
30
|
+
contributing
|
|
31
|
+
autoapi/index
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
Indices and tables
|
|
35
|
+
==================
|
|
36
|
+
|
|
37
|
+
* :ref:`genindex`
|
|
38
|
+
* :ref:`modindex`
|
|
39
|
+
* :ref:`search`
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
..
|
|
2
|
+
DO NOT EDIT
|
|
3
|
+
This file is automatically generated with copier using https://codeberg.org/slidge/legacy-module-template
|
|
4
|
+
|
|
1
5
|
Features
|
|
2
6
|
--------
|
|
3
7
|
|
|
@@ -5,4 +9,4 @@ The table below lists the notable features for matridge.
|
|
|
5
9
|
Refer to `xmpp.org <https://xmpp.org/software/slidge/>`_ for a longer version,
|
|
6
10
|
including all XEPs supported by `slidge <https://slidge.im/>`_.
|
|
7
11
|
|
|
8
|
-
.. doap::
|
|
12
|
+
.. doap:: ../../../doap.xml
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
..
|
|
2
|
+
DO NOT EDIT
|
|
3
|
+
This file is automatically generated with copier using https://codeberg.org/slidge/legacy-module-template
|
|
4
|
+
|
|
5
|
+
For users
|
|
6
|
+
=========
|
|
7
|
+
|
|
8
|
+
You want to use a matridge instance? You have come to the right place.
|
|
9
|
+
|
|
10
|
+
.. toctree::
|
|
11
|
+
|
|
12
|
+
registration
|
|
13
|
+
usage
|
|
14
|
+
features
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Registration
|
|
2
|
+
============
|
|
3
|
+
|
|
4
|
+
To start using a matridge instance, you need to create an account by
|
|
5
|
+
registering with it. The instance has a unique XMPP (aka JID) address, which is
|
|
6
|
+
usually just a domain name (e.g., "matrix.example.org"), without a
|
|
7
|
+
username or local part.
|
|
8
|
+
|
|
9
|
+
There are two ways to register, depending on your client:
|
|
10
|
+
|
|
11
|
+
- If your client supports adhoc commands (such as Movim, Gajim, or Cheogram),
|
|
12
|
+
you can use the "Register" command with the matridge instance's
|
|
13
|
+
address.
|
|
14
|
+
- If your client does not support adhoc commands (such as Conversations), you
|
|
15
|
+
can register by sending a text message that says "register" to the
|
|
16
|
+
matridge instance's address.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
Usage
|
|
2
|
+
=====
|
|
3
3
|
|
|
4
4
|
Be patient
|
|
5
5
|
----------
|
|
@@ -10,7 +10,8 @@ Just wait, it takes time to log in, join rooms and send messages: this is all ex
|
|
|
10
10
|
Everything is a MUC
|
|
11
11
|
-------------------
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Standard XMPP direct messages are not supported.
|
|
14
|
+
Direct channels rooms (1:1 messages) are group chats of 2 participants.
|
|
14
15
|
|
|
15
16
|
E2EE
|
|
16
17
|
----
|
|
@@ -33,7 +33,9 @@ class Gateway(BaseGateway):
|
|
|
33
33
|
COMPONENT_NAME = "Matrix (slidge)"
|
|
34
34
|
COMPONENT_TYPE = "matrix"
|
|
35
35
|
|
|
36
|
-
COMPONENT_AVATAR =
|
|
36
|
+
COMPONENT_AVATAR = (
|
|
37
|
+
"https://codeberg.org/slidge/matridge/raw/branch/main/assets/matrix_outline.png"
|
|
38
|
+
)
|
|
37
39
|
|
|
38
40
|
ROSTER_GROUP: str = "matrix"
|
|
39
41
|
|
|
@@ -25,9 +25,10 @@ def catch_all(coro: Callable[["Client", nio.MatrixRoom, nio.Event], Awaitable[No
|
|
|
25
25
|
@wraps(coro)
|
|
26
26
|
async def wrapped(self: "Client", room: nio.MatrixRoom, event: nio.Event, *a, **kw):
|
|
27
27
|
event_id = getattr(event, "event_id", None)
|
|
28
|
-
|
|
29
|
-
self.
|
|
30
|
-
|
|
28
|
+
async with self.session.send_lock:
|
|
29
|
+
if event_id in self.session.events_to_ignore:
|
|
30
|
+
self.log.debug("Ignoring an event matridge has sent: %s", event_id)
|
|
31
|
+
return
|
|
31
32
|
try:
|
|
32
33
|
return await coro(self, room, event, *a, **kw)
|
|
33
34
|
except XMPPError as e:
|