Commit graph libervia-backend/libervia/backend/plugins
Author SHA1 Message Date
Goffi
2a0f4e28f8 component email gateway: convert autocrypt header:
Autocrypt header must be transmitted in both directions to allow opportunistic end-to-end
encryption with this protocol.

Moved email validation regex to `tools/common/regex.py`, as it can be used in other
locations.

rel 456
2025-02-28 09:23:35 +01:00
Goffi
5681435532 plugin XEP-0131: update triggers priority + add headers to MessageDataExtra:
- Lower priority is used for triggers so other plugins can add headers before the XML is
  generated.
- Added `headers` to `MessageDataExtra` type.

rel 456
2025-02-28 09:23:35 +01:00
Goffi
906ade1894 component email gateway: implement Gateway Relayed Encryption:
MIME and OpenPGP are used.

rel 455
2025-01-13 01:23:22 +01:00
Goffi
ea6ecb3c91 plugin gre encrypter: implement GRE Encrypter: OpenPGP:
rel 455
2025-01-13 01:23:22 +01:00
Goffi
a76a9d9e23 plugin GRE formatter MIME: implements GRE Formatter: MIME:
rel 455
2025-01-13 01:23:22 +01:00
Goffi
bbebdc6f94 plugin GRE: implements Gateway Relayed Encryption:
rel 455
2025-01-13 01:23:22 +01:00
Goffi
759ffc443b plugin XEP-0050: fix allowed_magics arg and calls to add_ad_hoc_command. 2025-01-13 01:23:22 +01:00
Povilas Kanapickas
4326d01956 remove uses of twisted.internet.defer.returnValue
This function has been deprecated in Twisted 24.7.0.
2024-12-11 01:17:09 +02:00
Goffi
b7f4202a78 tests (unit/email gateway): add tests for pubsub service:
rel 453
2024-12-03 00:52:06 +01:00
Goffi
edad2c1064 component email gateway: Add a pubsub service:
a pubsub service is implemented to retrieve and manage attachments using XEP-0498.

rel 453
2024-12-03 00:13:23 +01:00
Goffi
9d5de6b61b component email gateway: attachments handling:
attachments are now stored, and metadata are created in database.

rel 453
2024-12-03 00:13:23 +01:00
Goffi
ef49768c31 plugin XEP-0498: "Pubsub File Sharing" implementation:
Partial implementation of XEP-0498, necessary to implement the service part in email
gateway.

rel 453
2024-12-03 00:13:23 +01:00
Goffi
7509323137 plugin XEP-0358: "Publishing Available Jingle Sessions" implementation:
rel 453
2024-12-03 00:13:07 +01:00
Goffi
319c607f39 plugins XEP-0300, XEP-0446, XEP-0447, XEP0448 and others: Refactoring to use Pydantic:
Pydantic models are used more and more in Libervia, for the bridge API, and also to
convert `domish.Element` to internal representation.

Type hints have also been added in many places.

rel 453
2024-12-03 00:12:38 +01:00
Syndace
1ec2b29854 XEP-0373 (OX): Adjust to gpgme updates: generate with explicit algorithm and subkeys 2024-07-13 18:28:28 +02:00
Goffi
e161ff2d57 plugin URI finder: make the regex ignore case. 2024-11-20 15:29:47 +01:00
Goffi
254554de99 plugin blog import dotclear: repalce deprecated cgi by html 2024-11-20 14:35:09 +01:00
Goffi
06a1eef720 plugin XEP-0048, XEP-0402; CLI (bookmarks): implement XEP-0402 (PEP Native Bookmarks):
- Former bookmarks implementation is now labeled as "legacy".
- XEP-0402 is now used for bookmarks when relevant namespaces are found, and it fallbacks
  to legacy XEP-0048/XEP-0049 bookmarks otherwise.
- CLI legacy bookmark commands have been moved to `bookmarks legacy`
- CLI bookmarks commands now use the new XEP-0402 (with fallback to legacy one
  automatically used if necessary).
2024-11-20 11:43:27 +01:00
Goffi
8443ddac65 plugin text syntaxes: update exception message to be more explicit when lxml_html_clean is missing. 2024-11-20 11:30:43 +01:00
Goffi
b9088dff79 plugin XEP-0215, XEP-0376: fix bad calls to hasFeature:
`hasFeature` was called like blocking code, missing the `await`. This has been fixed, and
is now using the `memory.disco.has_feature` version.
2024-09-30 14:14:38 +02:00
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
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
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
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
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
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
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
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
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
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
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
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
1c1f617cdf plugin XEP-0048: don't fail if a type is missing in bookmark data. 2024-06-12 22:36:15 +02:00
Goffi
a6059161bb plugin XEP-470: Don't file configuration on feature-not-implemented. 2024-06-12 22:35:13 +02:00
Goffi
f97ed65a7a component AP Gateway: log invalid account in case of error. 2024-06-12 22:34:19 +02:00
Goffi
b402be2a7a component AP Gateway: implement HTTP GET signature. 2024-06-05 22:34:09 +02:00
Goffi
99b218fca4 plugin text syntaxes: fix empty string handling in _remove_markups. 2024-06-05 22:33:37 +02:00