]> nmode's Git Repositories - signal-cli/blobdiff - man/signal-cli-dbus.5.adoc
Adapt code style
[signal-cli] / man / signal-cli-dbus.5.adoc
index a475eadc66c89b768f05c2a76a8cd77440b9c717..732efe43f803957c3bb639f43cced679c03ddf6d 100644 (file)
@@ -5,6 +5,7 @@ vim:set ts=4 sw=4 tw=82 noet:
 :quotes.~:
 
 = signal-cli-dbus (5)
+:doctype: manpage
 
 == Name
 
@@ -67,9 +68,10 @@ This can be piped to a QR encoder to create a display that can be captured by a
 
 For example:
 
-```
+[source,bash]
+----
 dbus-send --session --dest=org.asamk.Signal --type=method_call --print-reply /org/asamk/Signal org.asamk.Signal.link string:"My secondary client" | tr '\n' '\0' | sed 's/.*string //g' | sed 's/\"//g' | qrencode -s10 -tANSI256
-```
+----
 
 listAccounts() -> accountList<as>::
 * accountList : Array of all attached accounts in DBus object path form
@@ -119,7 +121,7 @@ The following methods listen to the account's object path, which is constructed
 
 getContactName(number<s>) -> name<s>::
 * number : Phone number
-* name : Contact's name in local storage (from the master device for a linked account, or the one set with setContactName); if not set, contact's profile name is used
+* name : Contact's name in local storage (from the primary device for a linked account, or the one set with setContactName); if not set, contact's profile name is used
 
 Exceptions: None
 
@@ -202,6 +204,15 @@ Depending on the type of the recipient(s) field this sends a reaction to one or
 
 Exceptions: Failure, InvalidNumber
 
+sendPaymentNotification(receipt<ay>, note<s>, recipient<s>) -> timestamp<x>::
+* receipt : Byte array with the payment receipt blob
+* note : String with a note for the payment
+* recipient : String with the phone number of a single recipient
+
+* timestamp : Long, can be used to identify the corresponding Signal reply
+
+Exceptions: Failure
+
 sendNoteToSelfMessage(message<s>, attachments<as>) -> timestamp<x>::
 * message : Text to send (can be UTF8)
 * attachments : String array of filenames to send as attachments (passed as filename, so need to be readable by the user signal-cli is running under)
@@ -406,6 +417,24 @@ Only works if sent from a secondary device.
 
 Exceptions: Failure
 
+==== Identity related methods
+
+listIdentities() -> identities<a(oss)>::
+* identities : Array of structs (objectPath, id, name)
+** objectPath : DBusPath representing the identity object path
+** uuid : Internal uuid of the identity
+** number : Phone number of the identity
+
+Lists all know identities
+
+getIdentity(Number<s>) -> identityPath<o>::
+* Number : Phone number
+* identityPath : DBusPath object for the identity
+
+Gets the identity Dbus path for a given phone number
+
+Exceptions: Failure
+
 === Signal.Group interface
 
 The following methods listen to the group's object path, which can be obtained from the listGroups() method and is constructed as follows:
@@ -453,6 +482,7 @@ addMembers(recipients<as>) -> <>::
 * recipients : String array of phone numbers
 
 Add recipients to group if they are pending members; otherwise add recipients to list of requesting members.
+This command is also used to accept group invitations by adding yourself to a group.
 
 Exceptions: Failure
 
@@ -520,6 +550,44 @@ removeDevice() -> <>::
 
 Exceptions: Failure
 
+=== Signal.Identity interface
+
+The following methods listen to the Identities object path, which is constructed as follows:
+
+<ACCOUNT_PATH> + "/Identities/" + identity
+
+identity : Either the phone number of a contact with underscore (_) replacing plus (+) , or if not known its uuid
+
+Identities have the following (case-sensitive) properties:
+
+* Number<s> (read-only) : Phone number of the contact
+* Uuid<x> (read-only) : Internal uuid representing the contact
+* Fingerprint<x> (read-only) : Byte array representing the fingerprint
+* SafetyNumber<s> (read-only) : String representation of the safety number used to verify trust
+* TrustLevel<s> (read-only) : Current trust level (UNSTRUSTED, TRUSTED_UNVERIFIED, TRUSTED_VERIFIED)
+* AddedDate<x> (read-only) : Long representing the number of milliseconds since the Unix epoch
+* ScannableSafetyNumber<x> (read-only) : Byte array representation of the safety number
+
+To get a property, use (replacing `--session` with `--system` if needed):
+`dbus-send --session --dest=org.asamk.Signal --print-reply $OBJECT_PATH org.freedesktop.DBus.Properties.Get string:org.asamk.Signal.Identity string:$PROPERTY_NAME`
+
+To get all properties, use:
+`dbus-send --session --dest=org.asamk.Signal --print-reply $OBJECT_PATH org.freedesktop.DBus.Properties.GetAll string:org.asamk.Signal.Identity`
+
+trust() -> <>::
+
+Establish trust with the given identity.
+TrustLevel will become TRUSTED_UNVERFIED
+
+Exceptions: Failure
+
+trustVerified(SafetyNumber<s>) -> <>::
+
+Establish trust with the given identity using their safety number.
+TrustLevel will become TRUSTED_VERIFIED
+
+Exceptions: Failure
+
 === Signal.Configuration interface
 
 The configuration's object path, which exists only for primary devices, is constructed as follows: