diff --git a/src/main/java/chat/delta/rpc/Rpc.java b/src/main/java/chat/delta/rpc/Rpc.java index d5b825d5a..2275a0c8c 100644 --- a/src/main/java/chat/delta/rpc/Rpc.java +++ b/src/main/java/chat/delta/rpc/Rpc.java @@ -443,10 +443,19 @@ public class Rpc { } /** - * Estimate the number of messages that will be deleted - * by the set_config()-options `delete_device_after` or `delete_server_after`. + * Estimates the number of messages that will be deleted + * by the `set_config()`-option `delete_device_after`. + *
* This is typically used to show the estimated impact to the user * before actually enabling deletion of old messages. + *
+ * Messages in the "Saved Messages" chat are not counted as they will not be deleted automatically. + *
+ * Parameters: + * - `from_server`: Deprecated, pass `false` here + * - `seconds`: Count messages older than the given number of seconds. + *
+ * Returns the number of messages that are older than the given number of seconds.
*/
public Integer estimateAutoDeletionCount(Integer accountId, Boolean fromServer, Integer seconds) throws RpcException {
return transport.callForResult(new TypeReference
+ * The list is already sorted and starts with the oldest message.
+ * Clients should not try to re-sort the list as this would be an expensive action
+ * and would result in inconsistencies between clients.
+ * Note that the messages are not necessarily sorted by their ID or by their displayed timestamp;
+ * UIs need to handle both the case of descending message IDs
+ * and of decreasing timestamps.
+ *
+ * Optionally, 'daymarkers' added to the ID array may help to
+ * implement virtual lists.
+ *
+ * Parameters:
+ *
+ * * chat_id The chat ID of which the messages IDs should be queried.
+ * * _info_only: Deprecated, pass `false` here.
* * `add_daymarker` - If `true`, add day markers as `DC_MSG_ID_DAYMARKER` to the result,
* e.g. [1234, 1237, 9, 1239]. The day marker timestamp is the midnight one for the
* corresponding (following) day in the local timezone.
@@ -932,6 +955,14 @@ public class Rpc {
return transport.callForResult(new TypeReference
+ * Similar to `get_message_ids` / `getMessageIds`,
+ * see that function for details.
+ * The difference is that this function here returns a list of `MessageListItem`,
+ * which is an enum of a message or a daymarker.
+ */
public java.util.List
@@ -1328,10 +1354,47 @@ public class Rpc {
return transport.callForResult(new TypeReference
+ * Returns true if location streaming is currently
+ * enabled and locations should be updated.
+ *
+ * Location is represented as latitude and longitude in degrees
+ * and horizontal accuracy in meters.
+ */
+ public Boolean setLocation(Float latitude, Float longitude, Float accuracy) throws RpcException {
+ return transport.callForResult(new TypeReference
+ * Pass 0 as the number of seconds to disable location streaming in the chat.
+ */
+ public void sendLocationsToChat(Integer accountId, Integer chatId, Integer seconds) throws RpcException {
+ transport.call("send_locations_to_chat", mapper.valueToTree(accountId), mapper.valueToTree(chatId), mapper.valueToTree(seconds));
+ }
+
+ /** Returns whether any chat is sending locations. */
+ public Boolean isSendingLocations(Integer accountId) throws RpcException {
+ return transport.callForResult(new TypeReference
- * Reaction is a string of emojis separated by spaces. Reaction to a
- * single message can be sent multiple times. The last reaction
- * received overrides all previously received reactions. It is
- * possible to remove all reactions by sending an empty string.
+ * A reaction is a string that represents an emoji.
+ * You can call this function again to change the emoji;
+ * the last sent reaction overrides all previously sent reactions.
+ * It is possible to remove the reaction by sending an empty string.
*/
public Integer sendReaction(Integer accountId, Integer messageId, java.util.List
+ * Defaults to "INBOX" if not set. Should not be an empty string.
+ */
+ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET)
+ public String imapFolder;
/** Imap server port. */
@com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET)
public Integer imapPort;
diff --git a/src/main/java/chat/delta/rpc/types/Reactions.java b/src/main/java/chat/delta/rpc/types/Reactions.java
index 94ac17e72..7ff5f948e 100644
--- a/src/main/java/chat/delta/rpc/types/Reactions.java
+++ b/src/main/java/chat/delta/rpc/types/Reactions.java
@@ -5,6 +5,6 @@ package chat.delta.rpc.types;
public class Reactions {
/** Unique reactions and their count, sorted in descending order. */
public java.util.List
* If possible, the ui should display the image without borders in a transparent way. A click on a sticker will offer to install the sticker set in some future.
*/
diff --git a/src/main/java/chat/delta/rpc/types/WebxdcMessageInfo.java b/src/main/java/chat/delta/rpc/types/WebxdcMessageInfo.java
index 8cfc09468..3efcda8f6 100644
--- a/src/main/java/chat/delta/rpc/types/WebxdcMessageInfo.java
+++ b/src/main/java/chat/delta/rpc/types/WebxdcMessageInfo.java
@@ -15,6 +15,10 @@ public class WebxdcMessageInfo {
public String icon;
/** True if full internet access should be granted to the app. */
public Boolean internetAccess;
+ /** Define if the local user is the one who initially shared the webxdc application in the chat. */
+ public Boolean isAppSender;
+ /** Define if the app runs in a broadcasting context. */
+ public Boolean isBroadcast;
/**
* The name of the app.
*