- 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.
We now use `client.is_message_printable` to check if message is printable. If it's not, we
block storage in DB and sending to bridge. The previous code could let message pass if
metadata were stored in `extra`.
Podman can be used as a drop-in replacement for Docker, and it doesn't need root
permissions. The plugin now has a settings to use Podman, and use `auto` by default which
will choose the first found on the device (Podman is tested first).
New `serverless` commands. For now only `discover` and `info` are implemented:
- `discover` find other peers on LAN
- `info` get various infos on serverless status (for now, our own device ID,
advertised service name, and the number of found peers)
rel 479
Implement peer discovery on LAN using mDNS (via `zeroconf`).
A Peer ID is generated (via `libP2P`) per instance, and announced on backend startup.
Meanwhile, other peers are discovered on LAN. A signal is send on peer found and another
on peer lost.
There a bridge methods to find already discovered peers, and to get infos on serverless
(our own ID, adverised service name, and number of peers found).
`Zeroconf` runs in background in its own thread.
rel 479
Cleaning methods per-profile (`profile_disconnected`) and per-plugin (`unload`) were not
called correctly. They are now called on shutdown with the `before/shutdown` Twisted
event.
With this event, it's still possible to call Deferred and do cleaning requiring async
calls.
rel 479