]> nmode's Git Repositories - signal-cli/commitdiff
Merge branch master into dbus_updateConfiguration
authorJohn Freed <okgithub@johnfreed.com>
Sat, 9 Oct 2021 12:08:08 +0000 (14:08 +0200)
committerJohn Freed <okgithub@johnfreed.com>
Sat, 9 Oct 2021 12:08:08 +0000 (14:08 +0200)
1  2 
man/signal-cli-dbus.5.adoc
src/main/java/org/asamk/Signal.java
src/main/java/org/asamk/signal/dbus/DbusManagerImpl.java
src/main/java/org/asamk/signal/dbus/DbusSignalImpl.java

index 56b28ddf1f75181affa5b1701028201bd580c82d,8168c421bf30b6b884abd22542bf138b6f7c0822..508a788113201f0cd196a6ae808191108579094f
@@@ -29,15 -29,18 +29,18 @@@ method(arg1<type>, arg2<type>, ...) -> 
  
  Where <type> is according to DBus specification:
  
- * <s>   : String
- * <ay>  : Byte Array
- * <aay> : Array of Byte Arrays
- * <as>  : String Array
- * <ax>  : Array of signed 64 bit integer
- * <b>   : Boolean (0|1)
- * <x>   : Signed 64 bit integer
 -* <a>   : Array of ... (comma-separated list)
++* <a>   : Array of ... (comma-separated list, array:)
+ * (...) : Struct (cannot be sent via `dbus-send`)
+ * <b>   : Boolean (false|true) (boolean:)
+ * <i>   : Signed 32-bit (int) integer (int32:)
+ * <o>   : DBusPath object (objpath:)
+ * <s>   : String (string:)
+ * <x>   : Signed 64-bit (long) integer (int64:)
+ * <y>   : Unsigned 8-bit (byte) integer (byte:)
  * <>    : no return value
  
+ The final parenthetical value (such as "boolean:") is the type indicator used by `dbus-send`.
  Exceptions are the names of the Java Exceptions returned in the body field. They typically contain an additional message with details. All Exceptions begin with "org.asamk.Signal.Error." which is omitted here for better readability.
  
  Phone numbers always have the format +<countrycode><regional number>
@@@ -361,30 -367,16 +367,36 @@@ uploadStickerPack(stickerPackPath<s>) -
  * stickerPackPath : Path to the manifest.json file or a zip file in the same directory
  * url             : URL of sticker pack after successful upload
  
 -Exception: Failure
 +Exception: Failure, IOError
 +
 +getConfiguration() -> [readReceipts<b>, unidentifiedDeliveryIndicators<b>, typingIndicators<b>, linkPreviews<b>] -> <>::
 +* readReceipts                   : Should Signal send read receipts (true/false).
 +* unidentifiedDeliveryIndicators : Should Signal show unidentified delivery indicators (true/false).
 +* typingIndicators               : Should Signal send/show typing indicators (true/false).
 +* linkPreviews                   : Should Signal generate link previews (true/false).
 +
 +Gets an array of four booleans as indicated. Only works from primary device.
 +
 +Exceptions: IOError, UserError
 +
 +setConfiguration(readReceipts<b>, unidentifiedDeliveryIndicators<b>, typingIndicators<b>, linkPreviews<b>) -> <>::
 +* readReceipts                   : Should Signal send read receipts (true/false).
 +* unidentifiedDeliveryIndicators : Should Signal show unidentified delivery indicators (true/false).
 +* typingIndicators               : Should Signal send/show typing indicators (true/false).
 +* linkPreviews                   : Should Signal generate link previews (true/false).
 +
 +Update Signal configurations and sync them to linked devices. Only works from primary device.
 +
 +Exceptions: IOError, UserError
  
- == Signals
+ submitRateLimitChallenge(challenge<s>, captcha<s>) -> <>::
+ * challenge : The challenge token taken from the proof required error.
+ * captcha   : The captcha token from the solved captcha on the Signal website..
+ Can be used to lift some rate-limits by solving a captcha.
  
+ Exception: IOErrorException
+ == Signals
  SyncMessageReceived (timestamp<x>, sender<s>, destination<s>, groupId<ay>,message<s>, attachments<as>)::
  The sync message is received when the user sends a message from a linked device.
  
index cf909fa0dce48fedf4d7a4db3b765a53aea3a6c7,2f81c196e714950dff561c48586c7e64578d925b..865db815c14a26745c4a2ff237028b4184c11eeb
@@@ -141,10 -145,8 +145,12 @@@ public interface Signal extends DBusInt
  
      String uploadStickerPack(String stickerPackPath) throws Error.Failure;
  
 +    void setConfiguration(boolean readReceipts, boolean unidentifiedDeliveryIndicators, boolean typingIndicators, boolean linkPreviews) throws Error.IOError, Error.UserError;
 +
 +    List<Boolean> getConfiguration();
 +
+     void submitRateLimitChallenge(String challenge, String captchaString) throws IOErrorException;
      class MessageReceived extends DBusSignal {
  
          private final long timestamp;