view doc/libervia-cli/pubsub_attachments.rst @ 3888:aa7197b67c26

component AP gateway: AP <=> XMPP reactions conversions: - Pubsub Attachments plugin has been renamed to XEP-0470 following publication - XEP-0470 has been updated to follow 0.2 changes - AP reactions (as implemented in Pleroma) are converted to XEP-0470 - XEP-0470 events are converted to AP reactions (again, using "EmojiReact" from Pleroma) - AP activities related to attachments (like/reactions) are cached in Libervia because it's not possible to retrieve them from Pleroma instances once they have been emitted (doing an HTTP get on their ID returns a 404). For now those cache are not flushed, this should be improved in the future. - `sharedInbox` is used when available. Pleroma returns a 500 HTTP error when ``to`` or ``cc`` are used in a direct inbox. - reactions and like are not currently used for direct messages, because they can't be emitted from Pleroma in this case, thus there is no point in implementing them for the moment. rel 371
author Goffi <goffi@goffi.org>
date Wed, 31 Aug 2022 17:07:03 +0200
parents 8b76caa89aa0
children
line wrap: on
line source

.. _libervia-cli_pubsub_attachments:

=======================================================
pubsub/attachments: (Un)Attach Metadata to Pubsub Items
=======================================================

``attachments`` is a subcommand grouping all pubsub commands related to "pubsub
attachments" specification.

With them, you can (un)attach data to any pubsub item. This is notably used to handle
data like saying if an item is (un)noticed, or add emoji reactions.

get
===

Retrieve a list of all attached data to an item.

By default all attachments of the item are returned, this can be filtered by using ``-j
JIDS, --jid JIDS``

example
-------

Louise check all attachments on her last blog post::

  $ li pubsub attachments get -s louise@example.org -n urn:xmpp:microblog:0 -i some-news-acf0

set
===

Update or replace attachments. By default new attachments are updated, but if the ``-R,
--replace`` is used, new attachments replace the whole former one where it make sense. For
instance, ``-R`` doesn't change anything for ``noticed`` attachments, but it will replace
all reactions (potentially with no reaction at all), where the default behaviour is to
merge former and new reactions.

Note that only specified attachments are affected, if unknown or unspecified attachments
exist, they will stay unmodified.

For now, only ``noticed`` (to say that an element has been seen and taken into account)
and ``reactions`` (emojis to show emotion or other kind of reaction about something) are
managed.

``-N [BOOLEAN], --noticed [BOOLEAN]`` takes on optional argument to say if the item is
noticed or not. If the optional argument is not specified, if will be the same as if the
``true`` value was used.

examples
--------

Pierre wants to indicate to Louise that is has seen and he took into account her last blog post::

  $ li pubsub attachments set -s louise@example.org -n urn:xmpp:microblog:0 -i some-news-acf0 -N

Louise wants to react to Pierre blog post about night trains::

  $ li pubsub attachments set -s pierre@example.net -n urn:xmpp:microblog:0 -i nigh-train-are-great-f120 -r 🚆🌜💤