Commit graph libervia-backend/sat/plugins
Author SHA1 Message Date
Goffi
dae3308751 plugin XEP-0277: use common.uri to parse comment URIs 2021-09-08 11:14:53 +02:00
Goffi
cf5213d4fe plugin XEP-0346: fix deprecated import 2021-08-02 21:47:22 +02:00
Goffi
7adbf3ead8 core, frontends: fix invalid translatable strings.
Some f-strings where used in translatable text, this has been fixed by using explicit
`format()` call (using a script based on `tokenize`).

As tokenize messes with spaces, a reformating tool (`black`) has been applied to some
files afterwards.
2021-06-14 18:35:12 +02:00
Goffi
8d8541015c app manager (docker/weblate): add WEBLATE_ENABLE_HTTPS:
The value can be set in `libervia.conf` with `weblate_enable_https`. It defaults to "1".
2021-06-14 12:19:21 +02:00
Goffi
46b643fc59 app manager (docker/weblate): use new files feature to set settings-override.py:
This file is used to set `USE_X_FORWARDED_HOST`, which is necessary to make Weblate work
correctly being an Apache (and potentially other HTTP servers) reverse proxy (otherwise we
have CSRF errors, cf.  https://github.com/WeblateOrg/weblate/issues/1912).
2021-06-12 15:14:57 +02:00
Goffi
98fb1b4091 plugin app manager: add a way to create files:
a `files` field can now be used to create files on the fly. Its value must be a dict where
key are file names, and values are an other dict with file data.

For now file data can only use the `content` key. Value of content will be written to the file.
If a file already exists, it is not overwritten.
2021-06-12 15:10:49 +02:00
Goffi
35659893be plugin app manager: "public_url" must NOT have a schema 2021-06-11 17:39:59 +02:00
Goffi
6426103f12 plugin XEP-0313: on cold start (without known archive) we only request 50 last messages 2021-06-10 15:44:30 +02:00
Goffi
7e622ae5d1 plugin XEP-0054: fix call to JID serialisation method 2021-06-10 15:43:28 +02:00
Goffi
c1de4dfcc4 plugin nat port: rename file to plugin_misc_nat_port.py to make the name valid 2021-06-09 18:39:13 +02:00
Goffi
c32defe690 plugin XEP-0054: fix update call 2021-06-09 11:35:49 +02:00
Goffi
510e3e9bdc plugin XEP-0277: "user" part of author jid is used for author name when later is missing 2021-06-06 22:06:28 +02:00
Goffi
2155acd45b plugin forums: use serialised data for extra in forumTopicsGet 2021-06-06 19:35:19 +02:00
Goffi
93e4021b86 plugin XEP-0277: don't wrap DataError in failure.Failure in parseCommentUrl as it is not catched correctly:
`failure.Failure` is subclass of `BaseException` but not of `Exception`, as a result
`except Exception` doesn't catch it correctly. This is fixed by not wrapping `DataError`
in `failure.Failure` anymore.
2021-06-04 17:18:44 +02:00
Goffi
9d3f2be7b1 plugin XEP-0045: fix /join text command 2021-06-03 17:59:41 +02:00
Goffi
26875b8552 plugin XEP-0045: fix "reason" parsing for /ban and /kick text commands 2021-06-03 17:47:25 +02:00
Goffi
b6779cd0fd plugin upload: don't run available_cb if upload_jid is used in upload method 2021-05-06 18:11:33 +02:00
Goffi
76392e9377 component file sharing: forbid jingle upload by entities which are not in allowed hosts 2021-05-05 15:41:19 +02:00
Goffi
3c12c4f797 component file sharing (management): add values of quota and used size on result form 2021-05-05 15:37:33 +02:00
Goffi
3da29896df plugin XEP-0050: show notes when there is a data form on completed command:
Notes are now added on completed command, as text widgets.
2021-05-05 15:37:33 +02:00
Goffi
63875ae4f1 component file sharing (plugin management): new command to get available quota/used space. 2021-05-05 15:37:33 +02:00
Goffi
ac8f9f7817 component file sharing: quotas implementation:
quotas can now be specified using the `quotas_json` option of `component file_sharing`
section in settings. This must be a dict where:
    - `users` key contains default quotas for all users
    - `admins` key contains quotas for administrators (not implemented yet)
    - `jids` contain bare JID to quota mapping, to have user-specific quota

The value can be either a int for quota in bytes, or a case insensitive string with an
optional multiplier symbol (e.g. "500 Mio"). `None` can be used for explicit unlimited
quota (which is the default is `users` is not set).

When a file size is too big for quota, upload is refused with an error message indicating
allowed quota, used space, and the size of the file that user wants to upload.
2021-05-05 15:37:33 +02:00
Goffi
8ed9e310c5 plugin XEP-0166, XEP-0234: better management of terminate:
- new `text` argument to specify human readable reason of termination
- handling of `FirstError` (used when a error happens in a DeferredList)
- handling of `StanzaError`
- (XEP-0234): show human readable text of the reason if present
2021-05-05 15:37:33 +02:00
Goffi
3024ae2be0 plugin XEP-0363: allow async callbacks in handlers + method to generate file-too-large element 2021-05-05 15:37:33 +02:00
Goffi
4e36667134 tools (common/utils): new methods to parse and generate file size with symbols:
- `parseSize` lets parse a size which can be either a int, or a string with a symbol like
  `Mio`
- `getSizeMultiplier` returns a tuple of size with it's multiplier symbol
- `getHumanSize` returns a string with size and adapted multiplier.
2021-05-05 15:37:33 +02:00
Goffi
435027c1c9 plugin XEP-0060, XEP-0277: new rename methods (psItemRename, mbRename):
Those methods recreate an item to given new ID, and if successful, delete the former one.
2021-05-01 18:37:57 +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
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