Commit graph

3,791 commits

Author SHA1 Message Date
Goffi
83a6d475a9 plugin XEP-0060: do not raise an error when not subscribed on unsubscribe:
when an error is received on unsubscribe because user was not subscribed, a warning is
logged, but no exception is raised anymore, as the expected result is reached.
2022-06-17 14:15:23 +02:00
Goffi
5ecca19b71 doc (components): typo/spelling 2022-06-17 14:15:23 +02:00
Goffi
60dcb5d396 doc (cli/blocking): blocking command documentation:
rel 367
2022-06-17 14:15:23 +02:00
Goffi
ab0739c35f cli: new blocking commands:
commands to list blocked entities, block or unblock one or more entities

rel 367
2022-05-27 12:15:04 +02:00
Goffi
5f64ea2bf3 plugin XEP-0191: Blocking Command implementation:
rel 367
2022-05-27 12:12:16 +02:00
Goffi
5191343a40 doc (components): message delivery documentation:
fix 366
2022-05-24 17:57:41 +02:00
Goffi
4c28917466 test (unit/AP gateway): AP direct message ↔ XMPP <message> conversion:
test that AP direct messages are converted to XMPP `<message>` stanzas instead of pubsub
items.
test that XMPP `<message>` stanzas are converted to AP direct messages (i.e. items
addressed solely to the recipient, without *followers* or *public* collections).

rel 366
2022-05-24 17:57:39 +02:00
Goffi
fa81d96d79 comp AP gateway: message conversion:
Convert direct AP items to XMPP `<message>` stanzas, and vice versa.
Documentation will follow soon to explain the behaviour.

