Commit graph

4,732 commits

Author SHA1 Message Date
Goffi
da20bba2ab plugin XEP-0050: fix handling of form submitted in the first request:
form submitted on first request (without retrieval first) was broken, this patch fixes it.
2026-10-26 18:36:41 +01:00
Goffi
8e4e96dcbb plugin File Sharing Management: generate video thumbnails:
Video thumbnails are now generated too (recursively, along with images) on the `thumb`
command. The poster frame is extracted at 25% of the duration (instead of a fixed 10s
seek).

Thumbnails are now kept in cache indefinitely.
2026-10-26 18:36:41 +01:00
Goffi
bd1c93f7d4 memory (cache): add persistent cache entries:
`max_age` can now be `C.MAX_AGE_PERSISTENT` to keep a cache entry indefinitely: its `eol`
is then `None` and no expiration check is done.
2026-10-26 18:36:41 +01:00
Goffi
19beb9d339 plugin NAT Port: fix errors handling:
`miniupnpc` raises `Exception("Success")` when no device is found
(instead of returning 0), which was resulting in an exception breaking workflows in
Libervia.

The code now catches unexpected exceptions, and handles `Exception("Success")` as "no
device found".
2026-10-26 18:36:41 +01:00
Goffi
5995b1e056 tools (common/template): use font-awesome names in _icon_from_client:
the frontend icons moved from fontello to font-awesome.
2026-10-26 18:36:41 +01:00
Goffi
185a765e01 bridge: fix signature for disco_infos and disco_find_by_features 2026-10-26 18:36:41 +01:00
Goffi
8b0aa646fc doc (components): fix XEP-0442 title 2026-10-26 18:36:41 +01:00
Goffi
e98e00be51 plugin XEP-0167: pass the call_end reason to the jingle termination 2026-10-18 23:51:06 +02:00
Goffi
c0860ca978 plugin XEP-0353: intialisation refactor:
slight refactor of initialisation workflow, it's now split in two part, with
`self._send_jingle_after_accept` called in a deferred, so the session ID can be returned
early by the jingle application, and the session can be cancelled even if not fully
established (e.g. while ringing during a call).
2026-10-18 23:51:06 +02:00
Goffi
53e6de5a3b plugin XEP-0298: remove the obsolete session-init trigger:
- Conferences are not using XEP-0298 anymore, following the Jingle A/V Conferences
  protoXEP update.
- fix XEP-0166 dependency
2026-10-18 23:51:06 +02:00
Goffi
cb570ab3cf component conferences: update to manage the new single Jingle session and the ICE restart:
The Jingle Audio/Video Conferences spec has been updated to work with a single Jingle
session. This patch updates the component to handle it, and implements ICE restart
management.

Closing is better handled, and session are replaced in case of duplication (happens
notably in web frontend on tab reload).
2026-10-18 23:51:06 +02:00
Goffi
7277e48f7f plugin av-conferences: implement Jingle A/V conferences:
This plugin implements the Jingle A/V Conferences specification. The plugin is small as
it's mostly (only so far) about specifying/retrieving <origin> element, and disco info;
the rest is handled by other Jingle plugins.
2026-10-17 14:23:52 +02:00
Goffi
53e9bcf91d plugin XEP-0272: remove the room bookmark when the group call ends:
When joining a room, it may be automatically added to bookmark (e.g. by other clients), so
we delete it when call end to be sure that we don't keep temporary rooms in bookmarks.
2026-10-17 13:43:33 +02:00
Goffi
60133fc47f plugin XEP-0384: log error when getting the OMEMO session manager fails 2026-10-17 13:43:33 +02:00
Goffi
571588f8a1 plugin XEP-0402: ignore missing item when removing a bookmark 2026-10-17 13:43:33 +02:00
Goffi
ab26a56c1d plugin XEP-0166: support all content actions + fixes:
- all content actions are now handled
- XEP-0167: the new contents of an offered SDP are added with a single content-add, the
  contents sharing a single transport are bundled (XEP-0338)
