Commit graph libervia-backend/sat/plugins
Author SHA1 Message Date
Goffi
f8eeeeaa0c plugin XEP-0329: fix root node retrieval and _fileSendingRequestTrigger return value 2021-05-01 18:25:42 +02:00
Goffi
6456df58fb plugin misc forums: use rich content in createTopic 2021-05-01 18:23:42 +02:00
Goffi
2cfffc5f6c component (file sharing): fix retrieving owner from jid when user part is not specified 2021-05-01 18:22:53 +02:00
Goffi
0af68b683a XEP-0277: new preview/mbPreview method:
This method does more or less the same thing as sending, but without actually sending the
item, and parse the generated element just after. This way, the triggers are run, and a
preview of the item can be made for the resulting microblog data.
2021-04-29 15:49:59 +02:00
Goffi
75a5716e17 plugin XEP-0346: bridge method to retrieve template, submitted, or application namespaces 2021-04-22 18:20:41 +02:00
Goffi
c96670e5f3 plugin list: delete implementation:
`delete` is similar to XEP-0060's retractItem, but node is set to default ticket one if
not specified.
2021-04-22 18:19:52 +02:00
Goffi
a7704f4da1 comp file sharing: fix port type:
when port was retrieved from config, it was a string instead of a int
2021-04-22 18:18:09 +02:00
Goffi
3768e8bb4d plugin misc account: fix missing arg 2021-04-22 18:17:15 +02:00
Goffi
3377136c62 plugin misc account: specify domain in new account email sent to admins 2021-04-21 11:36:26 +02:00
Goffi
9df77100c4 plugin XEP-0277: user friendly ID:
when publishing a blog post without `id` specified, instead of using uuid, a user friendly
ID based on title or content is used. This allow to have better URLs in web frontend.

There is a (very low) risk of name collision if several articles with the same title or
content are published on the same pubsub node, user friendly ID can be deactivated by
using `user_friendly_id=False` in blog data to avoid that.
2021-04-16 18:33:00 +02:00
Goffi
618917e0ef plugin XEP-0329: check files conflict also for root files 2021-04-16 18:32:40 +02:00
Goffi
a2e79b0c28 plugin XEP-0277: be sure to have an author_jid set 2021-03-27 14:59:50 +01:00
Goffi
69112bcd79 plugin XEP-0277: better resilience to broken items:
- if `author` element can't be found, `publisher` attribute, then `IQ`'s `from` attributes
  are used as fallback to find author jid
- fix categories (tags) parsing if `author` element is not found
- remove items which have failed parsing from `mbGet` results (instead of using `None`).
2021-03-27 14:38:27 +01:00
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