Commit graph

4,753 commits

Author SHA1 Message Date
Goffi
0c955f6abd doc (apps): fix the apps documentation:
The page was a messy reference, with several fields missing or incomplete. It is now
completed and easier to read.
2026-11-04 09:47:04 +01:00
Goffi
fc0a385027 doc (components): document the common component settings:
- Move the `ComponentSettings` autodoc from "Simplified Component Configuration" to a new
  "Common Component Settings" section. This was confusing when most of time only `jid` and
  `secret` are needed.
- Document the config section naming (dashes replaced by underscores) and how to run a
  component in an isolated instance (systemd, `li -i`).
- Fix the `[components.X]` section names (`[component.X]`).
2026-11-04 09:47:04 +01:00
Goffi
cb9af3881e doc (testing): move the testing documentation to its own page:
Testing is now in the "Developer" section of the index, and the `contributing/` directory
is removed (redundant).
2026-11-04 09:47:04 +01:00
Goffi
184718e3ed doc (installation): update/rewrite of installation instructions:
- We are now using `uv`, so documentation has been updated accordingly.
- Commented out instruction on unmaintained things (AUR packages, TUI).
- Add instructions on using systemd services.
2026-11-04 09:47:04 +01:00
Goffi
2af29e7999 doc (configuration): update (and rewrite for TOML):
- Configuration is now made with TOML, and the documentation was outdated. It has been
  rewritten for TOML, and autodoc is used to show configuration options available in code
  (and keep it up-to-date).
- New isolation mode is documentated.
- (core/constants): fix the `tmp` isolation mode to inherits the parent configuration like
  `normal`.
2026-11-03 18:02:05 +01:00
Goffi
388c451288 doc: reorganise index:
Index is reorganised to have separated `content`, `developer` and `how-tos` sections.

The TUI documentation is temporarily disabled (as TUI is currently broken).
2026-11-03 18:02:05 +01:00
Goffi
2bd6401e39 cli (encryption, message): typo fixes 2026-11-03 18:02:05 +01:00
Goffi
2f0c1d4818 core: reject dashes in isolation instance names:
To avoid confusion and hard-to-debug behaviours, `-` are now rejected in isolation
instance names, only `_` is accepted.
2026-11-03 18:02:05 +01:00
Goffi
65c775877e tools (common/template): skip empty icon names in _icon_defs 2026-11-03 18:02:05 +01:00
Goffi
1cfb8e90c3 install (pyproject): add missing asyncio extra to sqlalchemy 2026-11-03 18:02:05 +01:00
Goffi
8754c89d5b misc (systemd): Add `systemd` units:
Add units for ``systemd`` to easily handle Libervia services on system-wide installation.

There is a service to run a single backend instance for all clients and components, and
another one if administrators prefer isolated instances. The latter one uses a systemd
template system.
2026-11-03 18:02:05 +01:00
Goffi
995200a978 cli (base): Add instance isolation options:
- New ``-i``/``--isolation`` argument is added, it must be used before first positional
  argument (i.e., first comamnd).
- The new `entry.py` module is now the entry point, so it can set the `LIBERVIA_ISOLATION`
  environment variable before the backend read it.
2026-11-03 18:02:05 +01:00
Goffi
c6ea6ea27b bridge (dbus): Add time out on connection:
- Add a 5s timeout on connection to avoid infinite hang when socket is not working.
- Raise `BridgeInitError` on time-out (needed to make `auto` bridge fallback correctly).
2026-10-30 22:19:59 +01:00
Goffi
25f1aa9178 cli (blog): add --comments-from to target an item comments node:
- add `--comments-from <item_id>` and `--comments-from-last` to automatically retrieve the
  comments node of a blog post.
- ⚠️`--draft-path` short option moved from `-F` to `-d` (so `-F` can be used for
  `--comments-from`).
2026-10-28 14:29:38 +01:00
Goffi
45112fb22e bridge (dbus): fix BridgeException conversion for AIOBridge 2026-10-28 14:29:38 +01:00
Goffi
681ff4d1c4 tools (config): Disable caching by default:
Caching is currently broken, and some refactoring is planned. we disable it until it's
fixed.
2026-10-28 14:29:38 +01:00
Goffi
fa04667152 cli (blog): preserve existing item fields on set -i + attachments fixes:
- `set -i` was replacing all fields of any existing item, losing tags, attachments,
  publication date, etc. It now fetches the existing item if any, and starts from its
  data. `-r/--replace` can be used to force a full replacement (and avoid fetching old
  item).
- `--attachment` uses `action="extend"` so multiple `-a` can be used.
- Fix attachement data key (`url` -> `sources`).
2026-10-28 14:29:38 +01:00
Goffi
8afde9962a plugin AP Gateway: various fixes and improvements:
- Sign item requests with the service/node actor and use the publisher for `attributedTo`.
- http_server: add missing `requestor_actor_id` to all `ap_*_request` handlers.
- http_server: fix following acceptation in `handle_follow_activity`.
- http_server: unescape `%40` in `get_ap_actor_data` at the beginning and use
  it everywhere.
- pubsub_service: delete subscription from storage on unsubscribe.
- Fix missing arguments in some calls.
- Fix various issues coming from conversion of data models to Pydantic.
- plugin XEP-0277: add `MbData.is_edit` property.
2026-10-28 14:29:38 +01:00
Goffi
50ffc8c3b4 core, memory (sqla), plugins XEP-0277, XEP-0346: various fixes:
- `is_local`: now use `server_jid`.
- `aio_func`: pass the missing `self` argument (`aio_fund` is unbound).
- Declare `pubsub_service` in `core_types.SatXMPPEntity`
- plugin XEP-0277: fix handling of `MbData.from_element` when node is not specified (so we
  use default node).
- plugin XEP-0346: `IdentityData`: fix field access, following move to Pydantic model.
2026-10-27 16:04:50 +01:00
Goffi
f862efe790 core (main): fix call to get_items in getDiscoItems 2026-10-26 18:36:41 +01:00
Goffi
099b107c29 tools (common/template): expose theme settings to the template:
- `css`: additional sheets rendered after the regular css files (can be used for a dark
  theme)
- `html_data_theme`: copied to the <html> data-theme attribute
- `themes_items`: theme selector entries (theme, label, icon)
- fix missing parenthesis in `is_file`
2026-10-26 18:36:41 +01:00
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