- XEP-0167: the generated SDP declares the BUNDLE group of its own contents
- XEP-0176: one transport-info IQ per content. ICE data are keyed by content names.
- fix session-level ICE attributes and fingerprint
2026-10-17 13:43:33 +02:00
Goffi
0c6f852ce9 plugin XEP-0272: update to v0.2.0 + fixes:
- use the proper `urn:xmpp:jingle:muji:0` namespace
- replace XEP-0249 invitations with XEP-0482
- the dedicated `META_TYPE_GROUP_CALL` subtype is now used for the confirm action (instead
  of `META_TYPE_MUC_INVITATION`)
- handle MUJI invitation: on accept, join the room, start preparing and answer with the
  connection method element
- add the `<muji>` element to outgoing Jingle IQs
- propagate the call type (audio/video) in the MUJI invites (the `type` attribute), so the
  invited clients set up the proper local stream
- the joining participant initiates the sessions with the other participants, using their
  real JIDs, extracted from the presence (the room is set non-anonymous for that)
- only trust the `<muji>` element of a `session-initiate` from a member of the room
- add a `call_group_end` bridge method to clean the MUJI session
- typo fix in `META_TYPE_MUC_INVIRATION` (`R` instead of `T`)
2026-10-17 13:43:33 +02:00
Goffi
c4e3a2b015 plugin XEP-0045: add set_room_configuration and is_jid_in_room methods:
The `set_room_configuration` allow to update configuration with well-known options.
The `is_jid_in_room` check if an entity with the given real JID is in the room.
2026-10-08 20:50:37 +02:00
Goffi
edc77d1517 plugin XEP-0060: fix get_items docstring. 2026-10-08 20:50:37 +02:00
Goffi
8d4120fb8a plugin XEP-0402: catch NotFound in _set_autojoin 2026-10-08 20:50:37 +02:00
Goffi
1de6c20d03 plugin XEP-0167: propagate muji_room in call metadata 2026-10-08 20:50:37 +02:00
Goffi
b4f88480db bridge (dbus): export the D-Bus name only once the plugins are loaded:
client connecting too early were seeing an incomplete plugin interface.
2026-10-08 20:50:37 +02:00
Goffi
2f3960a15f plugin identity: minor loging improvement 2026-10-01 11:57:10 +02:00
Goffi
8d4d2e222a plugin XEP-0482: Call Invites implementation 2026-10-01 11:57:10 +02:00
Goffi
ed66cfd458 git: ignore Sphinx build artifacts 2026-10-01 11:57:10 +02:00
Goffi
13db2e36fa component conferences: Clean stale Galène process if any before launching a new one. 2026-09-23 18:25:38 +02:00
Goffi
bdca7d2354 tools (common/async_process): add a cleaning mecanism:
PID of commands run with `CommandProtocol` are now tracked in memory and stopped/killed on
exit. A `pid_file` argument can be use to track the file on disk, which is useful to
detect stalled processes after a crash/unclean ending of the backend.

Add helper methods to stop and kill those processes.
2026-09-23 18:19:03 +02:00
Goffi
0fbf74aad6 tools (common/template): add brands style in icon definitions:
`brands` is notably needed for the new XMPP icon available in font-awesome.
2026-09-20 12:10:11 +02:00
Goffi
7fed56203b plugin XEP-0277: fix unawaited coroutine. 2026-09-19 18:02:34 +02:00
Goffi
b2bc25657d plugin XEP-0277: fix mb_preview D-Bus signature 2026-09-18 10:19:53 +02:00
Goffi
45024d913e doc (howto backup, cli/backup): document the new backup mechanism:
Add a "How-To" for backup, and document the new `backup` commands

fix 480
2026-09-15 11:48:11 +02:00
Goffi
4ce7c807be tests (backup): add tests for backup engine:
rel 480
2026-09-15 11:48:11 +02:00
Goffi
f22af42ece cli (backup): add backup commands:
Add the `li backup` commands with `export`, `import` and `verify`:

- data types selection (`-i`/`-e`) and profile selection (`-p`), `--no-db` on export, `--use-db` on
  import
- GPG symmetric encryption of the archive (`--encrypt`)
- progression is shown, with ETA
- the commands can run without a backend connection (import from DB MUST be run without
  backend)
- cli (base): `BRIDGELESS_COMMANDS` holds the name of the few commands which can be run
  without backend.

