Commit graph

4,317 commits

Author SHA1 Message Date
Goffi
08cd3fd587 component email gateway: Add support for XEP-0131 headers:
Some email headers (`Keywords` and `Importance` for now) are converted between XMPP and
email.

rel 451
2024-09-28 15:59:12 +02:00
Goffi
5ccec8f755 cli (message/send): add arguments to send keywords and headers:
rel 451
2024-09-28 15:57:31 +02:00
Goffi
5226323cae tests (unit): add XEP-0131 tests:
rel 451
2024-09-28 15:57:03 +02:00
Goffi
80ec968740 plugin XEP-0131: Stanza Headers and Internet Metadata implementation:
- SHIM is now supported and put in `msg_data["extra"]["headers"]`.
- `Keywords` are converted from and to list of string in `msg_data["extra"]["keywords"]`
field (if present in headers on message sending, values are merged).
- Python minimal version upgraded to 3.11 due to use of `StrEnum`.

rel 451
2024-09-28 15:56:04 +02:00
Goffi
bf0515378a plugin XEP-0033: formatting. 2024-09-28 15:52:14 +02:00
Goffi
03f8421e84 doc (components): update doc to indicate support of addressing metadata.
fix 450
2024-09-26 16:12:01 +02:00
Goffi
c1ed8306ae doc (cli/message): add documentation for new addressing commands:
rel 450
2024-09-26 16:12:01 +02:00
Goffi
a81612f0f1 test (unit): add test for email gateway:
rel 450
2024-09-26 16:12:01 +02:00
Goffi
15b29444a7 component email gateway: add multicasting:
XEP-0033 multicasting is now supported both for incoming and outgoing messages. XEP-0033
metadata are converted to suitable Email headers and vice versa.
Email address and JID are both supported, and delivery is done by the gateway when
suitable on incoming messages.

rel 450
2024-09-26 16:12:01 +02:00
Goffi
ba8ba26636 cli (message/send): add arguments for message addressing:
commands have been added to add `to`, `cc` and `bcc` metadata for sending copy of the
message to several entities. Metadata such as `reply-to` `reply-room` and `no-reply` are
also supported.

rel 450
2024-09-26 16:12:01 +02:00
Goffi
49a1cfe974 test (unit): add test for plugin XEP-0033:
those replace the legacy XEP-0033 test from libervia/backend/test/test_plugin_xep_0033.py.

rel 450
2024-09-26 16:12:01 +02:00
Goffi
489eed2540 plugin XEP-0033: code modernisation, improve delivery, data validation:
- Code has been rewritten using Pydantic models and `async` coroutines for data validation
  and cleaner element parsing/generation.
- Delivery has been completely rewritten. It now works even if server doesn't support
  multicast, and send to local multicast service first. Delivering to local multicast
  service first is due to bad support of XEP-0033 in server (notably Prosody which has an
  incomplete implementation), and the current impossibility to detect if a sub-domain
  service handles fully multicast or only for local domains. This is a workaround to have
  a good balance between backward compatilibity and use of bandwith, and to make it work
  with the incoming email gateway implementation (the gateway will only deliver to
  entities of its own domain).
- disco feature checking now uses `async` corountines. `host` implementation still use
  Deferred return values for compatibility with legacy code.

rel 450
2024-09-26 16:12:01 +02:00
Goffi
5005ca346b tests: reformat tests using black. 2024-09-26 16:11:56 +02:00
Goffi
42263d05f9 doc (components): new Email gateway documentation:
fix 449
2024-09-06 18:07:44 +02:00
Goffi
73a08f5c91 component email-gateway: first draft:
Initial implementation of the Email Gateway.

This component uses XEP-0100 for registration. Upon registration and subsequent startups,
a connection is made to registered IMAP services, and incoming emails (in `INBOX`
mailboxes) are immediately forwarded as XMPP messages.

In the opposite direction, an SMTP connection is established to send emails on incoming
XMPP messages.

rel 449
2024-09-06 18:07:17 +02:00
Goffi
cf0363a3af doc (cli): documentation for new gateway command:
rel 449
2024-09-06 18:03:36 +02:00
Goffi
057a8ebadf CLI: add commands to handle gateways:
rel 449
2024-09-06 18:03:01 +02:00
Goffi
c0a9fa611a plugin XEP-0077, XEP-0100: Adapt to component, and modernize:
- Plugin XEP-0077 can now be used with component, allowing to register methods to return
  registration form, and to (un)register.
- Plugin XEP-0077 now advertises its feature in disco.
- Plugin XEP-0100 has been modernized a bit: it is one of the older plugin in Libervia,
  and it has now some type hints, models and async methods.
- Plugin XEP-0100's bridge method `gateways_find` now returns a serialised dict with
  relevant data. Former XMLUI version has been moved to `gateways_find_xmlui`.

rel 449
2024-09-06 18:01:31 +02:00
Goffi
5c056c049b tools (xml_tools): add namespace argument to xmlui_result_to_elt:
this allows to specify resulting Form namespace.
2024-09-06 17:45:46 +02:00
Goffi
a4f494ac70 plugin XEP-0106, tools (common/email): type hints. 2024-09-06 17:44:08 +02:00
Goffi
5513da8792 core (xmpp): move is_local to SatXMPPEntity + type hints + some log level changes. 2024-09-06 17:42:07 +02:00
Goffi
6396a086ab core (models): add new models for DiscoIdentity and JID:
`JIDType` `StrictJIDType` can be used when a Twisted JID is expected in a Pydantic model.
2024-09-06 17:40:32 +02:00
Goffi
0a8bb228d5 frontends (tools/aio): Fix excessive use of CPU:
Use a short delay instead of `loop.call_soonloop.call_soon` when work as been done, as
this was resulting in an excessive use of CPU.
2024-09-06 17:38:31 +02:00
Goffi
08e1409925 component conferences, plugin XEP-0167, XEP-0298: add stream user metadata:
A/V conference now adds user metadata about the stream it is forwarding through XEP-0298.
This is parsed and added to metadata during confirmation on client side.

