X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/18ad9fbb4ec06b20be9043ae462997b266b8de1e..64af4914ee87067fdab16129535c530171b80766:/man/signal-cli-dbus.5.adoc diff --git a/man/signal-cli-dbus.5.adoc b/man/signal-cli-dbus.5.adoc index 55058580..75b4e8a1 100755 --- a/man/signal-cli-dbus.5.adoc +++ b/man/signal-cli-dbus.5.adoc @@ -51,14 +51,14 @@ Phone numbers always have the format + These methods are available if the daemon is started anonymously (without an explicit `-u USERNAME`). Requests are sent to `/org/asamk/Signal`; requests related to individual accounts are sent to `/org/asamk/Signal/_441234567890` where the + dialing code is replaced by an underscore (_). -Only `version()` is activated in single-user mode; the rest are disabled. +Only `version()` is activated in single-account mode; the rest are disabled. link() -> deviceLinkUri:: link(newDeviceName) -> deviceLinkUri:: * newDeviceName : Name to give new device (defaults to "cli" if no name is given) * deviceLinkUri : URI of newly linked device -Returns a URI of the form "sgnl://linkdevice/?uuid=...". This can be piped to a QR encoder to create a display that +Returns a URI of the form "sgnl://linkdevice?uuid=...". This can be piped to a QR encoder to create a display that can be captured by a Signal smartphone client. For example: `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` @@ -311,7 +311,7 @@ The following methods listen to the recipient's object path, which is constructe * DBusNumber : recipient's phone number, with underscore (_) replacing plus (+) addDevice(deviceUri) -> <>:: -* deviceUri : URI in the form of "sgnl://linkdevice/?uuid=..." (formerly "tsdevice:/?uuid=...") Normally displayed by a Signal desktop app, smartphone app, or another signal-cli instance using the `link` control method. +* deviceUri : URI in the form of "sgnl://linkdevice?uuid=..." (formerly "tsdevice:/?uuid=...") Normally displayed by a Signal desktop app, smartphone app, or another signal-cli instance using the `link` control method. getDevice(deviceId) -> devicePath:: * deviceId : Long representing a deviceId @@ -364,6 +364,26 @@ removeDevice() -> <>:: Exceptions: Failure +=== Configuration properties +The configuration's object path, which exists only for primary devices, is constructed as follows: +"/org/asamk/Signal/" + DBusNumber + "/Configuration" +* DBusNumber : recipient's phone number, with underscore (_) replacing plus (+) + +Configurations have the following (case-sensitive) properties: +* ReadReceipts : should send read receipts (true/false) +* UnidentifiedDeliveryIndicators : should show unidentified delivery indicators (true/false) +* TypingIndicators : should send/show typing indicators (true/false) +* LinkPreviews : should generate link previews (true/false) + +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.Configuration string:$PROPERTY_NAME` + +To set a property, use: +`dbus-send --session --dest=org.asamk.Signal --print-reply $OBJECT_PATH org.freedesktop.DBus.Properties.Set string:org.asamk.Signal.Configuration string:$PROPERTY_NAME variant:$PROPERTY_TYPE:$PROPERTY_VALUE` + +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.Configuration` + === Other methods getContactName(number) -> name:: @@ -462,6 +482,12 @@ sendReadReceipt(recipient, targetSentTimestamps) -> <>:: Exceptions: Failure, UntrustedIdentity +sendViewedReceipt(recipient, targetSentTimestamp) -> <>:: +* recipient : Phone number of a single recipient +* targetSentTimestamp : Array of Longs to identify the corresponding signal messages + +Exceptions: Failure, UntrustedIdentity + sendRemoteDeleteMessage(targetSentTimestamp, recipient) -> timestamp:: sendRemoteDeleteMessage(targetSentTimestamp, recipients) -> timestamp:: * targetSentTimestamp : Long representing timestamp of the message to delete