Commit graph libervia-backend/sat/plugins
Author SHA1 Message Date
Goffi
018d09caaa Renamed the project from "Salut à Toi" to "Libervia":
This renaming follows the decision taken at the General Assemblee of January 27th 2021 (cf.
https://repos.goffi.org/sat_docs/raw-file/tip/association/2021-01-27%20-%20compte%20rendu%20de%20l%27AG%20extraordinaire.pdf)
2021-03-20 20:42:04 +01:00
Goffi
dc86957043 date update 2021-03-19 15:45:14 +01:00
Goffi
33cef53495 core: moved sat_tmp.wokkel install sat_plugin:
This patch need to be installed early so it's available before anything imports
`wokkel.data_form`.
2021-03-18 22:35:59 +01:00
Goffi
2819405d56 plugin XEP-0346: new psSchemaDictGet to get node schema as a serialisable dict 2021-02-27 18:37:43 +01:00
Goffi
026ac9db13 tools (xml_tools): new dataForm2dataDict and dataDict2dataForm:
those methods convert a serialisable dict format to `wokkel.data_form.Form` and vice versa
2021-02-27 18:36:38 +01:00
Goffi
e60d563d27 plugin list: set overwrite_policy to any_publisher for grocery list 2021-02-27 18:33:53 +01:00
Goffi
79bfb24a62 plugin list: rename shopping list to grocery list 2021-02-27 18:32:34 +01:00
Goffi
1193faccdb plugin lists: register tickets_type namespace 2021-02-27 18:31:47 +01:00
Goffi
b1d0905974 plugin XEP-0060: added constants for overwrite policy configuration option 2021-02-27 18:25:20 +01:00
Goffi
96d229abdb plugin XEP-0060: renamed psRetractItem(s) to psItem(s)Retract for consistency. 2021-02-19 15:53:27 +01:00
Goffi
60eab42b9e plugin lists: new listsList method to retrieve lists from personal interests 2021-02-19 15:53:20 +01:00
Goffi
fe5af39ab5 plugin misc list: register lists for pubsub invitations 2021-02-19 15:52:28 +01:00
Goffi
795931373a plugin invitation: pubsub invitations:
- new Pubsub invitation plugin, to have a generic way to manage invitation on Pubsub based
  features
- `invitePreflight` and `onInvitationPreflight` method can be implemented to customise
  invitation for a namespace
- refactored events invitations to use the new plugin
- a Pubsub invitation can now be for a whole node instead of a specific item
- if invitation is for a node, a namespace can be specified to indicate what this node is
  about. It is then added in `extra` data
- an element (domish.Element) can be added in `extra` data, it will then be added in the
  invitation
- some code modernisation
2021-02-19 15:50:22 +01:00
Goffi
eabf3d536a plugin misc lists: register app NS for "tickets" NS instead of XEP-0346 submitted one 2021-02-19 15:49:59 +01:00
Goffi
bdf4759d21 plugin misc lists: templates:
Templates are a way to create lists with pre-filled schemas.
2021-02-19 15:49:58 +01:00
Goffi
8aebf00194 plugin tickets, merge_requests: renamed "tickets" feature to "lists":
this feature is more generic than only "tickets" for technical stuff, thus the name
"lists" seems more appropriate.
2021-02-04 21:05:21 +01:00
Goffi
28798940d7 Backed out changeset 6deea0d8d0e7
This patch has been merged by mistake, it will be applied later.
2021-02-04 21:07:49 +01:00
Goffi
f15f09bb70 plugin XEP-0346: use submitted namespace for node:
the node was not always adapted to the submitted namespace now used with XEP-0346, this
patch fixes it by adding the prefix when it's missing.
2021-02-04 21:05:21 +01:00
Goffi
b6eb5a83f5 plugin tickets, merge_requests: renamed "tickets" feature to "lists":
this feature is more generic than only "tickets" for technical stuff, thus the name
"lists" seems more appropriate.
2021-02-04 21:05:21 +01:00
Goffi
505e93d833 plugin app manager docker: use default emails for weblate:
when `email_from` was not set in `sat.conf`, no value was set for `WEBLATE_SERVER_EMAIL`
and `WEBLATE_DEFAULT_FROM_EMAIL`. These environment variables are needed for Weblate to be
launched, so default value are now used (the same as the one from official Weblate Docker
image).
2021-01-15 11:27:15 +01:00
Goffi
968ee50d31 plugin XEP-0346: "Form Discovery and Publishing" implementation:
this implementation replaces the former non standard node schema, and works in a similar
way (the schema is put in a separated node instead of a special field, thus it will now
work with most/all PubSub services, and not only SàT PubSub).

The implementation has been done in a way that nothing should be changed in frontends
(bridge methods names and arguments stay the same). The nodes are modified, but if values
are taken from backend, it's automatically adapted.
2020-12-11 17:57:00 +01:00
Goffi
df6f87d69a plugin XEP-0060: add constants for common values of publish model 2020-12-11 17:50:53 +01:00
Goffi
fa21471766 plugin XEP-0106: log rejected value when escaping fails. 2020-12-11 17:49:44 +01:00
Goffi
510ab4d5aa plugin XEP-0096: fix plugin following changes in plugin_misc_file 2020-12-11 17:48:19 +01:00
Goffi
247589aedc plugin XEP-0431: Fulltext Search for MAM implementation 2020-12-10 10:32:54 +01:00
Goffi
02472de2c4 plugin XEP-0234: make fileJingleRequest async to fix call of initiate 2020-12-04 12:32:05 +01:00
Goffi
125addc542 plugin XEP-0077: use xmpp_domain when set for host 2020-11-27 16:29:06 +01:00
Goffi
190f473cab plugin app manager: fixed public_url value check 2020-11-14 21:20:48 +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
Goffi
aab9a8bf91 plugin XEP-0166: new trigger point + coroutines + helper methods:
- a new `XEP-0166_initiate` async trigger point is available
- `initate` is now a coroutine
- `jingleSessionInit` in applications and transports handlers are now called using
  `utils.adDeferred`
- new `getApplication` helper method, to retrieve application from its namespace
- new `getContentData` helper method to retrieve application and its argument from content
2020-11-12 14:53:15 +01:00
Goffi
46c763cbf7 plugin file, XEP-0234: registering is now done by class + use of async:
- instead of registering a callback, a file sending manager now register itself and must
  implement some well known method (`fileSend`, `canHandleFileSend`) and optionally a
  `name` attribute
- `utils.asDeferred` is now used for callbacks, so all type of methods including
  coroutines can be used.
- feature checking is now handled by `canHandleFileSend` method instead of simple
  namespace check, this allows to use a method when namespace can't be checked (this is
  the case when a file is sent to a bare jid with jingle)