rel 448
2024-08-06 23:43:11 +02:00
Goffi
4f7f383687 tests (unit): add test for XEP-0298 plugin + fix XEP-0167:
fix 447
2024-07-29 03:49:26 +02:00
Goffi
e357f36f32 plugin XEP-0298: Delivering Conference Information to Jingle Participants (Coin) implementation:
This is the first draft of XEP-0298 implementation. The focus is to implement elements
needed for A/V Conferences protoXEP.

rel 447
2024-07-29 03:31:13 +02:00
Goffi
96a1f4435c plugin XEP-0167: handle conferences:
- SDP can now be answered by component instead of frontend. This is useful for A/V
  conferences component to handle A/V call jingle sessions.
- new `call_update` and method, and `content-add` action preparation. This is not yet used
  by A/V conference, but it's a preparation for a potential future use.
- Add NS_AV_CONFERENCES to features as required by the newly proposed A/V Conferences
  protoXEP.

rel 447
2024-07-29 03:31:09 +02:00
Goffi
01ee77b785 plugin XEP-0176: add debug logs:
rel 447
2024-07-29 03:31:06 +02:00
Goffi
f637be1e4f plugin XEP-0167: fix session level SDP attributes parsing:
rel 447
2024-07-29 03:31:02 +02:00
Goffi
31c80d3626 plugin XEP-0166: handle content-add action + expose get_transport:
- `content-add` is now handled at this plugin level (implementation needs to be done in
  apps and transports plugins).
- `get_transport` is now exposed.

rel 447
2024-07-29 03:30:58 +02:00
Goffi
6a4133b32c plugin identity: disco identity is now added in identity metadata:
rel 447
2024-07-29 03:30:53 +02:00
Goffi
90e81c9fc6 component conferences: fix session management and init:
- jingle session management is now correctly handled, with id of the Galène client used as
  prefix when necessary.
- Galène is now run only when component session is started, avoiding systematic run on
  __init__.
- Galène ICE logs are displayed with high verbosity.
- Fix disco identity handling

rel 447
2024-07-29 03:29:14 +02:00
Goffi
067d8f32bf tests (unit): fix tests + black reformatting. 2024-07-14 17:42:53 +02:00
Goffi
c9ab0cd9dd black reformatting 2024-07-14 16:47:45 +02:00
Goffi
01e695cebb plugin XEP-0060: add a force options for publish options in send_items:
The new `force` option can be used to force the update of configuration is
`publish-option` fails.

Use this new `force` option in XEP-0384.
2024-07-14 16:45:17 +02:00
Goffi
f8d383258c doc (encryption): update pubsub encryption specifications. 2024-07-13 17:45:47 +02:00
Goffi
ae77da43fd core: show warning instead of exception in case of missing dependency when loading plugins 2024-07-12 18:53:00 +02:00
Goffi
ba0e319130 bridge(constructor): fix template parsing, which was broken following black reformating. 2024-07-12 17:58:06 +02:00
Goffi
6f347a3fb1 doc (components): Documentation for the new Conferences component:
fix 445
2024-07-05 17:18:37 +02:00
Goffi
ba170701f0 component Conferences: implementation of SFU component to make multi-party A/V conferences:
This component wrap `Galène` SFU and translate its signaling to XMPP Jingle in both
direction.

rel 445
2024-07-05 17:18:37 +02:00
Goffi
63b50a2d27 plugin XEP-0167: Let use a call_setup_cb method in session:
when set, the `call_setup_cb` method will be used instead of calling the `call_setup`
bridge signal. This will be useful to incoming `Conferences` component to handle the
signaling internally.

rel 445
2024-07-05 17:18:37 +02:00
Goffi
6afc342875 plugin XEP-0167: move ICE candidates parsing/SDP line building in separate methods:
These methods will be used by incoming "Conferences" component.

rel 445
2024-07-05 17:18:37 +02:00
Goffi
afbeeb2d1a plugin XEP-0176: Send ICE candidates buffer for initiator:
- ICE buffer is now sent also for initiator.
- If `ice_candidates_new_cb` is set in `session`, it will be used instead of using the
  `ice_candidates_new` signal. This is useful to handle internally the workflow, and will
  be used in incoming `Conferences` component.


rel 445
2024-07-05 17:18:32 +02:00
Goffi
a3651eb70a frontends (tools/webrtc): fix typo resulting in bad pipeline for audio. 2024-07-05 16:27:52 +02:00
Goffi
17ae6ba241 tools (common/async_process): accept Path instances as command path. 2024-06-20 14:47:09 +02:00
Goffi
0c785f0934 cli (list/set): add "--comments" argument. 2024-06-20 14:46:55 +02:00
Goffi
f7c8ebea06 plugin misc list: Comments node creation can now be specified with comments field in extra. 2024-06-20 14:36:09 +02:00
Goffi
53fdaa9d09 Reformatted code base using black. 2024-06-19 18:44:57 +02:00
Goffi
56319cbad3 memory (file): avoid race condition when creating parent path directories. 2024-06-18 12:06:45 +02:00
Goffi
3bf2fd93c7 docker (backend): set +use_local_shared_tmp in conf. 2024-06-13 13:22:41 +02:00