Commit graph libervia-backend/sat/plugins
Author SHA1 Message Date
Goffi
76c98da073 comp AP Gateway: ActivityPub Component first draft:
this implement the base component, it is for the moment usable only through a developer
API.

rel: 362
2021-09-26 16:41:55 +02:00
Goffi
d7d40a6d50 merge bookmark @ 2021-09-26 16:41:49 +02:00
Goffi
3dd4a1e04f plugin XEP-0277: import SatXMPPEntity from core_types 2021-09-26 16:38:40 +02:00
Goffi
31985ed0fc component (file-sharing): use file-sharing instead of file_sharing:
a dash is used instead of underscore for entry-point and config section., as it is best
practice to use dash on command-line.
2021-09-26 16:35:56 +02:00
Goffi
f40dbe8604 plugin XEP-0384: fix calls outside of main thread:
`callFromThread` is used instead of `callLater` with a 0 delay, as the later is not made
to be called outside of main thread (which was resulting in huge and random delays during
calls).

fix `OmemoStorage._callMainThread` which was returning wrong Deferred due a late lambda
evaluation.
2021-09-08 17:58:48 +02:00
Goffi
d2ae4a124a plugin pubsub cache: implement psCacheSearch
rel 361
2021-09-08 17:58:48 +02:00
Goffi
50d7cb2a51 merge bookmark @ 2021-09-08 11:20:37 +02:00
Goffi
fb310c104c plugin misc file: fix getDestDir returning a Deferred in a coroutine 2021-09-08 11:17:19 +02:00
Goffi
47d258e841 plugin android: use callFromThread instead of callLater:
`callLater` is not made to be called outside of main thread, `callFromThread` is the
method to call in this case.
2021-09-08 11:17:13 +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
dae3308751 plugin XEP-0277: use common.uri to parse comment URIs 2021-09-08 11:14:53 +02:00
Goffi
972e96bf04 plugin text syntaxes: remove side effect on init:
When text syntaxes was initialised, `syntaxes` dict was filled, but it was a class
attribute. As a result, re-initialising it (which may happen for tests, and maybe in the
future dynamically), was not starting with an empty dict, but with an already-filled one,
resulting in conflicts.

This patch fixes it by moving `syntaxes` to an instance attribute.
2021-08-02 21:52:17 +02:00
Goffi
6fa6f7a1f8 plugin pubsub cache: use asDeferred with match_cb 2021-08-02 21:52:17 +02:00
Goffi
e6e77c7770 plugin XEP-0059: don't show warning message when <last> is missing if there is not message 2021-08-02 21:52:17 +02:00
Goffi
52f3532917 merge branch "@" 2021-08-02 21:49:51 +02:00
Goffi
cf5213d4fe plugin XEP-0346: fix deprecated import 2021-08-02 21:47:22 +02:00
Goffi
35bfb8b8b7 plugin XEP-0277: pubsub cache analyser implementation 2021-07-29 22:51:01 +02:00
Goffi
92c0c09eb2 plugin pubsub cache: Pubsub Caching implementation 2021-07-29 22:51:01 +02:00
Goffi
577a81c936 plugin XEP-0059: new getNextRequest method to generate request to retrieve next page 2021-07-29 21:30:32 +02:00
Goffi
a7bae11831 plugin XEP-0277: ignore max_items if rsm_request is set 2021-07-29 21:28:48 +02:00
Goffi
91faf66b36 plugin XEP-0060: fix notification handling in retractItems 2021-07-29 17:28:02 +02:00
Goffi
5dcbd8eeef plugin XEP-0060: add trigger points 2021-07-29 17:26:59 +02:00
Goffi
9ef1f7a1f8 plugin XEP-0060: events callbacks can now be sync or async 2021-07-29 17:10:36 +02:00
Goffi
42979a7140 plugin XEP-0060: handle purge notifications 2021-07-29 15:54:54 +02:00
Goffi
f2a06bbcbf plugin XEP-0060: getItems extra is now serialised dict 2021-07-28 23:01:15 +02:00
Goffi
fcbbc2aeed core (xmpp): renamed SatRosterProtocol.presenceSubscribed to isSubscribedFrom (and added isSubscribedTo) 2021-07-28 22:15:31 +02:00
Goffi
bab851006f plugin XEP-0060: getItem(s), publish and (un)subscribe are now coroutines 2021-06-30 16:19:14 +02:00
Goffi
4421eefbf3 merge changes from main branch 2021-06-17 13:05:58 +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
97df5f8be3 core: various changes and fixes to work with new storage and D-Bus bridge:
- fixes coroutines handling in various places
- fixes types which are not serialised by Tx DBus
- XEP-0384: call storage methods in main thread in XEP: Python OMEMO's Promise use thread
  which prevent the use of AsyncIO loop. To work around that, callLater is used to launch
  storage method in main thread. This is a temporary workaround, as Python OMEMO should
  get rid of Promise implementation and threads soon.
2021-06-03 15:21:43 +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