Commit graph

4,163 commits

Author SHA1 Message Date
Goffi
85cecd3d30 plugin XEP-0308: implement Last Message Correction 2023-11-28 17:38:31 +01:00
Goffi
c9c886480e models (core): separate MessageEditData from MessageEdition:
`MessageEditData` is used to carry a new `MessageData` when an edition has happened, while
`MessageEdition` is used to send changes to do for a new edition.
2023-11-28 17:37:02 +01:00
Goffi
445d5c088e core (memory/sqla_mapping): delete-orphan in History:
add `cascade=delete-orphan` to History's `messages`, `subjects` and `thread`, to make
modification of those attributes easier.
2023-11-28 17:35:20 +01:00
Goffi
191d06126e core (memory/sqla): add id filter in history_get 2023-11-28 17:26:45 +01:00
Goffi
70f3502429 core (memory/memory): fix the use of empty from_jid and to_jid in history_get 2023-11-28 17:25:47 +01:00
Goffi
39dc28fedf tools (common/data_objects): expose message's extra field. 2023-11-22 15:11:25 +01:00
Goffi
2b501c70d7 plugin XEP-0444: complete implementation:
"Message Reactions" implementation is now working and updating history. The
`message_reactions_set` bridge method can be used by frontend to `replace`, `add`,
`remove` or `toggle` reactions. History is properly updated, and signal are sent when
necessary.
2023-11-22 15:10:04 +01:00
Goffi
9d6158da2b plugin XEP-0359: use same ID as <message> for origin_id:
even if the XEP doesn't specify if Message ID must be the same as `origin_id`, using a
different one makes little sense, and is leading to bugs in other implementation (e.g.
Movim using the wrong ID for reactions).
2023-11-22 15:05:41 +01:00
Goffi
436848048a plugin XEP-0045: user normal workflow for history + get_room_user_jid method:
- workflow is now using the normal messages workflow even for history message: previous
  workflow was dedicated to MUC and only adding message to history, resulting in other
  plugins being skipped.
- new `get_room_user_jid` helps to retrieve easily the JID currently used in a joined
  room.
2023-11-22 15:00:57 +01:00
Goffi
f91c2be526 plugin XEP-0313: better error logging + store last stanza ID when retrieving archives + small improvments 2023-11-22 14:56:14 +01:00
Goffi
2e638b26fc plugin XEP-0280: minor parsing improvement. 2023-11-22 14:53:07 +01:00
Goffi
5bb47c69e4 core (memory/sqla_mapping): add a version_id column to detect race conditions. 2023-11-22 14:52:00 +01:00
Goffi
b8854ad46c core (xmpp): message reception workflow refactoring:
- Call methods from a root async one instead of using Deferred callbacks chain.
- Use a queue to be sure to process messages in order.
2023-11-22 14:50:35 +01:00
Goffi
483e63d709 Plugin XEP-0384: rename the pun names "OLDMEMO" and "TWOMEMO" to "OMEMO_legacy" and "OMEMO" for clarity. 2023-11-22 14:45:26 +01:00
Goffi
5f826f0505 core: introduce Pydantic based models in libervia.backend.models.core 2023-11-22 14:31:05 +01:00
Goffi
da5d3dfb86 bridge: add message_update signal 2023-11-22 14:26:13 +01:00
Goffi
d1fd8328c9 frontend (bridge): update location of D-Bus on server instructions. 2023-11-03 15:33:04 +01:00
Goffi
6b26dcedfa frontends (tools/webrtc): fix SINKS_APP condition check. 2023-11-03 15:32:17 +01:00
Goffi
221c73b947 frontends (tools/webrtc): Better message on Python override missing:
raise an exception instead of simple `print` to stop loading the module, and show a more
detailed message with the package to install.
2023-11-02 12:11:21 +01:00
Goffi
d96ca8443b doc (cli): documentation for the new call command:
fix 426
2023-11-01 14:10:31 +01:00
Goffi
934450168a cli: call command:
This command has 2 subcommands: `make` and `receive` to make a new call or wait for one.
When call is in progress, a window will be created to show incoming stream and local
feedback, and a text UI is available to (un)mute audio or video, and hang up.

rel 426
2023-11-01 14:10:00 +01:00
Goffi
b7d3afeabd cli (base): new a_quit method to run async cleaning methods:
it may be necessary to run some async cleaning method (e.g. if bridge is needed), this new
method handles async cleaning method, and will be called when `SystemExit` is used, or if
`a_quit` is called explicitely.

rel 426
2023-11-01 14:08:00 +01:00
Goffi
ef837273cd cli (loops): run GLib loop in same thread as asyncio:
use the new `install_glib_asyncio_iteration` to run GLib in the same thread as asyncio.