rel 366
2022-05-24 17:57:36 +02:00
Goffi
72ec311ef1 tests (unit/ap_gateway): fix tests 2022-05-24 17:49:14 +02:00
Goffi
c8df7104eb core (memory): fileDelete is now async, fix coroutine issue 2022-05-16 14:37:58 +02:00
Goffi
85911b33d4 plugin invitation: use store hint to be sure that the invitation is archived 2022-05-16 14:20:01 +02:00
Goffi
8946b6fb4e tools (common/email): use from_email is specified, always set email_sender_domain 2022-05-16 13:03:53 +02:00
Goffi
d0973d121d core: remove useless method (it's available directly in client) 2022-05-16 13:02:59 +02:00
Goffi
f4fa679e9c comp file sharing: handle admins in quotas 2022-05-15 14:15:24 +02:00
Goffi
c8025a52eb core: method to know if a profile/entity is an admin:
the new `is_admin` SatXMPPEntity property tell if it's an administrator.

Admin JIDs are retrieve on init, so they can be looked after when profle is not available
(notably when a component handle a request and has only a JID available). The new
`memory.isAdminJID` method is then used.
2022-05-15 14:14:52 +02:00
Goffi
9564647b21 doc (installation): sat_media is now libervia-media 2022-05-14 23:00:35 +02:00
Goffi
975cfdcf76 install (setup): fix urwid-satext version 2022-05-14 22:48:35 +02:00
Goffi
f96d703098 doc (installation): fix missing hg clone instructions 2022-05-14 22:35:39 +02:00
Goffi
92cc11b137 install: requirements.txt update 2022-05-14 22:34:13 +02:00
Goffi
a59ddef97c doc (components): update AP gateway documentation:
add documentation for:
    - Publishing an Item
    - Following, Subscribing and Cache
    - Following/Followers Collections and Public Pubsub Subscription

fix 365
2022-05-13 19:34:12 +02:00
Goffi
f66f602df2 doc (cli/pubsub): document new --public flags:
`--public` option is documented for `subscribe`, `subscriptions` and `node subscriptions
get`, with examples. A warning has been added to show explicitely the privacy implication
of using `--public` with `subscribe`.

rel 365
2022-05-13 19:32:06 +02:00
Goffi
4d3f5f1afa tests (unit/ap-gateway): tests for following/followers <=> PPS:
AP following/followers collections to XMPP Public Pubsub Subscriptions conversion is
checked in both directions.

rel 365
2022-05-13 19:29:17 +02:00
Goffi
fca541a2f1 tests (e2e/cli/cache_search): make the test more resilient:
the caching is triggered by `li.blog.get`, but it is done in parallel without blocking the
command, thus there is a possibility that the data is not yet in cache when the following
test is done.

A loop with delay is done, to be sure that cache is filled before doing the assertion.
2022-05-13 19:27:21 +02:00
Goffi
5b85ebfcb7 docker (prosody-e2e): update Prosody's conf:
Due to mod_privilege and PAM implementation in Libervia Pubsub, permissions have been
udpated in `prosody.cfg.lua`, with the new `iq` permission and namespace delegation needed
for PAM.

`"urn:xmpp:delegation:2:bare:disco#info:*"` namespace delegation was also missing.

rel 365
2022-05-13 19:24:38 +02:00
Goffi
f0a0575f68 docker (backend-dev): move dbus unix socket:
there seem to be a regression with Docker: the volume is not propagated anymore with
pre-existing files when a unix socket is inside.

This is the case in `backend-dev` with the D-Bus unix socket put in
`/home/libervia/.local/share/libervia/dbus_socket`, when the volume is mounted at
`/home/libervia/.local/share/libervia/`, resulting in hard to debug failures.

To work around that, the socket is not put in the volume mount point anymore, and has been
moved to `/home/libervia/.local/share/`
2022-05-13 19:21:17 +02:00
Goffi
0f5e74efb6 docker (backend-dev/libervia.conf): don't force CLI background anymore:
CLI background autodetection has been fixed and should not crash anymore, thus this
workaround is not needed anymore.
2022-05-13 19:16:56 +02:00
Goffi
da7a90abd2 CLI: don't fail when calling getContacts with a component profile 2022-05-13 19:15:30 +02:00
Goffi
0114769fa4 comp AP gateway: publish, (un)subscribe/(un)follow, public subscription/following/followers:
this patch implements those major features:

- `publish` is implemented on virtual pubsub service, thus XMPP entities can now publish
  to AP using this service
- replies to XMPP items are managed
- `inReplyTo` is filled when converting XMPP items to AP objects
- `follow` and `unfollow` (actually an `undo` activity) are implemented and mapped to
  XMPP's (un)subscribe. On subscription, AP actor's `outbox` collection is converted to
  XMPP and put in cache. Subscriptions are always public.
- `following` and `followers` collections are mapped to XMPP's Public Pubsub Subscription
  (which should be XEP-0465, but the XEP is not yet published at the time of commit), in
  both directions.
- new helper methods to check if an URL is local and to get JID from actor ID

doc will follow to explain behaviour

rel 365
2022-05-13 19:12:33 +02:00
Goffi
436bb119e8 plugin XEP-0277: be sure to have service set in item2mbdata and node when provided
rel 365
2022-05-13 18:50:33 +02:00
Goffi
6a0ca28f45 plugin XEP-0277: bridge method mbIsCommentNode + methods renaming 2022-05-13 18:48:41 +02:00
Goffi
36eb09e53e plugin XEP-0277: fix await trigger incorrectly used on a sync trigger 2022-05-13 18:46:51 +02:00
Goffi
ab2f9661d1 plugin pubsub cache: new resync argument to force resynchronisation in synchronize 2022-05-13 18:44:54 +02:00
Goffi
4e441258b3 plugin pubsub cache: more resilient node caching:
- cache only latest 20 items when disco infos are hidden and thus we can't discover
  feature/RSM implementation
- better handling of args when calling `storage.getItems`

rel 365
2022-05-13 18:43:42 +02:00
Goffi
d20e609a5c plugins XEP-0060, XEP-0376, XEP-0465, CLI: PAM + PSS implementation:
- update psSubscriptionsGet to use serialised return value
- implement XEP-0376 Pubsub Account Management
- implement XEP-0465 Public Pubsub Subscriptions
- CLI `pubsub` commands updated accordingly, and added `--public` flags to `subscribe`,
  `Subscriptions` and `node Subscriptions get`

⚠ `XEP-0465` is speculative, the XEP has been accepted by council but not published yet.
As is should be the next one, and current latest one is `XEP-0464`, `XEP-0465` has been
anticipated.

rel 365
2022-05-13 18:38:05 +02:00
Goffi
feee36791b plugin XEP-0060: use serialised options in psSubscribe + triggers update 2022-05-13 18:29:42 +02:00
Goffi
24a1355686 plugin XEP-0060: better filtering when looking for default pubsub service 2022-05-13 18:22:06 +02:00
Goffi
7d6c2eb6f2 tools (async_trigger): fix return value in asyncReturnPoint + typing hints 2022-05-13 18:19:56 +02:00
Goffi
c678f1f993 core (memory/sqla): searchPubsubItems can now filter on item names 2022-05-13 18:02:37 +02:00
Goffi
75684953be core (memory/sqla): add attribute to filter on item_ids in getItems 2022-05-13 17:58:51 +02:00
Goffi
033e18d996 core (memory/param): fix unproper use of Failure 2022-05-13 17:57:24 +02:00
Goffi
4a201bc0f2 core (memory/disco): fix hard encoded value in findServiceEntity 2022-05-13 17:56:40 +02:00
Goffi
608944d9d9 core (disco): use new client.server_jid property in getItems 2022-05-13 17:55:51 +02:00
Goffi
0a23ca36cb core (xmpp): add a server_jid property 2022-05-13 17:52:43 +02:00
Goffi
b48081e679 jp (xmlui): add PasswordWidget 2022-03-22 17:00:42 +01:00
Goffi
d3b81a7fa9 tools (common/template): fix setting of css_files_noscript when css_file is specified 2022-03-22 17:00:42 +01:00
Goffi
44906f3bc3 doc (components): documentation of comments_max_depth option and threads conversion:
ActivityPub to XMPP threads conversion is detailed.

fix 364
2022-03-22 17:00:42 +01:00
Goffi
8a2154ccca comp AP gateway: signature checking, caching and threads management:
- HTTP signature is checked for incoming messages
- AP actor can now be followed using pubsub subscription. When following is accepted, the
  node is cached
- replies to posts are put in cached pubsub comment nodes, with a `comments_max_depth`
  option to limit the number of comment nodes for a root message (documentation will come
  to explain this).

ticket 364
2022-03-22 17:00:42 +01:00
Goffi
317e8a6a94 core (memory/sqla): new table/mapping to handle Pubsub node subscriptions:
node subscriptions can now be cached, this can be useful for components which must keep
track of subscibers.

rel 364
2022-03-22 17:00:42 +01:00
Goffi
f90d76aa18 core (memory/migration): ignore FTS table when autogenerating script for migration:
SQLite Full-Text Search stable are not associated to Python object and can't be detected
by Alembic. To avoid the generation of unwanted drop commands, they are now ignored when
autogenerating migration scripts.

rel 364
2022-03-22 17:00:42 +01:00
Goffi
5ca925996d comp AP: helper methods to get AP objects:
rel 364
2022-03-22 17:00:42 +01:00