annotate doc/libervia-cli/pubsub_attachments.rst @ 4240:79c8a70e1813

backend, frontend: prepare remote control: This is a series of changes necessary to prepare the implementation of remote control feature: - XEP-0166: add a `priority` attribute to `ApplicationData`: this is needed when several applications are working in a same session, to know which one must be handled first. Will be used to make Remote Control have precedence over Call content. - XEP-0166: `_call_plugins` is now async and is not used with `DeferredList` anymore: the benefit to have methods called in parallels is very low, and it cause a lot of trouble as we can't predict order. Methods are now called sequentially so workflow can be predicted. - XEP-0167: fix `senders` XMPP attribute <=> SDP mapping - XEP-0234: preflight acceptance key is now `pre-accepted` instead of `file-accepted`, so the same key can be used with other jingle applications. - XEP-0167, XEP-0343: move some method to XEP-0167 - XEP-0353: use new `priority` feature to call preflight methods of applications according to it. - frontend (webrtc): refactor the sources/sink handling with a more flexible mechanism based on Pydantic models. It is now possible to have has many Data Channel as necessary, to have them in addition to A/V streams, to specify manually GStreamer sources and sinks, etc. - frontend (webrtc): rework of the pipeline to reduce latency. - frontend: new `portal_desktop` method. Screenshare portal handling has been moved there, and RemoteDesktop portal has been added. - frontend (webrtc): fix `extract_ufrag_pwd` method. rel 436
author Goffi <goffi@goffi.org>
date Sat, 11 May 2024 13:52:41 +0200
parents 8b76caa89aa0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3873
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
1 .. _libervia-cli_pubsub_attachments:
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
2
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
3 =======================================================
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
4 pubsub/attachments: (Un)Attach Metadata to Pubsub Items
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
5 =======================================================
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
6
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
7 ``attachments`` is a subcommand grouping all pubsub commands related to "pubsub
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
8 attachments" specification.
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
9
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
10 With them, you can (un)attach data to any pubsub item. This is notably used to handle
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
11 data like saying if an item is (un)noticed, or add emoji reactions.
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
12
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
13 get
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
14 ===
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
15
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
16 Retrieve a list of all attached data to an item.
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
17
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
18 By default all attachments of the item are returned, this can be filtered by using ``-j
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
19 JIDS, --jid JIDS``
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
20
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
21 example
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
22 -------
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
23
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
24 Louise check all attachments on her last blog post::
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
25
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
26 $ li pubsub attachments get -s louise@example.org -n urn:xmpp:microblog:0 -i some-news-acf0
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
27
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
28 set
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
29 ===
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
30
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
31 Update or replace attachments. By default new attachments are updated, but if the ``-R,
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
32 --replace`` is used, new attachments replace the whole former one where it make sense. For
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
33 instance, ``-R`` doesn't change anything for ``noticed`` attachments, but it will replace
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
34 all reactions (potentially with no reaction at all), where the default behaviour is to
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
35 merge former and new reactions.
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
36
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
37 Note that only specified attachments are affected, if unknown or unspecified attachments
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
38 exist, they will stay unmodified.
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
39
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
40 For now, only ``noticed`` (to say that an element has been seen and taken into account)
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
41 and ``reactions`` (emojis to show emotion or other kind of reaction about something) are
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
42 managed.
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
43
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
44 ``-N [BOOLEAN], --noticed [BOOLEAN]`` takes on optional argument to say if the item is
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
45 noticed or not. If the optional argument is not specified, if will be the same as if the
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
46 ``true`` value was used.
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
47
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
48 examples
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
49 --------
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
50
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
51 Pierre wants to indicate to Louise that is has seen and he took into account her last blog post::
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
52
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
53 $ li pubsub attachments set -s louise@example.org -n urn:xmpp:microblog:0 -i some-news-acf0 -N
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
54
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
55 Louise wants to react to Pierre blog post about night trains::
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
56
8b76caa89aa0 doc (cli/pubsub, cli/blog): `attachments` subcommands documentation:
Goffi <goffi@goffi.org>
parents:
diff changeset
57 $ li pubsub attachments set -s pierre@example.net -n urn:xmpp:microblog:0 -i nigh-train-are-great-f120 -r 🚆🌜💤