Commit graph libervia-backend/sat/plugins/plugin_xep_0353.py
Author SHA1 Message Date
Goffi
43a0621182 plugin XEP-0353: update according to XEP changes + <description> fix:
- `XEP-0166_initiate_elt_built` trigger is now used to have the `<description>` element
  built, so they can be used with there correct arguments in the jingle initiation message
- add message processing hint as it is now specified in the XEP
2023-05-29 13:32:40 +02:00
Goffi
1781694141 core: renamed messageReceived trigger to message_received 2023-05-29 13:32:08 +02:00
Goffi
9141922d57 plugin XEP-0166: refactoring, and various improvments:
- add models for transport and applications handlers and linked data
- split models into separate file
- some type hints
- some documentation comments
- add actions to prepare confirmation, useful to do initial parsing of all contents
- application arg/kwargs and some transport data can be initialised during Jingle
  `initiate` call, this is notably useful when a call is made with transport data (this is
  the call for A/V calls where codecs and ICE candidate can be specified when starting a
  call)
- session data can be specified during Jingle `initiate` call
- new `store_in_session` argument in `_parse_elements`, which can be used to avoid
  race-condition when a context element (<decription> or <transport>) is being parsed for
  an action while an other action happens (like `transport-info`)
- don't sed `sid` in `transport_elt` during a `transport-info` action anymore in
  `build_action`: this is specific to Jingle File Transfer and has been moved there

rel 419
2023-05-15 16:23:11 +02:00
Goffi
5ba4239fcc core: don't use meta_ prefix anymore for action_extra in action_new signal. 2023-05-15 16:20:50 +02:00
Goffi
6a6f15707a massive refactoring to switch from camelCase to snake_case:
historically, Libervia (SàT before) was using camelCase as allowed by PEP8 when using a
pre-PEP8 code, to use the same coding style as in Twisted.

However, snake_case is more readable and it's better to follow PEP8 best practices, so it
has been decided to move on full snake_case. Because Libervia has a huge codebase, this
ended with a ugly mix of camelCase and snake_case.

To fix that, this patch does a big refactoring by renaming every function and method
(including bridge) that are not coming from Twisted or Wokkel, to use fully snake_case.

This is a massive change, and may result in some bugs.
2023-04-08 13:54:42 +02:00
Goffi
0c3910bafd plugin XEP-0353: fix jingle initiation on disco "Service Unavailable" error:
When requesting disco info on a bare jid which is not in our roster, server may return
"Service Unavailable" (to avoid leaking valid JIDs). In this case, the initiation was
failing, this is now fixed by using empty categories in this case.
2021-09-08 11:16:52 +02:00
Goffi
6bf40afe6a plugin XEP-0353: fix plugin modes 2021-09-08 11:16:48 +02:00
Goffi
3ea9c6fdd9 plugin XEP-0353: don't use Jingle Message Initiation for components:
Jingle Message Initiation is currently not useful for components, and the message workflow
is different in Libervia between clients and components (as a result, `messageReceived`
trigger is never called, and the session proposal is never answered).
2021-05-01 18:30:01 +02:00
Goffi
dc86957043 date update 2021-03-19 15:45:14 +01:00
Goffi
63e61fc036 plugin XEP-0353: Jingle Message Initiation implementation:
This plugin uses the new `XEP-0166_initiate` trigger to initiate a Jingle session with
messages if the peer jid has no resource specified.
On reception, if the sender is not in our roster, a confirmation is requested to user to
avoid leaking presence and IP. If user refuses the session for somebody not in roster,
nothing is sent at all (the request is just ignored).
2020-11-12 14:53:15 +01:00