2020-11-12 14:53:15 +01:00
Goffi
afacc8d4c1 plugin XEP-0329: minor reformatting 2020-11-12 14:53:15 +01:00
Goffi
1fc6c1f66b plugin XEP-0065: some cleaning:
- reordered imports and removed useless try/except
- log warning before sending error
- avoid crash if connection is lost before session has has been received in server mode.
- fixed missing string formatting keywords
- renamed incorrect attribute and show explicitly that it's not used
2020-11-12 14:53:15 +01:00
Goffi
876ec80598 plugin XEP-0077: disconnect client when deleting self account:
where profile's XMPP account is deleted, its client must be explicitely disconnected to
avoid automatic reconnection, which would obviously fail.
2020-11-12 14:53:15 +01:00
Goffi
06503f83aa plugin XEP-0363: fixed invalid reference to slot in catched exception:
`slot` was referenced in an exception where it can't exist. This fix avoid a crash and
skip the handler when a StanzaError is catched.
2020-11-12 14:53:15 +01:00
Goffi
4e803712f7 plugin XEP-0060: use xml_tools.parse instead of wokkel.generic.parseXml:
`xml_tools.parse` does a better parsing, as wokkel's `parseXml` may be missing text
nodes.
2020-11-12 14:53:15 +01:00
Goffi
d52d8af6cf plugin XEP-0047: fixed file reading and content encoding 2020-11-12 14:53:15 +01:00
Goffi
4bc90ee0bc plugin ip: don't set to anymore for IQ stanza, as we send it to our server 2020-11-12 14:53:15 +01:00
Goffi
a3be4ed11d plugin app manager docker: typo 2020-10-20 09:12:38 +02:00
Goffi
e91cd1cc66 plugin app manager docker: weblate SàT app file for Docker 2020-09-28 21:10:33 +02:00
Goffi
e08be7f855 plugin app managed docker: handle Docker application with App Manager 2020-09-28 21:10:33 +02:00
Goffi
e1f123f120 plugin app manager: first draft:
/!\ new optional dependency: pyyaml

this plugin manage the life cycle of external applications. Application handlers register
to it.

Data needed to launch an application as set in YAML files. Local data types are used to
get values directly from SàT:

- !sat_conf to retrieve a configuration value
- !sat_generate_pwd to generate a password
- !sat_param for parameters specified a launch

Data can be exposed when an instance is launched, this can be used to specify the port
(notably the one used for web), or a generated password.
2020-09-28 21:10:30 +02:00
Goffi
03cffe789c core: minor typos, docstring/comments update 2020-09-20 14:05:40 +02:00
Goffi
f7a83dd054 component file sharing: added missing owner filtering in _retrieveFiles 2020-09-20 14:04:22 +02:00
Goffi
50df9e6537 plugin XEP-0329, core(xmpp): moved _compParseJids to SatXMPPComponent:
This method to retrieve owner and peer JID from an element is generally useful for
components, thus it has been moved. The part to retrieve owner JID from local JID has been
splitted in its own `getOwnerFromJid` method.
2020-09-20 14:04:11 +02:00
Goffi
93e1250a59 plugin XEP-0329: fix filtering by owner on components 2020-09-20 11:03:24 +02:00
Goffi
c9b2c1d27d component file sharing: fix used of self.files_path in _retrieveFiles 2020-09-17 21:42:14 +02:00
Goffi
629901674b plugin XEP-0329: fix conflict check + directory creation in onComponentCreateDir 2020-09-17 21:41:19 +02:00
Goffi
6601714e0e plugin XEP-0329: typo 2020-09-17 19:01:02 +02:00
Goffi
f321952cbe plugin XEP-0329: added FISCreateDir method:
This method is used to create a directory for component file sharing, and optionally set
its configuration.
2020-09-17 16:42:00 +02:00