rel 426
2023-11-01 14:05:53 +01:00
Goffi
6a92ebce37 tests (unit/frontends): tests for webrtc implementation:
rel 426
2023-11-01 14:04:25 +01:00
Goffi
547375c079 frontends (tools): webrtc implementation:
this is a factored implementation usable by all non-web frontends. Sources and Sinks can
be configured easily to use tests source or local webcam/microphone, autosinks or a
`appsink` that the frontend will use.

rel 426
2023-11-01 14:03:36 +01:00
Goffi
1ce499a6d2 frontends (tools/aio): add tool to run from thread, run maybe async method, or run GLib loop:
- `run_from_thread` can be used to run a method from a thread.
- `maybe_async` can be used to run a method if we are not sure if it's async or not.
- `install_glib_asyncio_iteration` run the GLib loop from asyncio one's.

rel 426
2023-11-01 14:00:48 +01:00
Goffi
a57624cba6 install: add test dependencies to dev env 2023-11-01 13:57:08 +01:00
Goffi
143514999d plugin XEP-0363: fix headers setting 2023-11-01 13:55:34 +01:00
Goffi
ba3f96672f doc (cli): notification commands documentation. 2023-10-18 15:33:46 +02:00
Goffi
564ddf0be6 cli: add notification commands 2023-10-18 15:33:45 +02:00
Goffi
3e51dc187c cli (base): catch SystemExit to do a proper quit when Ctrl-C is pressed. 2023-10-18 15:33:38 +02:00
Goffi
40e7440de0 core (constants): accept y and t as True values. 2023-10-18 15:33:34 +02:00
Goffi
44eb60633e core (types): add is_admin to SatXMPPEntity 2023-10-18 15:33:24 +02:00
Goffi
b74f55d73d core: notifications implementation, first draft:
add a new table for notifications, and methods/bridge methods to manipulate them.
2023-10-16 17:29:31 +02:00
Goffi
bd2db73ee5 cli: rich initial integration 2023-10-18 15:30:07 +02:00
Goffi
ab7a7832c2 install: add rich dependency 2023-10-16 17:37:11 +02:00
Goffi
04a0e449c5 frontends (tools) new aio module for tools regarding asyncio:
A first method lets run an async method from blocking code.

rel 424
2023-10-03 16:27:51 +02:00
Goffi
366f827beb frontends (quick app): allow frontend to register an action handler:
Some feature may need to handle directly some action, such as the incoming `A/V call`
feature.

rel 424
2023-10-03 16:25:25 +02:00
Goffi
83925b198f frontend (quick app): allow to specify an async bridge:
Async Bridge can now be specified and used with `a_bridge` in addition to the legacy one.
The legacy one will eventually be removed.

rel 424
2023-10-03 16:24:13 +02:00
Goffi
c83ad1ea20 frontends (quick app): reformulate backend not running message + use "Libervia" instead of "SàT" 2023-10-03 16:22:10 +02:00
Goffi
f251aa48fa plugin XEP-0338: always add <group> element as first <jingle> child:
this is to work around a Movim bug (https://github.com/movim/movim/issues/1233).

rel 424
2023-10-03 16:00:21 +02:00
Goffi
0fba22ad10 plugin XEP-0338: be sure to add the <group> element only once:
rel 424
2023-10-03 15:27:07 +02:00
Goffi
f1d44fd872 plugin XEP-0167: mapping adjustments:
- use `9` as port placeholder
- add `a=ice-options:trickle` to indicate that ICE candidates may be sent after SDP
- moved senders mapping at media level
- fix `rtpmap` channel setting
- don't overwrite existing `fingerprint` data

rel 424
2023-10-03 15:25:52 +02:00
Goffi
81fb54de5c plugin XEP-0167: don't override existing metadata when preparing confirmation:
rel 424
2023-10-03 15:20:00 +02:00
Goffi
4df59a90cc plugin XEP-0167: fix key used to store metadata:
rel 424
2023-10-03 15:18:25 +02:00
Goffi
25cdd1bd42 plugin XEP-0167: keep media order when starting a call:
media content order is relevant when building Jingle contents/SDP notably for bundling.
This patch fixes the previous behaviour of always using the same order by keeping the
order of the data (i.e. order of original SDP offer). Previous behaviour could lead to
call failure.

rel 424
2023-10-03 15:15:24 +02:00
Goffi
29f70b35e2 plugin XEP-0045: fix name conflict in errback 2023-10-03 15:03:53 +02:00
Goffi
d60b79b18f plugin XEP-0167, XEP-0176: transport-info and ICE candidate sending are delayed if session is not active yet 2023-08-21 15:19:45 +02:00
Goffi
09d88cdfe2 plugin XEP-0167, XEP-0353: handle ringing:
- add a `jingle_preflight_info` method in the Jingle Application model to handle this kind
  of information
- XEP-0353 is calling `jingle_preflight_info` when a `ringing` message is received
- XEP-0167 use this information to send a `ringing` info to frontends
2023-08-16 18:33:28 +02:00
Goffi
71cfdccb5b plugin XEP-0166: reject session creation is session ID is empty 2023-08-16 18:28:32 +02:00