diff --git a/src/main/java/chat/delta/rpc/Rpc.java b/src/main/java/chat/delta/rpc/Rpc.java index e36451085..4cccc26ce 100644 --- a/src/main/java/chat/delta/rpc/Rpc.java +++ b/src/main/java/chat/delta/rpc/Rpc.java @@ -211,11 +211,11 @@ public class Rpc { } /** - * Set configuration values from a QR code. (technically from the URI that is stored in the qrcode) - * Before this function is called, `checkQr()` should confirm the type of the - * QR code is `account` or `webrtcInstance`. + * Set configuration values from a QR code (technically from the URI stored in it). + * Before this function is called, `check_qr()` should be used to get the QR code type. *
- * Internally, the function will call dc_set_config() with the appropriate keys,
+ * "DCACCOUNT:" and "DCLOGIN:" QR codes configure the account, but I/O mustn't be started for
+ * such QR codes, consider using [`Self::add_transport_from_qr`] which also restarts I/O.
*/
public void setConfigFromQr(Integer accountId, String qrContent) throws RpcException {
transport.call("set_config_from_qr", mapper.valueToTree(accountId), mapper.valueToTree(qrContent));
@@ -234,6 +234,11 @@ public class Rpc {
return transport.callForResult(new TypeReference
* Messages are deleted from the device and the chat database entry is deleted.
- * After that, the event #DC_EVENT_MSGS_CHANGED is posted.
+ * After that, a `MsgsChanged` event is emitted.
+ * Messages are deleted from the server in background.
*
* Things that are _not done_ implicitly:
*
- * - Messages are **not deleted from the server**.
* - The chat or the contact is **not blocked**, so new messages from the user/the group may appear as a contact request
* and the user may create the chat again.
* - **Groups are not left** - this would
@@ -733,11 +738,26 @@ public class Rpc {
return transport.callForResult(new TypeReference
+ * _Noticed_ messages are no longer _fresh_ and do not count as being unseen
+ * but are still waiting for being marked as "seen" using markseen_msgs()
+ * (read receipts aren't sent for noticed messages).
+ *
+ * Calling this function usually results in the event #DC_EVENT_MSGS_NOTICED.
+ * See also markseen_msgs().
+ */
+ public void marknoticedAllChats(Integer accountId) throws RpcException {
+ transport.call("marknoticed_all_chats", mapper.valueToTree(accountId));
+ }
+
/**
* Mark all messages in a chat as _noticed_.
* _Noticed_ messages are no longer _fresh_ and do not count as being unseen
* but are still waiting for being marked as "seen" using markseen_msgs()
- * (IMAP/MDNs is not done for noticed messages).
+ * (read receipts aren't sent for noticed messages).
*
* Calling this function usually results in the event #DC_EVENT_MSGS_NOTICED.
* See also markseen_msgs().
@@ -893,6 +913,15 @@ public class Rpc {
return transport.callForResult(new TypeReference
+ * This view count is meant as a feedback measure for the channel owner only.
+ */
+ public Integer getMessageReadReceiptCount(Integer accountId, Integer messageId) throws RpcException {
+ return transport.callForResult(new TypeReference
* used when you only need the basic metadata of a chat like type, name, profile picture
*/
diff --git a/src/main/java/chat/delta/rpc/types/Contact.java b/src/main/java/chat/delta/rpc/types/Contact.java
index 667f12646..6d6f3e064 100644
--- a/src/main/java/chat/delta/rpc/types/Contact.java
+++ b/src/main/java/chat/delta/rpc/types/Contact.java
@@ -38,7 +38,7 @@ public class Contact {
*
* UI should display the information in the contact's profile as follows:
*
- * - If `verifierId` != 0, display text "Introduced by ..." with the name and address of the contact formatted by `name_and_addr`/`nameAndAddr`. Prefix the text by a green checkmark.
+ * - If `verifierId` != 0, display text "Introduced by ..." with the name of the contact. Prefix the text by a green checkmark.
*
* - If `verifierId` == 0 and `isVerified` != 0, display "Introduced" prefixed by a green checkmark.
*
diff --git a/src/main/java/chat/delta/rpc/types/EventType.java b/src/main/java/chat/delta/rpc/types/EventType.java
index 985bb45de..a77bae4a6 100644
--- a/src/main/java/chat/delta/rpc/types/EventType.java
+++ b/src/main/java/chat/delta/rpc/types/EventType.java
@@ -412,7 +412,9 @@ public abstract class EventType {
/**
* One or more transports has changed.
*
- * This event is used for tests to detect when transport synchronization messages arrives. UIs don't need to use it, it is unlikely that user modifies transports on multiple devices simultaneously.
+ * UI should update the list.
+ *
+ * This event is emitted when transport synchronization messages arrives, but not when the UI modifies the transport list by itself.
*/
public static class TransportsModified extends EventType {
}
diff --git a/src/main/java/chat/delta/rpc/types/FullChat.java b/src/main/java/chat/delta/rpc/types/FullChat.java
index a1b4f46a7..c8b424d6a 100644
--- a/src/main/java/chat/delta/rpc/types/FullChat.java
+++ b/src/main/java/chat/delta/rpc/types/FullChat.java
@@ -7,7 +7,6 @@ public class FullChat {
public ChatType chatType;
public String color;
public java.util.List