`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".
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).
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).
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.
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.
- 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
- 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`)
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.
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.
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
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
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.
- 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).
- `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.
Use Pydantic models for data used with bridge.
Also update `backend.models.core.DiscoIdentity` to have `None` as possible and default
value for `name`.
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.
If empty string is used for nick in `join` (e.g., due to a bridge call), take use part of
the JID. This fix the use of empty resource, which was resulting in rejection by the
server.
5s timeout is too short, if the server is overloaded or connection is slow, it makes the
identity retrieval fail. 15s is more reasonable and matches timeout used for disco.