diff --git a/src/main/java/chat/delta/rpc/Rpc.java b/src/main/java/chat/delta/rpc/Rpc.java index ee42f8652..9584d8b3f 100644 --- a/src/main/java/chat/delta/rpc/Rpc.java +++ b/src/main/java/chat/delta/rpc/Rpc.java @@ -682,7 +682,8 @@ public class Rpc { * Set group name. *

* If the group is already _promoted_ (any message was sent to the group), - * all group members are informed by a special status message that is sent automatically by this function. + * or if this is a brodacast channel, + * all members are informed by a special status message that is sent automatically by this function. *

* Sends out #DC_EVENT_CHAT_MODIFIED and #DC_EVENT_MSGS_CHANGED if a status message was sent. */ @@ -690,11 +691,37 @@ public class Rpc { transport.call("set_chat_name", mapper.valueToTree(accountId), mapper.valueToTree(chatId), mapper.valueToTree(newName)); } + /** + * Set group or broadcast channel description. + *

+ * If the group is already _promoted_ (any message was sent to the group), + * or if this is a brodacast channel, + * all members are informed by a special status message that is sent automatically by this function. + *

+ * Sends out #DC_EVENT_CHAT_MODIFIED and #DC_EVENT_MSGS_CHANGED if a status message was sent. + *

+ * See also [`Self::get_chat_description`] / `getChatDescription()`. + */ + public void setChatDescription(Integer accountId, Integer chatId, String description) throws RpcException { + transport.call("set_chat_description", mapper.valueToTree(accountId), mapper.valueToTree(chatId), mapper.valueToTree(description)); + } + + /** + * Load the chat description from the database. + *

+ * UIs show this in the profile page of the chat, + * it is settable by [`Self::set_chat_description`] / `setChatDescription()`. + */ + public String getChatDescription(Integer accountId, Integer chatId) throws RpcException { + return transport.callForResult(new TypeReference(){}, "get_chat_description", mapper.valueToTree(accountId), mapper.valueToTree(chatId)); + } + /** * Set group profile image. *

* If the group is already _promoted_ (any message was sent to the group), - * all group members are informed by a special status message that is sent automatically by this function. + * or if this is a brodacast channel, + * all members are informed by a special status message that is sent automatically by this function. *

* Sends out #DC_EVENT_CHAT_MODIFIED and #DC_EVENT_MSGS_CHANGED if a status message was sent. *

diff --git a/src/main/java/chat/delta/rpc/types/SecurejoinSource.java b/src/main/java/chat/delta/rpc/types/SecurejoinSource.java index 2f47b9337..5f8b6beb2 100644 --- a/src/main/java/chat/delta/rpc/types/SecurejoinSource.java +++ b/src/main/java/chat/delta/rpc/types/SecurejoinSource.java @@ -19,4 +19,4 @@ public enum SecurejoinSource { /** The user scanned a QR code */ Scan, -} +} \ No newline at end of file diff --git a/src/main/java/chat/delta/rpc/types/SecurejoinUiPath.java b/src/main/java/chat/delta/rpc/types/SecurejoinUiPath.java index 157252a27..25bc5902c 100644 --- a/src/main/java/chat/delta/rpc/types/SecurejoinUiPath.java +++ b/src/main/java/chat/delta/rpc/types/SecurejoinUiPath.java @@ -10,4 +10,4 @@ public enum SecurejoinUiPath { /** The user first clicked on the `+` button in the main screen, and then on "New Contact" */ NewContact, -} +} \ No newline at end of file diff --git a/src/main/java/chat/delta/rpc/types/SystemMessageType.java b/src/main/java/chat/delta/rpc/types/SystemMessageType.java index b81ac9cbe..984f7a403 100644 --- a/src/main/java/chat/delta/rpc/types/SystemMessageType.java +++ b/src/main/java/chat/delta/rpc/types/SystemMessageType.java @@ -4,6 +4,7 @@ package chat.delta.rpc.types; public enum SystemMessageType { Unknown, GroupNameChanged, + GroupDescriptionChanged, GroupImageChanged, MemberAddedToGroup, MemberRemovedFromGroup,