rel 480
2026-09-15 11:48:11 +02:00
Goffi
86a91b5850 tools (backup): add backup/restore:
Add an offline backup/restore engine in `tools.backup`:

- format based on XEP-0227 (pie), extended with Libervia sections
- handle several data types (params, private, roster, pep , gpg, files and db)
- per profile export/import and global handlers
- a manifest is used to have metadata and checksums
- full database snapshot/restore with the `db` type
- sqla: add `get_db_url`
- tools.common.utils: add `is_safe_relpath` and `is_process_running`

rel 480
2026-09-15 11:48:11 +02:00
Goffi
63b3f4dfe2 tests (xep_0272): assert the group setup call in the preparation test 2026-09-15 11:48:11 +02:00
Goffi
7325353d18 plugin XEP-0373, tools: Move GPG backend to tools.common:
GPG backend will be used for backup, and may be used in general to handle GPG.

rel 480
2026-09-15 11:48:11 +02:00
Goffi
18d55242b9 Fix generated path in .gitignore 2026-09-15 11:48:11 +02:00
Goffi
1af645c0f0 plugin XEP-0045, XEP-0402: Update bookmark on room join/leave:
As PEP bookmarks are nowadays used to sync joined state across devices, trigger points
have been added to XEP-0045 so XEP-0402 can automatically update the `autojoin` status on
MUC joining or leaving.

A check has been added to ignore already joined or left room when XEP-0402 plugin updates
the MUC status on bookmark update.
2026-09-15 11:48:04 +02:00
Goffi
2be5d62dfc memory (sqla): add after_uid filter in history_get 2026-08-26 17:55:01 +02:00
Goffi
2f635798ac plugin XEP-0308: better author check:
Check full JID for MUC private messages.
2026-08-25 19:07:06 +02:00
Goffi
7a7a3d8fe4 plugin XEP-0308: check message edit for room messages:
- Reference the stanza-id assigned by the MUC service when correcting.
- Ignore the edit (with a warning) if the original message has no usable id.
2026-08-25 19:07:06 +02:00
Goffi
403b9e9d31 plugin XEP-0308: fix message edit for MUC private messages:
- Keep the destination resource when resending the correction (e.g. `room/nick`).
- Match the corrected message by id (fallback: last message from the sender).
- Ignore corrections that can't be matched, or whose content is already applied (e.g.
  own corrections redelivered by MAM).
2026-08-25 19:02:59 +02:00
Goffi
2cfe6c7a82 tools (common/template): add jid_resource filter 2026-08-25 19:02:59 +02:00
Goffi
de6c050db2 plugin JID Search: Update cutoff ratio + dedup:
- `RATIO_CUTOFF` has been adapted to avoid returning approximate matches.
- In case of duplicate entries (e.g., rooms returned by the local search are also returned
  by the external one), we keep only the item with the most metadata.
- Exclude `None` values in `jid_search` bridge method.
2026-08-24 11:52:53 +02:00
Goffi
1a96c32c45 plugin XEP-0433: Check frontend's allow_external option:
To allow external search, there must now be both the general settings and the
`allow_external` option set by frontend.
2026-08-24 11:43:31 +02:00
Goffi
912ffd4e8b plugin XEP-0054: Fix missing await 2026-08-24 11:24:25 +02:00
Goffi
14dbca530b plugin XEP-0313: check message origin:
Check that "from" attribute of the forwarded message is coming from the service.
2026-08-18 18:48:04 +02:00
Goffi
93ce4112f8 plugin identity: Use Pydantic models:
Use Pydantic models for data used with bridge.
Also update `backend.models.core.DiscoIdentity` to have `None` as possible and default
value for `name`.
2026-08-14 14:53:46 +02:00
Goffi
a3cc29ca3c cli (debug/monitor): Add timestamp to XML logs. 2026-08-12 18:12:02 +02:00
Goffi
dc9e3e98d5 plugin XEP-0045: Use disco as fallback for is_room:
If a room was not joined (e.g., due to failure), `is_room` was wrongly returning `False`.
Disco identity is now used as fallback to detect correctly is an entity is a room or not.
This changes makes `is_room` async, and by extension `get_bare_or_full` too.
2026-08-12 18:10:51 +02:00