Mercurial > libervia-backend
annotate doc/libervia-cli/message.rst @ 4153:9162d3480b9e
plugin XEP-0280: minor parsing improvement.
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 22 Nov 2023 14:53:07 +0100 |
parents | d6837db456fd |
children | 073bb1d1a7f8 |
rev | line source |
---|---|
2946 | 1 .. highlight:: sh |
2 | |
3 ================================ | |
4 message: chat message management | |
5 ================================ | |
6 | |
7 Message commands let you send chat messages or manage your server message archives. | |
8 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3454
diff
changeset
|
9 .. _libervia-cli_message_send: |
3041
72583524cfd3
doc (jp): jp commands are now fully documented:
Goffi <goffi@goffi.org>
parents:
2946
diff
changeset
|
10 |
2946 | 11 send |
12 ==== | |
13 | |
3041
72583524cfd3
doc (jp): jp commands are now fully documented:
Goffi <goffi@goffi.org>
parents:
2946
diff
changeset
|
14 Send a message to a contact or a chat room. |
2946 | 15 ``stdin`` is used as message source. |
16 You can encrypt your message using ``--encrypt [ALGORITHM]`` argument, this will create an encrypted session and replace existing one if needed. | |
17 You can manage your encrypted session using ``encryption`` command. | |
18 | |
19 examples | |
20 -------- | |
21 | |
22 Send a message to a contact:: | |
23 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3454
diff
changeset
|
24 $ echo 'Salut à Toi!' | li message send louise@example.net |
2946 | 25 |
26 Send a message encrypted with OMEMO:: | |
27 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3454
diff
changeset
|
28 $ echo 'pssst, this message is encrypted' | li message send -e omemo louise@example.net |
2946 | 29 |
30 .. note:: | |
31 | |
32 Fingerprints of your destinee must have been accepted before using OMEMO, else message can't be encrypted | |
33 | |
34 Send a ``normal`` message marked as French with a subject:: | |
35 | |
3505 | 36 $ echo 'Bonjour, je vous écris avec « Libervia »' | li message send -l fr -t normal -S 'Ceci est un message de test' |
2946 | 37 |
3806
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
38 retract |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
39 ======= |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
40 |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
41 Retract a message, i.e. mark it as retracted in database, and send a retraction request to |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
42 original recipient. |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
43 |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
44 When a message is marked as retracted in database, it won't appear anymore or a hint |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
45 (commonly called *tombstone*) will be displayed instead (the behaviour depend of the |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
46 frontend that you're using). However, there is an option to archive retracted messages: |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
47 ``Privacy``/``retract_history``. This option is disabled by default, but if you set it |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
48 (e.g. with ``li param set``), the original message will be kept in metadata and may be |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
49 displayed if the frontend that you're using allows it. |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
50 |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
51 The ``message_id`` positional argument is the internal ID of the message (not an XMPP ID). |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
52 It may be displayed by some frontends. |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
53 |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
54 .. note:: |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
55 |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
56 It is not possible to be sure that a message will be retracted: once something is sent |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
57 through the network, any recipient can keep it, copy it, share it, etc. This is true for |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
58 Libervia/XMPP as for any software, decentralized or not. |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
59 |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
60 Retract send a retractation **request**, i.e. it asks to the recipient(s) client(s) to |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
61 hide or delete the message, but it's not possible to have a guarantee that nobody kept |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
62 a request. |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
63 |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
64 The message is also removed from database, except if the option |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
65 ``Privacy``/``retract_history`` is set (see above). |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
66 |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
67 example |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
68 ------- |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
69 |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
70 Retract message with ID ``1234-5678-9abc-def0``:: |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
71 |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
72 $ li message retract 1234-5678-9abc-def0 |
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
73 |
2946 | 74 mam |
75 === | |
76 | |
3041
72583524cfd3
doc (jp): jp commands are now fully documented:
Goffi <goffi@goffi.org>
parents:
2946
diff
changeset
|
77 Query archives using MAM. |
3806
adebd8036b68
doc (cli/message): `retract` command
Goffi <goffi@goffi.org>
parents:
3563
diff
changeset
|
78 |
2946 | 79 This command allows you to check message archive kept on the server (i.e. not the local copy). |
80 You usually want to specify a starting point, and a number of message to retrieve. If too many messages | |
81 are available, you'll have to use RSM commands to navigate through the results. | |
82 | |
83 examples | |
84 -------- | |
85 | |
86 Retrieve messages from last 2 days:: | |
87 | |
3488
c80a0f864b5d
doc: updated doc following global renaming
Goffi <goffi@goffi.org>
parents:
3454
diff
changeset
|
88 $ li message mam -S "2 days ago" |
2946 | 89 |
3563
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3505
diff
changeset
|
90 Retrieve messages from last 5 hours on Libervia official chat room:: |
2946 | 91 |
4077
d6837db456fd
refactoring: fix names in doc following modules hierarchy refactoring
Goffi <goffi@goffi.org>
parents:
3806
diff
changeset
|
92 $ li message mam -S "5 hours ago" -s libervia@chat.jabberfr.org |
2946 | 93 |
3563
267e4987b58b
doc: fix remaining SàT references/typos + add `libervia-cli` missing commands
Goffi <goffi@goffi.org>
parents:
3505
diff
changeset
|
94 Retrieve 2 first messages of 2019 on Libervia official chat room:: |
2946 | 95 |
4077
d6837db456fd
refactoring: fix names in doc following modules hierarchy refactoring
Goffi <goffi@goffi.org>
parents:
3806
diff
changeset
|
96 $ li message mam -S 2019-01-01 -s libervia@chat.jabberfr.org -m 2 |