diff --git a/CHANGELOG.md b/CHANGELOG.md index 0dc9c9b15..55ff18e22 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # Delta Chat Android Changelog -## v2.33.0 +## Unreleased + +* Allow to add relay from clipboard or image if camera permission is not granted + +## v2.33.1 2025-12 * Target Android 16 diff --git a/build.gradle b/build.gradle index 68e9571c7..b025e3f0e 100644 --- a/build.gradle +++ b/build.gradle @@ -27,8 +27,8 @@ android { useLibrary 'org.apache.http.legacy' defaultConfig { - versionCode 737 - versionName "2.33.0" + versionCode 738 + versionName "2.33.1" applicationId "com.b44t.messenger" multiDexEnabled true diff --git a/src/main/assets/help/en/help.html b/src/main/assets/help/en/help.html index 7fc5a298d..fe024d151 100644 --- a/src/main/assets/help/en/help.html +++ b/src/main/assets/help/en/help.html @@ -55,10 +55,10 @@
  • Advanced
  • @@ -1009,34 +1009,6 @@ you can try out features we are working on.

    You can find more information and give feedback in the Forum.

    -

    - - - What is “Send statistics to Delta Chat’s developers”? - - -

    - -

    We would like to improve Delta Chat with your help, -which is why Delta Chat for Android asks whether you want -to send anonymous usage statistics.

    - -

    You can turn it on and off at -Settings → Advanced → Send statistics to Delta Chat’s developers.

    - -

    When you turn it on, -weekly statistics will be automatically sent to a bot.

    - -

    We are interested e.g. in statistics like:

    - - - -

    We will not collect any personally identifiable information about you.

    -

    @@ -1102,6 +1074,40 @@ except if your users’ devices require Google/Apple core Rust developments that power chatmail clients of which Delta Chat is the most well known.

    +

    + + + What is “Send statistics to Delta Chat’s developers”? + + +

    + +

    We would like to improve Delta Chat with your help, +which is why Delta Chat for Android asks whether you want +to send anonymous usage statistics.

    + +

    You can turn it on and off at +Settings → Advanced → Send statistics to Delta Chat’s developers.

    + +

    When you turn it on, +weekly statistics will be automatically sent to a bot.

    + +

    We are interested e.g. in statistics like:

    + + + +

    We will not collect any personally identifiable information about you.

    +

    diff --git a/src/main/java/chat/delta/rpc/BaseTransport.java b/src/main/java/chat/delta/rpc/BaseTransport.java index 971bb130f..d0f98e799 100644 --- a/src/main/java/chat/delta/rpc/BaseTransport.java +++ b/src/main/java/chat/delta/rpc/BaseTransport.java @@ -94,7 +94,7 @@ public abstract class BaseTransport implements Rpc.Transport { } if (response.error != null) { - future.setException(new RpcException(response.error.toString())); + future.setException(new RpcException(response.error.message)); } else if (response.result != null) { future.set(response.result); } else { @@ -115,10 +115,15 @@ public abstract class BaseTransport implements Rpc.Transport { } } + private static class RpcError { + public int code; + public String message; + } + private static class Response { public String jsonrpc; public int id; public JsonNode result; - public JsonNode error; + public RpcError error; } } \ No newline at end of file diff --git a/src/main/java/chat/delta/rpc/Rpc.java b/src/main/java/chat/delta/rpc/Rpc.java index fa951a696..8a05b6daa 100644 --- a/src/main/java/chat/delta/rpc/Rpc.java +++ b/src/main/java/chat/delta/rpc/Rpc.java @@ -23,17 +23,17 @@ public class Rpc { this.mapper = transport.getObjectMapper(); } - /* Test function. */ + /** Test function. */ public void sleep(Float delay) throws RpcException { transport.call("sleep", mapper.valueToTree(delay)); } - /* Checks if an email address is valid. */ + /** Checks if an email address is valid. */ public Boolean checkEmailValidity(String email) throws RpcException { return transport.callForResult(new TypeReference(){}, "check_email_validity", mapper.valueToTree(email)); } - /* Returns general system info. */ + /** Returns general system info. */ public java.util.Map getSystemInfo() throws RpcException { return transport.callForResult(new TypeReference>(){}, "get_system_info"); } @@ -73,12 +73,12 @@ public class Rpc { return transport.callForResult(new TypeReference>(){}, "get_all_account_ids"); } - /* Select account in account manager, this saves the last used account to accounts.toml */ + /** Select account in account manager, this saves the last used account to accounts.toml */ public void selectAccount(Integer id) throws RpcException { transport.call("select_account", mapper.valueToTree(id)); } - /* Get the selected account from the account manager (on startup it is read from accounts.toml) */ + /** Get the selected account from the account manager (on startup it is read from accounts.toml) */ public Integer getSelectedAccountId() throws RpcException { return transport.callForResult(new TypeReference(){}, "get_selected_account_id"); } @@ -93,17 +93,17 @@ public class Rpc { transport.call("set_accounts_order", mapper.valueToTree(order)); } - /* Get a list of all configured accounts. */ + /** Get a list of all configured accounts. */ public java.util.List getAllAccounts() throws RpcException { return transport.callForResult(new TypeReference>(){}, "get_all_accounts"); } - /* Starts background tasks for all accounts. */ + /** Starts background tasks for all accounts. */ public void startIoForAllAccounts() throws RpcException { transport.call("start_io_for_all_accounts"); } - /* Stops background tasks for all accounts. */ + /** Stops background tasks for all accounts. */ public void stopIoForAllAccounts() throws RpcException { transport.call("stop_io_for_all_accounts"); } @@ -123,27 +123,27 @@ public class Rpc { transport.call("stop_background_fetch"); } - /* Starts background tasks for a single account. */ + /** Starts background tasks for a single account. */ public void startIo(Integer accountId) throws RpcException { transport.call("start_io", mapper.valueToTree(accountId)); } - /* Stops background tasks for a single account. */ + /** Stops background tasks for a single account. */ public void stopIo(Integer accountId) throws RpcException { transport.call("stop_io", mapper.valueToTree(accountId)); } - /* Get top-level info for an account. */ + /** Get top-level info for an account. */ public Account getAccountInfo(Integer accountId) throws RpcException { return transport.callForResult(new TypeReference(){}, "get_account_info", mapper.valueToTree(accountId)); } - /* Get the current push notification state. */ + /** Get the current push notification state. */ public NotifyState getPushState(Integer accountId) throws RpcException { return transport.callForResult(new TypeReference(){}, "get_push_state", mapper.valueToTree(accountId)); } - /* Get the combined filesize of an account in bytes */ + /** Get the combined filesize of an account in bytes */ public Integer getAccountFileSize(Integer accountId) throws RpcException { return transport.callForResult(new TypeReference(){}, "get_account_file_size", mapper.valueToTree(accountId)); } @@ -160,22 +160,22 @@ public class Rpc { return transport.callForResult(new TypeReference(){}, "get_provider_info", mapper.valueToTree(accountId), mapper.valueToTree(email)); } - /* Checks if the context is already configured. */ + /** Checks if the context is already configured. */ public Boolean isConfigured(Integer accountId) throws RpcException { return transport.callForResult(new TypeReference(){}, "is_configured", mapper.valueToTree(accountId)); } - /* Get system info for an account. */ + /** Get system info for an account. */ public java.util.Map getInfo(Integer accountId) throws RpcException { return transport.callForResult(new TypeReference>(){}, "get_info", mapper.valueToTree(accountId)); } - /* Get storage usage report as formatted string */ + /** Get storage usage report as formatted string */ public String getStorageUsageReportString(Integer accountId) throws RpcException { return transport.callForResult(new TypeReference(){}, "get_storage_usage_report_string", mapper.valueToTree(accountId)); } - /* Get the blob dir. */ + /** Get the blob dir. */ public String getBlobDir(Integer accountId) throws RpcException { return transport.callForResult(new TypeReference(){}, "get_blob_dir", mapper.valueToTree(accountId)); } @@ -195,17 +195,17 @@ public class Rpc { return transport.callForResult(new TypeReference(){}, "get_migration_error", mapper.valueToTree(accountId)); } - /* Copy file to blob dir. */ + /** Copy file to blob dir. */ public String copyToBlobDir(Integer accountId, String path) throws RpcException { return transport.callForResult(new TypeReference(){}, "copy_to_blob_dir", mapper.valueToTree(accountId), mapper.valueToTree(path)); } - /* Sets the given configuration key. */ + /** Sets the given configuration key. */ public void setConfig(Integer accountId, String key, String value) throws RpcException { transport.call("set_config", mapper.valueToTree(accountId), mapper.valueToTree(key), mapper.valueToTree(value)); } - /* Updates a batch of configuration values. */ + /** Updates a batch of configuration values. */ public void batchSetConfig(Integer accountId, java.util.Map config) throws RpcException { transport.call("batch_set_config", mapper.valueToTree(accountId), mapper.valueToTree(config)); } @@ -225,7 +225,7 @@ public class Rpc { return transport.callForResult(new TypeReference(){}, "check_qr", mapper.valueToTree(accountId), mapper.valueToTree(qrContent)); } - /* Returns configuration value for the given key. */ + /** Returns configuration value for the given key. */ public String getConfig(Integer accountId, String key) throws RpcException { return transport.callForResult(new TypeReference(){}, "get_config", mapper.valueToTree(accountId), mapper.valueToTree(key)); } @@ -284,7 +284,7 @@ public class Rpc { transport.call("add_or_update_transport", mapper.valueToTree(accountId), mapper.valueToTree(param)); } - /* Deprecated 2025-04. Alias for [Self::add_or_update_transport()]. */ + /** Deprecated 2025-04. Alias for [Self::add_or_update_transport()]. */ public void addTransport(Integer accountId, EnteredLoginParam param) throws RpcException { transport.call("add_transport", mapper.valueToTree(accountId), mapper.valueToTree(param)); } @@ -315,7 +315,7 @@ public class Rpc { transport.call("delete_transport", mapper.valueToTree(accountId), mapper.valueToTree(addr)); } - /* Signal an ongoing process to stop. */ + /** Signal an ongoing process to stop. */ public void stopOngoingProcess(Integer accountId) throws RpcException { transport.call("stop_ongoing_process", mapper.valueToTree(accountId)); } @@ -608,7 +608,7 @@ public class Rpc { return transport.callForResult(new TypeReference>(){}, "get_chat_contacts", mapper.valueToTree(accountId), mapper.valueToTree(chatId)); } - /* Returns contact IDs of the past chat members. */ + /** Returns contact IDs of the past chat members. */ public java.util.List getPastChatContacts(Integer accountId, Integer chatId) throws RpcException { return transport.callForResult(new TypeReference>(){}, "get_past_chat_contacts", mapper.valueToTree(accountId), mapper.valueToTree(chatId)); } @@ -647,7 +647,7 @@ public class Rpc { return transport.callForResult(new TypeReference(){}, "create_group_chat_unencrypted", mapper.valueToTree(accountId), mapper.valueToTree(name)); } - /* Deprecated 2025-07 in favor of create_broadcast(). */ + /** Deprecated 2025-07 in favor of create_broadcast(). */ public Integer createBroadcastList(Integer accountId) throws RpcException { return transport.callForResult(new TypeReference(){}, "create_broadcast_list", mapper.valueToTree(accountId)); } @@ -856,7 +856,7 @@ public class Rpc { return transport.callForResult(new TypeReference>(){}, "get_messages", mapper.valueToTree(accountId), mapper.valueToTree(messageIds)); } - /* Fetch info desktop needs for creating a notification for a message */ + /** Fetch info desktop needs for creating a notification for a message */ public MessageNotificationInfo getMessageNotificationInfo(Integer accountId, Integer messageId) throws RpcException { return transport.callForResult(new TypeReference(){}, "get_message_notification_info", mapper.valueToTree(accountId), mapper.valueToTree(messageId)); } @@ -888,12 +888,12 @@ public class Rpc { return transport.callForResult(new TypeReference(){}, "get_message_info", mapper.valueToTree(accountId), mapper.valueToTree(messageId)); } - /* Returns additional information for single message. */ + /** Returns additional information for single message. */ public MessageInfo getMessageInfoObject(Integer accountId, Integer messageId) throws RpcException { return transport.callForResult(new TypeReference(){}, "get_message_info_object", mapper.valueToTree(accountId), mapper.valueToTree(messageId)); } - /* Returns contacts that sent read receipts and the time of reading. */ + /** Returns contacts that sent read receipts and the time of reading. */ public java.util.List getMessageReadReceipts(Integer accountId, Integer messageId) throws RpcException { return transport.callForResult(new TypeReference>(){}, "get_message_read_receipts", mapper.valueToTree(accountId), mapper.valueToTree(messageId)); } @@ -941,7 +941,7 @@ public class Rpc { transport.call("save_msgs", mapper.valueToTree(accountId), mapper.valueToTree(messageIds)); } - /* Get a single contact options by ID. */ + /** Get a single contact options by ID. */ public Contact getContact(Integer accountId, Integer contactId) throws RpcException { return transport.callForResult(new TypeReference(){}, "get_contact", mapper.valueToTree(accountId), mapper.valueToTree(contactId)); } @@ -962,7 +962,7 @@ public class Rpc { return transport.callForResult(new TypeReference(){}, "create_contact", mapper.valueToTree(accountId), mapper.valueToTree(email), mapper.valueToTree(name)); } - /* Returns contact id of the created or existing DM chat with that contact */ + /** Returns contact id of the created or existing DM chat with that contact */ public Integer createChatByContactId(Integer accountId, Integer contactId) throws RpcException { return transport.callForResult(new TypeReference(){}, "create_chat_by_contact_id", mapper.valueToTree(accountId), mapper.valueToTree(contactId)); } @@ -1011,7 +1011,7 @@ public class Rpc { transport.call("delete_contact", mapper.valueToTree(accountId), mapper.valueToTree(contactId)); } - /* Sets display name for existing contact. */ + /** Sets display name for existing contact. */ public void changeContactName(Integer accountId, Integer contactId, String name) throws RpcException { transport.call("change_contact_name", mapper.valueToTree(accountId), mapper.valueToTree(contactId), mapper.valueToTree(name)); } @@ -1046,7 +1046,7 @@ public class Rpc { return transport.callForResult(new TypeReference(){}, "lookup_contact_id_by_addr", mapper.valueToTree(accountId), mapper.valueToTree(addr)); } - /* Parses a vCard file located at the given path. Returns contacts in their original order. */ + /** Parses a vCard file located at the given path. Returns contacts in their original order. */ public java.util.List parseVcard(String path) throws RpcException { return transport.callForResult(new TypeReference>(){}, "parse_vcard", mapper.valueToTree(path)); } @@ -1069,12 +1069,12 @@ public class Rpc { return transport.callForResult(new TypeReference>(){}, "import_vcard_contents", mapper.valueToTree(accountId), mapper.valueToTree(vcard)); } - /* Returns a vCard containing contacts with the given ids. */ + /** Returns a vCard containing contacts with the given ids. */ public String makeVcard(Integer accountId, java.util.List contacts) throws RpcException { return transport.callForResult(new TypeReference(){}, "make_vcard", mapper.valueToTree(accountId), mapper.valueToTree(contacts)); } - /* Sets vCard containing the given contacts to the message draft. */ + /** Sets vCard containing the given contacts to the message draft. */ public void setDraftVcard(Integer accountId, Integer msgId, java.util.List contacts) throws RpcException { transport.call("set_draft_vcard", mapper.valueToTree(accountId), mapper.valueToTree(msgId), mapper.valueToTree(contacts)); } @@ -1245,7 +1245,7 @@ public class Rpc { return transport.callForResult(new TypeReference(){}, "get_webxdc_status_updates", mapper.valueToTree(accountId), mapper.valueToTree(instanceMsgId), mapper.valueToTree(lastKnownSerial)); } - /* Get info from a webxdc message */ + /** Get info from a webxdc message */ public WebxdcMessageInfo getWebxdcInfo(Integer accountId, Integer instanceMsgId) throws RpcException { return transport.callForResult(new TypeReference(){}, "get_webxdc_info", mapper.valueToTree(accountId), mapper.valueToTree(instanceMsgId)); } @@ -1285,27 +1285,27 @@ public class Rpc { return transport.callForResult(new TypeReference(){}, "init_webxdc_integration", mapper.valueToTree(accountId), mapper.valueToTree(chatId)); } - /* Starts an outgoing call. */ + /** Starts an outgoing call. */ public Integer placeOutgoingCall(Integer accountId, Integer chatId, String placeCallInfo) throws RpcException { return transport.callForResult(new TypeReference(){}, "place_outgoing_call", mapper.valueToTree(accountId), mapper.valueToTree(chatId), mapper.valueToTree(placeCallInfo)); } - /* Accepts an incoming call. */ + /** Accepts an incoming call. */ public void acceptIncomingCall(Integer accountId, Integer msgId, String acceptCallInfo) throws RpcException { transport.call("accept_incoming_call", mapper.valueToTree(accountId), mapper.valueToTree(msgId), mapper.valueToTree(acceptCallInfo)); } - /* Ends incoming or outgoing call. */ + /** Ends incoming or outgoing call. */ public void endCall(Integer accountId, Integer msgId) throws RpcException { transport.call("end_call", mapper.valueToTree(accountId), mapper.valueToTree(msgId)); } - /* Returns information about the call. */ + /** Returns information about the call. */ public CallInfo callInfo(Integer accountId, Integer msgId) throws RpcException { return transport.callForResult(new TypeReference(){}, "call_info", mapper.valueToTree(accountId), mapper.valueToTree(msgId)); } - /* Returns JSON with ICE servers, to be used for WebRTC video calls. */ + /** Returns JSON with ICE servers, to be used for WebRTC video calls. */ public String iceServers(Integer accountId) throws RpcException { return transport.callForResult(new TypeReference(){}, "ice_servers", mapper.valueToTree(accountId)); } @@ -1361,7 +1361,7 @@ public class Rpc { return transport.callForResult(new TypeReference(){}, "send_reaction", mapper.valueToTree(accountId), mapper.valueToTree(messageId), mapper.valueToTree(reaction)); } - /* Returns reactions to the message. */ + /** Returns reactions to the message. */ public Reactions getMessageReactions(Integer accountId, Integer messageId) throws RpcException { return transport.callForResult(new TypeReference(){}, "get_message_reactions", mapper.valueToTree(accountId), mapper.valueToTree(messageId)); } @@ -1374,7 +1374,7 @@ public class Rpc { transport.call("send_edit_request", mapper.valueToTree(accountId), mapper.valueToTree(msgId), mapper.valueToTree(newText)); } - /* Checks if messages can be sent to a given chat. */ + /** Checks if messages can be sent to a given chat. */ public Boolean canSend(Integer accountId, Integer chatId) throws RpcException { return transport.callForResult(new TypeReference(){}, "can_send", mapper.valueToTree(accountId), mapper.valueToTree(chatId)); } @@ -1392,7 +1392,7 @@ public class Rpc { transport.call("remove_draft", mapper.valueToTree(accountId), mapper.valueToTree(chatId)); } - /* Get draft for a chat, if any. */ + /** Get draft for a chat, if any. */ public Message getDraft(Integer accountId, Integer chatId) throws RpcException { return transport.callForResult(new TypeReference(){}, "get_draft", mapper.valueToTree(accountId), mapper.valueToTree(chatId)); } @@ -1401,7 +1401,7 @@ public class Rpc { return transport.callForResult(new TypeReference(){}, "misc_get_sticker_folder", mapper.valueToTree(accountId)); } - /* Saves a sticker to a collection/folder in the account's sticker folder. */ + /** Saves a sticker to a collection/folder in the account's sticker folder. */ public void miscSaveSticker(Integer accountId, Integer msgId, String collection) throws RpcException { transport.call("misc_save_sticker", mapper.valueToTree(accountId), mapper.valueToTree(msgId), mapper.valueToTree(collection)); } @@ -1414,7 +1414,7 @@ public class Rpc { return transport.callForResult(new TypeReference>>(){}, "misc_get_stickers", mapper.valueToTree(accountId)); } - /* Returns the messageid of the sent message */ + /** Returns the messageid of the sent message */ public Integer miscSendTextMessage(Integer accountId, Integer chatId, String text) throws RpcException { return transport.callForResult(new TypeReference(){}, "misc_send_text_message", mapper.valueToTree(accountId), mapper.valueToTree(chatId), mapper.valueToTree(text)); } diff --git a/src/main/java/chat/delta/rpc/types/Account.java b/src/main/java/chat/delta/rpc/types/Account.java index ab3a9778f..946ade719 100644 --- a/src/main/java/chat/delta/rpc/types/Account.java +++ b/src/main/java/chat/delta/rpc/types/Account.java @@ -18,7 +18,7 @@ public abstract class Account { @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String displayName; public Integer id; - /* Optional tag as "Work", "Family". Meant to help profile owner to differ between profiles with similar names. */ + /** Optional tag as "Work", "Family". Meant to help profile owner to differ between profiles with similar names. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String privateTag; @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) diff --git a/src/main/java/chat/delta/rpc/types/CallInfo.java b/src/main/java/chat/delta/rpc/types/CallInfo.java index dd177c186..124a75dfb 100644 --- a/src/main/java/chat/delta/rpc/types/CallInfo.java +++ b/src/main/java/chat/delta/rpc/types/CallInfo.java @@ -2,7 +2,7 @@ package chat.delta.rpc.types; public class CallInfo { - /* True if SDP offer has a video. */ + /** True if SDP offer has a video. */ public Boolean hasVideo; /** * SDP offer. diff --git a/src/main/java/chat/delta/rpc/types/CallState.java b/src/main/java/chat/delta/rpc/types/CallState.java index b18577053..044b09872 100644 --- a/src/main/java/chat/delta/rpc/types/CallState.java +++ b/src/main/java/chat/delta/rpc/types/CallState.java @@ -19,21 +19,21 @@ public abstract class CallState { public static class Alerting extends CallState { } -/* Active call. */ +/** Active call. */ public static class Active extends CallState { } -/* Completed call that was once active and then was terminated for any reason. */ +/** Completed call that was once active and then was terminated for any reason. */ public static class Completed extends CallState { - /* Call duration in seconds. */ + /** Call duration in seconds. */ public Integer duration; } -/* Incoming call that was not picked up within a timeout or was explicitly ended by the caller before we picked up. */ +/** Incoming call that was not picked up within a timeout or was explicitly ended by the caller before we picked up. */ public static class Missed extends CallState { } -/* Incoming call that was explicitly ended on our side before picking up or outgoing call that was declined before the timeout. */ +/** Incoming call that was explicitly ended on our side before picking up or outgoing call that was declined before the timeout. */ public static class Declined extends CallState { } diff --git a/src/main/java/chat/delta/rpc/types/ChatListItemFetchResult.java b/src/main/java/chat/delta/rpc/types/ChatListItemFetchResult.java index 687aa35be..81a9fa53c 100644 --- a/src/main/java/chat/delta/rpc/types/ChatListItemFetchResult.java +++ b/src/main/java/chat/delta/rpc/types/ChatListItemFetchResult.java @@ -16,7 +16,7 @@ public abstract class ChatListItemFetchResult { public String avatarPath; public ChatType chatType; public String color; - /* contact id if this is a dm chat (for view profile entry in context menu) */ + /** contact id if this is a dm chat (for view profile entry in context menu) */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public Integer dmChatContact; public Integer freshMessageCounter; @@ -36,7 +36,7 @@ public abstract class ChatListItemFetchResult { * See also `is_key_contact` on `Contact`. */ public Boolean isEncrypted; - /* deprecated 2025-07, use chat_type instead */ + /** deprecated 2025-07, use chat_type instead */ public Boolean isGroup; public Boolean isMuted; public Boolean isPinned; @@ -50,7 +50,7 @@ public abstract class ChatListItemFetchResult { @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public Integer lastUpdated; public String name; - /* showing preview if last chat message is image */ + /** showing preview if last chat message is image */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String summaryPreviewImage; public Integer summaryStatus; diff --git a/src/main/java/chat/delta/rpc/types/Contact.java b/src/main/java/chat/delta/rpc/types/Contact.java index 91ed6d273..667f12646 100644 --- a/src/main/java/chat/delta/rpc/types/Contact.java +++ b/src/main/java/chat/delta/rpc/types/Contact.java @@ -14,9 +14,9 @@ public class Contact { public Boolean e2eeAvail; public Integer id; public Boolean isBlocked; - /* If the contact is a bot. */ + /** If the contact is a bot. */ public Boolean isBot; - /* Is the contact a key contact. */ + /** Is the contact a key contact. */ public Boolean isKeyContact; /** * True if the contact can be added to protected chats because SELF and contact have verified their fingerprints in both directions. @@ -24,7 +24,7 @@ public class Contact { * See [`Self::verifier_id`]/`Contact.verifierId` for a guidance how to display these information. */ public Boolean isVerified; - /* the contact's last seen timestamp */ + /** the contact's last seen timestamp */ public Integer lastSeen; public String name; public String nameAndAddr; diff --git a/src/main/java/chat/delta/rpc/types/EnteredCertificateChecks.java b/src/main/java/chat/delta/rpc/types/EnteredCertificateChecks.java index 77c8f9f85..f1df05da0 100644 --- a/src/main/java/chat/delta/rpc/types/EnteredCertificateChecks.java +++ b/src/main/java/chat/delta/rpc/types/EnteredCertificateChecks.java @@ -2,12 +2,12 @@ package chat.delta.rpc.types; public enum EnteredCertificateChecks { - /* `Automatic` means that provider database setting should be taken. If there is no provider database setting for certificate checks, check certificates strictly. */ + /** `Automatic` means that provider database setting should be taken. If there is no provider database setting for certificate checks, check certificates strictly. */ automatic, - /* Ensure that TLS certificate is valid for the server hostname. */ + /** Ensure that TLS certificate is valid for the server hostname. */ strict, - /* Accept certificates that are expired, self-signed or otherwise not valid for the server hostname. */ + /** Accept certificates that are expired, self-signed or otherwise not valid for the server hostname. */ acceptInvalidCertificates, } \ No newline at end of file diff --git a/src/main/java/chat/delta/rpc/types/EnteredLoginParam.java b/src/main/java/chat/delta/rpc/types/EnteredLoginParam.java index 87c1c9427..36f516422 100644 --- a/src/main/java/chat/delta/rpc/types/EnteredLoginParam.java +++ b/src/main/java/chat/delta/rpc/types/EnteredLoginParam.java @@ -7,27 +7,27 @@ package chat.delta.rpc.types; * Usually it will be enough to only set `addr` and `password`, and all the other settings will be autoconfigured. */ public class EnteredLoginParam { - /* Email address. */ + /** Email address. */ public String addr; - /* TLS options: whether to allow invalid certificates and/or invalid hostnames. Default: Automatic */ + /** TLS options: whether to allow invalid certificates and/or invalid hostnames. Default: Automatic */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public EnteredCertificateChecks certificateChecks; - /* Imap server port. */ + /** Imap server port. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public Integer imapPort; - /* Imap socket security. */ + /** Imap socket security. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public Socket imapSecurity; - /* Imap server hostname or IP address. */ + /** Imap server hostname or IP address. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String imapServer; - /* Imap username. */ + /** Imap username. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String imapUser; - /* If true, login via OAUTH2 (not recommended anymore). Default: false */ + /** If true, login via OAUTH2 (not recommended anymore). Default: false */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public Boolean oauth2; - /* Password. */ + /** Password. */ public String password; /** * SMTP Password. @@ -36,16 +36,16 @@ public class EnteredLoginParam { */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String smtpPassword; - /* SMTP server port. */ + /** SMTP server port. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public Integer smtpPort; - /* SMTP socket security. */ + /** SMTP socket security. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public Socket smtpSecurity; - /* SMTP server hostname or IP address. */ + /** SMTP server hostname or IP address. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String smtpServer; - /* SMTP username. */ + /** SMTP username. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String smtpUser; } \ No newline at end of file diff --git a/src/main/java/chat/delta/rpc/types/EphemeralTimer.java b/src/main/java/chat/delta/rpc/types/EphemeralTimer.java index fb4e34f72..7c189baa3 100644 --- a/src/main/java/chat/delta/rpc/types/EphemeralTimer.java +++ b/src/main/java/chat/delta/rpc/types/EphemeralTimer.java @@ -11,11 +11,11 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo.As; @JsonSubTypes({@Type(value = EphemeralTimer.Disabled.class, name="Disabled"), @Type(value = EphemeralTimer.Enabled.class, name="Enabled")}) public abstract class EphemeralTimer { -/* Timer is disabled. */ +/** Timer is disabled. */ public static class Disabled extends EphemeralTimer { } -/* Timer is enabled. */ +/** Timer is enabled. */ public static class Enabled extends EphemeralTimer { /** * Timer duration in seconds. diff --git a/src/main/java/chat/delta/rpc/types/Event.java b/src/main/java/chat/delta/rpc/types/Event.java index 0d23609d7..64424f247 100644 --- a/src/main/java/chat/delta/rpc/types/Event.java +++ b/src/main/java/chat/delta/rpc/types/Event.java @@ -2,8 +2,8 @@ package chat.delta.rpc.types; public class Event { - /* Account ID. */ + /** Account ID. */ public Integer contextId; - /* Event payload. */ + /** Event payload. */ public EventType event; } \ No newline at end of file diff --git a/src/main/java/chat/delta/rpc/types/EventType.java b/src/main/java/chat/delta/rpc/types/EventType.java index 04c80f632..985bb45de 100644 --- a/src/main/java/chat/delta/rpc/types/EventType.java +++ b/src/main/java/chat/delta/rpc/types/EventType.java @@ -20,41 +20,41 @@ public abstract class EventType { public String msg; } -/* Emitted when SMTP connection is established and login was successful. */ +/** Emitted when SMTP connection is established and login was successful. */ public static class SmtpConnected extends EventType { public String msg; } -/* Emitted when IMAP connection is established and login was successful. */ +/** Emitted when IMAP connection is established and login was successful. */ public static class ImapConnected extends EventType { public String msg; } -/* Emitted when a message was successfully sent to the SMTP server. */ +/** Emitted when a message was successfully sent to the SMTP server. */ public static class SmtpMessageSent extends EventType { public String msg; } -/* Emitted when an IMAP message has been marked as deleted */ +/** Emitted when an IMAP message has been marked as deleted */ public static class ImapMessageDeleted extends EventType { public String msg; } -/* Emitted when an IMAP message has been moved */ +/** Emitted when an IMAP message has been moved */ public static class ImapMessageMoved extends EventType { public String msg; } -/* Emitted before going into IDLE on the Inbox folder. */ +/** Emitted before going into IDLE on the Inbox folder. */ public static class ImapInboxIdle extends EventType { } -/* Emitted when an new file in the $BLOBDIR was created */ +/** Emitted when an new file in the $BLOBDIR was created */ public static class NewBlobFile extends EventType { public String file; } -/* Emitted when an file in the $BLOBDIR was deleted */ +/** Emitted when an file in the $BLOBDIR was deleted */ public static class DeletedBlobFile extends EventType { public String file; } @@ -79,26 +79,26 @@ public abstract class EventType { public String msg; } -/* An action cannot be performed because the user is not in the group. Reported eg. after a call to setChatName(), setChatProfileImage(), addContactToChat(), removeContactFromChat(), and messages sending functions. */ +/** An action cannot be performed because the user is not in the group. Reported eg. after a call to setChatName(), setChatProfileImage(), addContactToChat(), removeContactFromChat(), and messages sending functions. */ public static class ErrorSelfNotInGroup extends EventType { public String msg; } -/* Messages or chats changed. One or more messages or chats changed for various reasons in the database: - Messages sent, received or removed - Chats created, deleted or archived - A draft has been set */ +/** Messages or chats changed. One or more messages or chats changed for various reasons in the database: - Messages sent, received or removed - Chats created, deleted or archived - A draft has been set */ public static class MsgsChanged extends EventType { - /* Set if only a single chat is affected by the changes, otherwise 0. */ + /** Set if only a single chat is affected by the changes, otherwise 0. */ public Integer chatId; - /* Set if only a single message is affected by the changes, otherwise 0. */ + /** Set if only a single message is affected by the changes, otherwise 0. */ public Integer msgId; } -/* Reactions for the message changed. */ +/** Reactions for the message changed. */ public static class ReactionsChanged extends EventType { - /* ID of the chat which the message belongs to. */ + /** ID of the chat which the message belongs to. */ public Integer chatId; - /* ID of the contact whose reaction set is changed. */ + /** ID of the contact whose reaction set is changed. */ public Integer contactId; - /* ID of the message for which reactions were changed. */ + /** ID of the message for which reactions were changed. */ public Integer msgId; } @@ -108,28 +108,28 @@ public abstract class EventType { * In addition to this event, ReactionsChanged is emitted. */ public static class IncomingReaction extends EventType { - /* ID of the chat which the message belongs to. */ + /** ID of the chat which the message belongs to. */ public Integer chatId; - /* ID of the contact whose reaction set is changed. */ + /** ID of the contact whose reaction set is changed. */ public Integer contactId; - /* ID of the message for which reactions were changed. */ + /** ID of the message for which reactions were changed. */ public Integer msgId; - /* The reaction. */ + /** The reaction. */ public String reaction; } -/* Incoming webxdc info or summary update, should be notified. */ +/** Incoming webxdc info or summary update, should be notified. */ public static class IncomingWebxdcNotify extends EventType { - /* ID of the chat. */ + /** ID of the chat. */ public Integer chatId; - /* ID of the contact sending. */ + /** ID of the contact sending. */ public Integer contactId; - /* Link assigned to this notification, if any. */ + /** Link assigned to this notification, if any. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String href; - /* ID of the added info message or webxdc instance in case of summary change. */ + /** ID of the added info message or webxdc instance in case of summary change. */ public Integer msgId; - /* Text to notify. */ + /** Text to notify. */ public String text; } @@ -139,42 +139,42 @@ public abstract class EventType { * There is no extra #DC_EVENT_MSGS_CHANGED event sent together with this event. */ public static class IncomingMsg extends EventType { - /* ID of the chat where the message is assigned. */ + /** ID of the chat where the message is assigned. */ public Integer chatId; - /* ID of the message. */ + /** ID of the message. */ public Integer msgId; } -/* Downloading a bunch of messages just finished. This is an event to allow the UI to only show one notification per message bunch, instead of cluttering the user with many notifications. */ +/** Downloading a bunch of messages just finished. This is an event to allow the UI to only show one notification per message bunch, instead of cluttering the user with many notifications. */ public static class IncomingMsgBunch extends EventType { } -/* Messages were seen or noticed. chat id is always set. */ +/** Messages were seen or noticed. chat id is always set. */ public static class MsgsNoticed extends EventType { public Integer chatId; } -/* A single message is sent successfully. State changed from DC_STATE_OUT_PENDING to DC_STATE_OUT_DELIVERED, see `Message.state`. */ +/** A single message is sent successfully. State changed from DC_STATE_OUT_PENDING to DC_STATE_OUT_DELIVERED, see `Message.state`. */ public static class MsgDelivered extends EventType { - /* ID of the chat which the message belongs to. */ + /** ID of the chat which the message belongs to. */ public Integer chatId; - /* ID of the message that was successfully sent. */ + /** ID of the message that was successfully sent. */ public Integer msgId; } -/* A single message could not be sent. State changed from DC_STATE_OUT_PENDING or DC_STATE_OUT_DELIVERED to DC_STATE_OUT_FAILED, see `Message.state`. */ +/** A single message could not be sent. State changed from DC_STATE_OUT_PENDING or DC_STATE_OUT_DELIVERED to DC_STATE_OUT_FAILED, see `Message.state`. */ public static class MsgFailed extends EventType { - /* ID of the chat which the message belongs to. */ + /** ID of the chat which the message belongs to. */ public Integer chatId; - /* ID of the message that could not be sent. */ + /** ID of the message that could not be sent. */ public Integer msgId; } -/* A single message is read by the receiver. State changed from DC_STATE_OUT_DELIVERED to DC_STATE_OUT_MDN_RCVD, see `Message.state`. */ +/** A single message is read by the receiver. State changed from DC_STATE_OUT_DELIVERED to DC_STATE_OUT_MDN_RCVD, see `Message.state`. */ public static class MsgRead extends EventType { - /* ID of the chat which the message belongs to. */ + /** ID of the chat which the message belongs to. */ public Integer chatId; - /* ID of the message that was read. */ + /** ID of the message that was read. */ public Integer msgId; } @@ -188,9 +188,9 @@ public abstract class EventType { * This event does not indicate the message deletion from the server. */ public static class MsgDeleted extends EventType { - /* ID of the chat where the message was prior to deletion. Never 0. */ + /** ID of the chat where the message was prior to deletion. Never 0. */ public Integer chatId; - /* ID of the deleted message. Never 0. */ + /** ID of the deleted message. Never 0. */ public Integer msgId; } @@ -203,37 +203,37 @@ public abstract class EventType { public Integer chatId; } -/* Chat ephemeral timer changed. */ +/** Chat ephemeral timer changed. */ public static class ChatEphemeralTimerModified extends EventType { - /* Chat ID. */ + /** Chat ID. */ public Integer chatId; - /* New ephemeral timer value. */ + /** New ephemeral timer value. */ public Integer timer; } -/* Chat deleted. */ +/** Chat deleted. */ public static class ChatDeleted extends EventType { - /* Chat ID. */ + /** Chat ID. */ public Integer chat_id; } -/* Contact(s) created, renamed, blocked or deleted. */ +/** Contact(s) created, renamed, blocked or deleted. */ public static class ContactsChanged extends EventType { - /* If set, this is the contact_id of an added contact that should be selected. */ + /** If set, this is the contact_id of an added contact that should be selected. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public Integer contactId; } -/* Location of one or more contact has changed. */ +/** Location of one or more contact has changed. */ public static class LocationChanged extends EventType { - /* contact_id of the contact for which the location has changed. If the locations of several contacts have been changed, this parameter is set to `None`. */ + /** contact_id of the contact for which the location has changed. If the locations of several contacts have been changed, this parameter is set to `None`. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public Integer contactId; } -/* Inform about the configuration progress started by configure(). */ +/** Inform about the configuration progress started by configure(). */ public static class ConfigureProgress extends EventType { - /* Progress comment or error, something to display to the user. */ + /** Progress comment or error, something to display to the user. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String comment; /** @@ -244,9 +244,9 @@ public abstract class EventType { public Integer progress; } -/* Inform about the import/export progress started by imex(). */ +/** Inform about the import/export progress started by imex(). */ public static class ImexProgress extends EventType { - /* 0=error, 1-999=progress in permille, 1000=success and done */ + /** 0=error, 1-999=progress in permille, 1000=success and done */ public Integer progress; } @@ -267,62 +267,62 @@ public abstract class EventType { * These events are typically sent after a joiner has scanned the QR code generated by getChatSecurejoinQrCodeSvg(). */ public static class SecurejoinInviterProgress extends EventType { - /* ID of the chat in case of success. */ + /** ID of the chat in case of success. */ public Integer chatId; - /* The type of the joined chat. This can take the same values as `BasicChat.chatType` ([`crate::api::types::chat::BasicChat::chat_type`]). */ + /** The type of the joined chat. This can take the same values as `BasicChat.chatType` ([`crate::api::types::chat::BasicChat::chat_type`]). */ public ChatType chatType; - /* ID of the contact that wants to join. */ + /** ID of the contact that wants to join. */ public Integer contactId; - /* Progress, always 1000. */ + /** Progress, always 1000. */ public Integer progress; } -/* Progress information of a secure-join handshake from the view of the joiner (Bob, the person who scans the QR code). The events are typically sent while secureJoin(), which may take some time, is executed. */ +/** Progress information of a secure-join handshake from the view of the joiner (Bob, the person who scans the QR code). The events are typically sent while secureJoin(), which may take some time, is executed. */ public static class SecurejoinJoinerProgress extends EventType { - /* ID of the inviting contact. */ + /** ID of the inviting contact. */ public Integer contactId; - /* Progress as: 400=vg-/vc-request-with-auth sent, typically shown as "alice@addr verified, introducing myself." (Bob has verified alice and waits until Alice does the same for him) 1000=vg-member-added/vc-contact-confirm received */ + /** Progress as: 400=vg-/vc-request-with-auth sent, typically shown as "alice@addr verified, introducing myself." (Bob has verified alice and waits until Alice does the same for him) 1000=vg-member-added/vc-contact-confirm received */ public Integer progress; } -/* The connectivity to the server changed. This means that you should refresh the connectivity view and possibly the connectivtiy HTML; see getConnectivity() and getConnectivityHtml() for details. */ +/** The connectivity to the server changed. This means that you should refresh the connectivity view and possibly the connectivtiy HTML; see getConnectivity() and getConnectivityHtml() for details. */ public static class ConnectivityChanged extends EventType { } -/* Deprecated by `ConfigSynced`. */ +/** Deprecated by `ConfigSynced`. */ public static class SelfavatarChanged extends EventType { } -/* A multi-device synced config value changed. Maybe the app needs to refresh smth. For uniformity this is emitted on the source device too. The value isn't here, otherwise it would be logged which might not be good for privacy. */ +/** A multi-device synced config value changed. Maybe the app needs to refresh smth. For uniformity this is emitted on the source device too. The value isn't here, otherwise it would be logged which might not be good for privacy. */ public static class ConfigSynced extends EventType { - /* Configuration key. */ + /** Configuration key. */ public String key; } public static class WebxdcStatusUpdate extends EventType { - /* Message ID. */ + /** Message ID. */ public Integer msgId; - /* Status update ID. */ + /** Status update ID. */ public Integer statusUpdateSerial; } -/* Data received over an ephemeral peer channel. */ +/** Data received over an ephemeral peer channel. */ public static class WebxdcRealtimeData extends EventType { - /* Realtime data. */ + /** Realtime data. */ public java.util.List data; - /* Message ID. */ + /** Message ID. */ public Integer msgId; } -/* Advertisement received over an ephemeral peer channel. This can be used by bots to initiate peer-to-peer communication from their side. */ +/** Advertisement received over an ephemeral peer channel. This can be used by bots to initiate peer-to-peer communication from their side. */ public static class WebxdcRealtimeAdvertisementReceived extends EventType { - /* Message ID of the webxdc instance. */ + /** Message ID of the webxdc instance. */ public Integer msgId; } -/* Inform that a message containing a webxdc instance has been deleted */ +/** Inform that a message containing a webxdc instance has been deleted */ public static class WebxdcInstanceDeleted extends EventType { - /* ID of the deleted message. */ + /** ID of the deleted message. */ public Integer msgId; } @@ -342,9 +342,9 @@ public abstract class EventType { public static class ChatlistChanged extends EventType { } -/* Inform that a single chat list item changed and needs to be rerendered. If `chat_id` is set to None, then all currently visible chats need to be rerendered, and all not-visible items need to be cleared from cache if the UI has a cache. */ +/** Inform that a single chat list item changed and needs to be rerendered. If `chat_id` is set to None, then all currently visible chats need to be rerendered, and all not-visible items need to be cleared from cache if the UI has a cache. */ public static class ChatlistItemChanged extends EventType { - /* ID of the changed chat */ + /** ID of the changed chat */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public Integer chatId; } @@ -365,47 +365,47 @@ public abstract class EventType { public static class AccountsItemChanged extends EventType { } -/* Inform than some events have been skipped due to event channel overflow. */ +/** Inform than some events have been skipped due to event channel overflow. */ public static class EventChannelOverflow extends EventType { - /* Number of events skipped. */ + /** Number of events skipped. */ public Integer n; } -/* Incoming call. */ +/** Incoming call. */ public static class IncomingCall extends EventType { - /* ID of the chat which the message belongs to. */ + /** ID of the chat which the message belongs to. */ public Integer chat_id; - /* True if incoming call is a video call. */ + /** True if incoming call is a video call. */ public Boolean has_video; - /* ID of the info message referring to the call. */ + /** ID of the info message referring to the call. */ public Integer msg_id; - /* User-defined info as passed to place_outgoing_call() */ + /** User-defined info as passed to place_outgoing_call() */ public String place_call_info; } -/* Incoming call accepted. This is esp. interesting to stop ringing on other devices. */ +/** Incoming call accepted. This is esp. interesting to stop ringing on other devices. */ public static class IncomingCallAccepted extends EventType { - /* ID of the chat which the message belongs to. */ + /** ID of the chat which the message belongs to. */ public Integer chat_id; - /* ID of the info message referring to the call. */ + /** ID of the info message referring to the call. */ public Integer msg_id; } -/* Outgoing call accepted. */ +/** Outgoing call accepted. */ public static class OutgoingCallAccepted extends EventType { - /* User-defined info passed to dc_accept_incoming_call( */ + /** User-defined info passed to dc_accept_incoming_call( */ public String accept_call_info; - /* ID of the chat which the message belongs to. */ + /** ID of the chat which the message belongs to. */ public Integer chat_id; - /* ID of the info message referring to the call. */ + /** ID of the info message referring to the call. */ public Integer msg_id; } -/* Call ended. */ +/** Call ended. */ public static class CallEnded extends EventType { - /* ID of the chat which the message belongs to. */ + /** ID of the chat which the message belongs to. */ public Integer chat_id; - /* ID of the info message referring to the call. */ + /** ID of the info message referring to the call. */ public Integer msg_id; } diff --git a/src/main/java/chat/delta/rpc/types/FullChat.java b/src/main/java/chat/delta/rpc/types/FullChat.java index 141a57b02..a1b4f46a7 100644 --- a/src/main/java/chat/delta/rpc/types/FullChat.java +++ b/src/main/java/chat/delta/rpc/types/FullChat.java @@ -31,12 +31,12 @@ public class FullChat { @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String mailingListAddress; public String name; - /* Contact IDs of the past chat members. */ + /** Contact IDs of the past chat members. */ public java.util.List pastContactIds; public Boolean pinned; @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String profileImage; - /* Note that this is different from [`ChatListItem::is_self_in_group`](`crate::api::types::chat_list::ChatListItemFetchResult::ChatListItem::is_self_in_group`). This property should only be accessed when [`FullChat::chat_type`] is [`Chattype::Group`]. */ + /** Note that this is different from [`ChatListItem::is_self_in_group`](`crate::api::types::chat_list::ChatListItemFetchResult::ChatListItem::is_self_in_group`). This property should only be accessed when [`FullChat::chat_type`] is [`Chattype::Group`]. */ public Boolean selfInGroup; public Boolean wasSeenRecently; } \ No newline at end of file diff --git a/src/main/java/chat/delta/rpc/types/HttpResponse.java b/src/main/java/chat/delta/rpc/types/HttpResponse.java index 8ad3c6438..fb772b333 100644 --- a/src/main/java/chat/delta/rpc/types/HttpResponse.java +++ b/src/main/java/chat/delta/rpc/types/HttpResponse.java @@ -2,12 +2,12 @@ package chat.delta.rpc.types; public class HttpResponse { - /* base64-encoded response body. */ + /** base64-encoded response body. */ public String blob; - /* Encoding, e.g. "utf-8". */ + /** Encoding, e.g. "utf-8". */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String encoding; - /* MIME type, e.g. "text/plain" or "text/html". */ + /** MIME type, e.g. "text/plain" or "text/html". */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String mimetype; } \ No newline at end of file diff --git a/src/main/java/chat/delta/rpc/types/Message.java b/src/main/java/chat/delta/rpc/types/Message.java index 498767896..fcf4351a0 100644 --- a/src/main/java/chat/delta/rpc/types/Message.java +++ b/src/main/java/chat/delta/rpc/types/Message.java @@ -7,7 +7,7 @@ public class Message { public Integer dimensionsWidth; public DownloadState downloadState; public Integer duration; - /* An error text, if there is one. */ + /** An error text, if there is one. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String error; @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) @@ -20,13 +20,13 @@ public class Message { public Integer fromId; public Boolean hasDeviatingTimestamp; public Boolean hasHtml; - /* Check if a message has a POI location bound to it. These locations are also returned by `get_locations` method. The UI may decide to display a special icon beside such messages. */ + /** Check if a message has a POI location bound to it. These locations are also returned by `get_locations` method. The UI may decide to display a special icon beside such messages. */ public Boolean hasLocation; public Integer id; - /* if is_info is set, this refers to the contact profile that should be opened when the info message is tapped. */ + /** if is_info is set, this refers to the contact profile that should be opened when the info message is tapped. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public Integer infoContactId; - /* True if the message was sent by a bot. */ + /** True if the message was sent by a bot. */ public Boolean isBot; public Boolean isEdited; public Boolean isForwarded; @@ -57,7 +57,7 @@ public class Message { public Integer sortTimestamp; public Integer state; public String subject; - /* when is_info is true this describes what type of system message it is */ + /** when is_info is true this describes what type of system message it is */ public SystemMessageType systemMessageType; public String text; public Integer timestamp; diff --git a/src/main/java/chat/delta/rpc/types/MessageData.java b/src/main/java/chat/delta/rpc/types/MessageData.java index 647b586e0..7de3d4fc7 100644 --- a/src/main/java/chat/delta/rpc/types/MessageData.java +++ b/src/main/java/chat/delta/rpc/types/MessageData.java @@ -12,7 +12,7 @@ public class MessageData { public Pair location; @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String overrideSenderName; - /* Quoted message id. Takes preference over `quoted_text` (see below). */ + /** Quoted message id. Takes preference over `quoted_text` (see below). */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public Integer quotedMessageId; @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) diff --git a/src/main/java/chat/delta/rpc/types/MessageInfo.java b/src/main/java/chat/delta/rpc/types/MessageInfo.java index c01228d5c..72d097544 100644 --- a/src/main/java/chat/delta/rpc/types/MessageInfo.java +++ b/src/main/java/chat/delta/rpc/types/MessageInfo.java @@ -3,7 +3,7 @@ package chat.delta.rpc.types; public class MessageInfo { public EphemeralTimer ephemeralTimer; - /* When message is ephemeral this contains the timestamp of the message expiry */ + /** When message is ephemeral this contains the timestamp of the message expiry */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public Integer ephemeralTimestamp; @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) diff --git a/src/main/java/chat/delta/rpc/types/MessageListItem.java b/src/main/java/chat/delta/rpc/types/MessageListItem.java index 666152e0f..8afce4983 100644 --- a/src/main/java/chat/delta/rpc/types/MessageListItem.java +++ b/src/main/java/chat/delta/rpc/types/MessageListItem.java @@ -15,9 +15,9 @@ public abstract class MessageListItem { public Integer msg_id; } -/* Day marker, separating messages that correspond to different days according to local time. */ +/** Day marker, separating messages that correspond to different days according to local time. */ public static class DayMarker extends MessageListItem { - /* Marker timestamp, for day markers, in unix milliseconds */ + /** Marker timestamp, for day markers, in unix milliseconds */ public Integer timestamp; } diff --git a/src/main/java/chat/delta/rpc/types/MessageLoadResult.java b/src/main/java/chat/delta/rpc/types/MessageLoadResult.java index 5ad339751..0d7838675 100644 --- a/src/main/java/chat/delta/rpc/types/MessageLoadResult.java +++ b/src/main/java/chat/delta/rpc/types/MessageLoadResult.java @@ -17,7 +17,7 @@ public abstract class MessageLoadResult { public Integer dimensionsWidth; public DownloadState downloadState; public Integer duration; - /* An error text, if there is one. */ + /** An error text, if there is one. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String error; @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) @@ -30,13 +30,13 @@ public abstract class MessageLoadResult { public Integer fromId; public Boolean hasDeviatingTimestamp; public Boolean hasHtml; - /* Check if a message has a POI location bound to it. These locations are also returned by `get_locations` method. The UI may decide to display a special icon beside such messages. */ + /** Check if a message has a POI location bound to it. These locations are also returned by `get_locations` method. The UI may decide to display a special icon beside such messages. */ public Boolean hasLocation; public Integer id; - /* if is_info is set, this refers to the contact profile that should be opened when the info message is tapped. */ + /** if is_info is set, this refers to the contact profile that should be opened when the info message is tapped. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public Integer infoContactId; - /* True if the message was sent by a bot. */ + /** True if the message was sent by a bot. */ public Boolean isBot; public Boolean isEdited; public Boolean isForwarded; @@ -67,7 +67,7 @@ public abstract class MessageLoadResult { public Integer sortTimestamp; public Integer state; public String subject; - /* when is_info is true this describes what type of system message it is */ + /** when is_info is true this describes what type of system message it is */ public SystemMessageType systemMessageType; public String text; public Integer timestamp; diff --git a/src/main/java/chat/delta/rpc/types/MessageNotificationInfo.java b/src/main/java/chat/delta/rpc/types/MessageNotificationInfo.java index c8b6669b3..a6ab5e0d9 100644 --- a/src/main/java/chat/delta/rpc/types/MessageNotificationInfo.java +++ b/src/main/java/chat/delta/rpc/types/MessageNotificationInfo.java @@ -12,9 +12,9 @@ public class MessageNotificationInfo { public String image; @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String imageMimeType; - /* also known as summary_text1 */ + /** also known as summary_text1 */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String summaryPrefix; - /* also known as summary_text2 */ + /** also known as summary_text2 */ public String summaryText; } \ No newline at end of file diff --git a/src/main/java/chat/delta/rpc/types/MessageQuote.java b/src/main/java/chat/delta/rpc/types/MessageQuote.java index 3a11ee806..f0f2d48b7 100644 --- a/src/main/java/chat/delta/rpc/types/MessageQuote.java +++ b/src/main/java/chat/delta/rpc/types/MessageQuote.java @@ -18,7 +18,7 @@ public abstract class MessageQuote { public static class WithMessage extends MessageQuote { public String authorDisplayColor; public String authorDisplayName; - /* The quoted message does not always belong to the same chat, e.g. when "Reply Privately" is used. */ + /** The quoted message does not always belong to the same chat, e.g. when "Reply Privately" is used. */ public Integer chatId; @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String image; diff --git a/src/main/java/chat/delta/rpc/types/MessageSearchResult.java b/src/main/java/chat/delta/rpc/types/MessageSearchResult.java index d5caadc74..66c4d8d75 100644 --- a/src/main/java/chat/delta/rpc/types/MessageSearchResult.java +++ b/src/main/java/chat/delta/rpc/types/MessageSearchResult.java @@ -4,7 +4,7 @@ package chat.delta.rpc.types; public class MessageSearchResult { public String authorColor; public Integer authorId; - /* if sender name if overridden it will show it as ~alias */ + /** if sender name if overridden it will show it as ~alias */ public String authorName; @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String authorProfileImage; diff --git a/src/main/java/chat/delta/rpc/types/NotifyState.java b/src/main/java/chat/delta/rpc/types/NotifyState.java index 41f2ea388..70f45cabd 100644 --- a/src/main/java/chat/delta/rpc/types/NotifyState.java +++ b/src/main/java/chat/delta/rpc/types/NotifyState.java @@ -2,12 +2,12 @@ package chat.delta.rpc.types; public enum NotifyState { - /* Not subscribed to push notifications. */ + /** Not subscribed to push notifications. */ NotConnected, - /* Subscribed to heartbeat push notifications. */ + /** Subscribed to heartbeat push notifications. */ Heartbeat, - /* Subscribed to push notifications for new messages. */ + /** Subscribed to push notifications for new messages. */ Connected, } \ No newline at end of file diff --git a/src/main/java/chat/delta/rpc/types/ProviderInfo.java b/src/main/java/chat/delta/rpc/types/ProviderInfo.java index d950cc0d2..5b68d6b03 100644 --- a/src/main/java/chat/delta/rpc/types/ProviderInfo.java +++ b/src/main/java/chat/delta/rpc/types/ProviderInfo.java @@ -3,7 +3,7 @@ package chat.delta.rpc.types; public class ProviderInfo { public String beforeLoginHint; - /* Unique ID, corresponding to provider database filename. */ + /** Unique ID, corresponding to provider database filename. */ public String id; public String overviewPage; public Integer status; diff --git a/src/main/java/chat/delta/rpc/types/Qr.java b/src/main/java/chat/delta/rpc/types/Qr.java index 902b93431..9ad484729 100644 --- a/src/main/java/chat/delta/rpc/types/Qr.java +++ b/src/main/java/chat/delta/rpc/types/Qr.java @@ -17,45 +17,45 @@ public abstract class Qr { * If the user agrees, pass this QR code to [`crate::securejoin::join_securejoin`]. */ public static class AskVerifyContact extends Qr { - /* Authentication code. */ + /** Authentication code. */ public String authcode; - /* ID of the contact. */ + /** ID of the contact. */ public Integer contact_id; - /* Fingerprint of the contact key as scanned from the QR code. */ + /** Fingerprint of the contact key as scanned from the QR code. */ public String fingerprint; - /* Invite number. */ + /** Invite number. */ public String invitenumber; } -/* Ask the user whether to join the group. */ +/** Ask the user whether to join the group. */ public static class AskVerifyGroup extends Qr { - /* Authentication code. */ + /** Authentication code. */ public String authcode; - /* ID of the contact. */ + /** ID of the contact. */ public Integer contact_id; - /* Fingerprint of the contact key as scanned from the QR code. */ + /** Fingerprint of the contact key as scanned from the QR code. */ public String fingerprint; - /* Group ID. */ + /** Group ID. */ public String grpid; - /* Group name. */ + /** Group name. */ public String grpname; - /* Invite number. */ + /** Invite number. */ public String invitenumber; } -/* Ask the user whether to join the broadcast channel. */ +/** Ask the user whether to join the broadcast channel. */ public static class AskJoinBroadcast extends Qr { - /* Authentication code. */ + /** Authentication code. */ public String authcode; - /* ID of the contact who owns the broadcast channel and created the QR code. */ + /** ID of the contact who owns the broadcast channel and created the QR code. */ public Integer contact_id; - /* Fingerprint of the broadcast channel owner's key as scanned from the QR code. */ + /** Fingerprint of the broadcast channel owner's key as scanned from the QR code. */ public String fingerprint; - /* A string of random characters, uniquely identifying this broadcast channel across all databases/clients. Called `grpid` for historic reasons: The id of multi-user chats is always called `grpid` in the database because groups were once the only multi-user chats. */ + /** A string of random characters, uniquely identifying this broadcast channel across all databases/clients. Called `grpid` for historic reasons: The id of multi-user chats is always called `grpid` in the database because groups were once the only multi-user chats. */ public String grpid; - /* Invite number. */ + /** Invite number. */ public String invitenumber; - /* The user-visible name of this broadcast channel */ + /** The user-visible name of this broadcast channel */ public String name; } @@ -65,41 +65,41 @@ public abstract class Qr { * Ask the user if they want to start chatting. */ public static class FprOk extends Qr { - /* Contact ID. */ + /** Contact ID. */ public Integer contact_id; } -/* Scanned fingerprint does not match the last seen fingerprint. */ +/** Scanned fingerprint does not match the last seen fingerprint. */ public static class FprMismatch extends Qr { - /* Contact ID. */ + /** Contact ID. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public Integer contact_id; } -/* The scanned QR code contains a fingerprint but no e-mail address. */ +/** The scanned QR code contains a fingerprint but no e-mail address. */ public static class FprWithoutAddr extends Qr { - /* Key fingerprint. */ + /** Key fingerprint. */ public String fingerprint; } -/* Ask the user if they want to create an account on the given domain. */ +/** Ask the user if they want to create an account on the given domain. */ public static class Account extends Qr { - /* Server domain name. */ + /** Server domain name. */ public String domain; } -/* Provides a backup that can be retrieved using iroh-net based backup transfer protocol. */ +/** Provides a backup that can be retrieved using iroh-net based backup transfer protocol. */ public static class Backup2 extends Qr { - /* Authentication token. */ + /** Authentication token. */ public String auth_token; - /* Iroh node address. */ + /** Iroh node address. */ public String node_addr; } public static class BackupTooNew extends Qr { } -/* Ask the user if they want to use the given service for video chats. */ +/** Ask the user if they want to use the given service for video chats. */ public static class WebrtcInstance extends Qr { public String domain; public String instance_pattern; @@ -111,9 +111,9 @@ public abstract class Qr { * Note that HTTP(S) URLs without a path and query parameters are treated as HTTP(S) proxy URL. UI may want to still offer to open the URL in the browser if QR code contents starts with `http://` or `https://` and the QR code was not scanned from the proxy configuration screen. */ public static class Proxy extends Qr { - /* Host extracted from the URL to display in the UI. */ + /** Host extracted from the URL to display in the UI. */ public String host; - /* Port extracted from the URL to display in the UI. */ + /** Port extracted from the URL to display in the UI. */ public Integer port; /** * Proxy URL. @@ -129,9 +129,9 @@ public abstract class Qr { * Optionally, a draft message could be provided. Ask the user if they want to start chatting. */ public static class Addr extends Qr { - /* Contact ID. */ + /** Contact ID. */ public Integer contact_id; - /* Draft message. */ + /** Draft message. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String draft; } @@ -154,91 +154,91 @@ public abstract class Qr { public String text; } -/* Ask the user if they want to withdraw their own QR code. */ +/** Ask the user if they want to withdraw their own QR code. */ public static class WithdrawVerifyContact extends Qr { - /* Authentication code. */ + /** Authentication code. */ public String authcode; - /* Contact ID. */ + /** Contact ID. */ public Integer contact_id; - /* Fingerprint of the contact key as scanned from the QR code. */ + /** Fingerprint of the contact key as scanned from the QR code. */ public String fingerprint; - /* Invite number. */ + /** Invite number. */ public String invitenumber; } -/* Ask the user if they want to withdraw their own group invite QR code. */ +/** Ask the user if they want to withdraw their own group invite QR code. */ public static class WithdrawVerifyGroup extends Qr { - /* Authentication code. */ + /** Authentication code. */ public String authcode; - /* Contact ID. */ + /** Contact ID. */ public Integer contact_id; - /* Fingerprint of the contact key as scanned from the QR code. */ + /** Fingerprint of the contact key as scanned from the QR code. */ public String fingerprint; - /* Group ID. */ + /** Group ID. */ public String grpid; - /* Group name. */ + /** Group name. */ public String grpname; - /* Invite number. */ + /** Invite number. */ public String invitenumber; } -/* Ask the user if they want to withdraw their own broadcast channel invite QR code. */ +/** Ask the user if they want to withdraw their own broadcast channel invite QR code. */ public static class WithdrawJoinBroadcast extends Qr { - /* Authentication code. */ + /** Authentication code. */ public String authcode; - /* Contact ID. Always `ContactId::SELF`. */ + /** Contact ID. Always `ContactId::SELF`. */ public Integer contact_id; - /* Fingerprint of the contact key as scanned from the QR code. */ + /** Fingerprint of the contact key as scanned from the QR code. */ public String fingerprint; - /* ID, uniquely identifying this chat. Called grpid for historic reasons. */ + /** ID, uniquely identifying this chat. Called grpid for historic reasons. */ public String grpid; - /* Invite number. */ + /** Invite number. */ public String invitenumber; - /* Broadcast name. */ + /** Broadcast name. */ public String name; } -/* Ask the user if they want to revive their own QR code. */ +/** Ask the user if they want to revive their own QR code. */ public static class ReviveVerifyContact extends Qr { - /* Authentication code. */ + /** Authentication code. */ public String authcode; - /* Contact ID. */ + /** Contact ID. */ public Integer contact_id; - /* Fingerprint of the contact key as scanned from the QR code. */ + /** Fingerprint of the contact key as scanned from the QR code. */ public String fingerprint; - /* Invite number. */ + /** Invite number. */ public String invitenumber; } -/* Ask the user if they want to revive their own group invite QR code. */ +/** Ask the user if they want to revive their own group invite QR code. */ public static class ReviveVerifyGroup extends Qr { - /* Authentication code. */ + /** Authentication code. */ public String authcode; - /* Contact ID. */ + /** Contact ID. */ public Integer contact_id; - /* Fingerprint of the contact key as scanned from the QR code. */ + /** Fingerprint of the contact key as scanned from the QR code. */ public String fingerprint; - /* Group ID. */ + /** Group ID. */ public String grpid; - /* Contact ID. */ + /** Contact ID. */ public String grpname; - /* Invite number. */ + /** Invite number. */ public String invitenumber; } -/* Ask the user if they want to revive their own broadcast channel invite QR code. */ +/** Ask the user if they want to revive their own broadcast channel invite QR code. */ public static class ReviveJoinBroadcast extends Qr { - /* Authentication code. */ + /** Authentication code. */ public String authcode; - /* Contact ID. Always `ContactId::SELF`. */ + /** Contact ID. Always `ContactId::SELF`. */ public Integer contact_id; - /* Fingerprint of the contact key as scanned from the QR code. */ + /** Fingerprint of the contact key as scanned from the QR code. */ public String fingerprint; - /* Globally unique chat ID. Called grpid for historic reasons. */ + /** Globally unique chat ID. Called grpid for historic reasons. */ public String grpid; - /* Invite number. */ + /** Invite number. */ public String invitenumber; - /* Broadcast name. */ + /** Broadcast name. */ public String name; } diff --git a/src/main/java/chat/delta/rpc/types/Reaction.java b/src/main/java/chat/delta/rpc/types/Reaction.java index 3ac86d5b7..b66914556 100644 --- a/src/main/java/chat/delta/rpc/types/Reaction.java +++ b/src/main/java/chat/delta/rpc/types/Reaction.java @@ -1,12 +1,12 @@ /* Autogenerated file, do not edit manually */ package chat.delta.rpc.types; -/* A single reaction emoji. */ +/** A single reaction emoji. */ public class Reaction { - /* Emoji frequency. */ + /** Emoji frequency. */ public Integer count; - /* Emoji. */ + /** Emoji. */ public String emoji; - /* True if we reacted with this emoji. */ + /** True if we reacted with this emoji. */ public Boolean isFromSelf; } \ No newline at end of file diff --git a/src/main/java/chat/delta/rpc/types/Reactions.java b/src/main/java/chat/delta/rpc/types/Reactions.java index a7daf1155..94ac17e72 100644 --- a/src/main/java/chat/delta/rpc/types/Reactions.java +++ b/src/main/java/chat/delta/rpc/types/Reactions.java @@ -1,10 +1,10 @@ /* Autogenerated file, do not edit manually */ package chat.delta.rpc.types; -/* Structure representing all reactions to a particular message. */ +/** Structure representing all reactions to a particular message. */ public class Reactions { - /* Unique reactions and their count, sorted in descending order. */ + /** Unique reactions and their count, sorted in descending order. */ public java.util.List reactions; - /* Map from a contact to it's reaction to message. */ + /** Map from a contact to it's reaction to message. */ public java.util.Map> reactionsByContact; } \ No newline at end of file diff --git a/src/main/java/chat/delta/rpc/types/SecurejoinSource.java b/src/main/java/chat/delta/rpc/types/SecurejoinSource.java index e9688b9e6..5f8b6beb2 100644 --- a/src/main/java/chat/delta/rpc/types/SecurejoinSource.java +++ b/src/main/java/chat/delta/rpc/types/SecurejoinSource.java @@ -2,21 +2,21 @@ package chat.delta.rpc.types; public enum SecurejoinSource { - /* Because of some problem, it is unknown where the QR code came from. */ + /** Because of some problem, it is unknown where the QR code came from. */ Unknown, - /* The user opened a link somewhere outside Delta Chat */ + /** The user opened a link somewhere outside Delta Chat */ ExternalLink, - /* The user clicked on a link in a message inside Delta Chat */ + /** The user clicked on a link in a message inside Delta Chat */ InternalLink, - /* The user clicked "Paste from Clipboard" in the QR scan activity */ + /** The user clicked "Paste from Clipboard" in the QR scan activity */ Clipboard, - /* The user clicked "Load QR code as image" in the QR scan activity */ + /** The user clicked "Load QR code as image" in the QR scan activity */ ImageLoaded, - /* The user scanned a QR code */ + /** 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 9cbe52e90..25bc5902c 100644 --- a/src/main/java/chat/delta/rpc/types/SecurejoinUiPath.java +++ b/src/main/java/chat/delta/rpc/types/SecurejoinUiPath.java @@ -2,12 +2,12 @@ package chat.delta.rpc.types; public enum SecurejoinUiPath { - /* The UI path is unknown, or the user didn't open the QR code screen at all. */ + /** The UI path is unknown, or the user didn't open the QR code screen at all. */ Unknown, - /* The user directly clicked on the QR icon in the main screen */ + /** The user directly clicked on the QR icon in the main screen */ QrIcon, - /* The user first clicked on the `+` button in the main screen, and then on "New Contact" */ + /** 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/Socket.java b/src/main/java/chat/delta/rpc/types/Socket.java index 1dccf6935..b450e543d 100644 --- a/src/main/java/chat/delta/rpc/types/Socket.java +++ b/src/main/java/chat/delta/rpc/types/Socket.java @@ -2,15 +2,15 @@ package chat.delta.rpc.types; public enum Socket { - /* Unspecified socket security, select automatically. */ + /** Unspecified socket security, select automatically. */ automatic, - /* TLS connection. */ + /** TLS connection. */ ssl, - /* STARTTLS connection. */ + /** STARTTLS connection. */ starttls, - /* No TLS, plaintext connection. */ + /** No TLS, plaintext connection. */ plain, } \ 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 f10b2c1a9..b81ac9cbe 100644 --- a/src/main/java/chat/delta/rpc/types/SystemMessageType.java +++ b/src/main/java/chat/delta/rpc/types/SystemMessageType.java @@ -19,21 +19,21 @@ public enum SystemMessageType { CallAccepted, CallEnded, - /* 1:1 chats info message telling that SecureJoin has started and the user should wait for it to complete. */ + /** 1:1 chats info message telling that SecureJoin has started and the user should wait for it to complete. */ SecurejoinWait, - /* 1:1 chats info message telling that SecureJoin is still running, but the user may already send messages. */ + /** 1:1 chats info message telling that SecureJoin is still running, but the user may already send messages. */ SecurejoinWaitTimeout, - /* Chat ephemeral message timer is changed. */ + /** Chat ephemeral message timer is changed. */ EphemeralTimerChanged, - /* Self-sent-message that contains only json used for multi-device-sync; if possible, we attach that to other messages as for locations. */ + /** Self-sent-message that contains only json used for multi-device-sync; if possible, we attach that to other messages as for locations. */ MultiDeviceSync, - /* Webxdc info added with `info` set in `send_webxdc_status_update()`. */ + /** Webxdc info added with `info` set in `send_webxdc_status_update()`. */ WebxdcInfoMessage, - /* This message contains a users iroh node address. */ + /** This message contains a users iroh node address. */ IrohNodeAddr, } \ No newline at end of file diff --git a/src/main/java/chat/delta/rpc/types/VcardContact.java b/src/main/java/chat/delta/rpc/types/VcardContact.java index f028f3357..5e0aa018e 100644 --- a/src/main/java/chat/delta/rpc/types/VcardContact.java +++ b/src/main/java/chat/delta/rpc/types/VcardContact.java @@ -2,19 +2,19 @@ package chat.delta.rpc.types; public class VcardContact { - /* Email address. */ + /** Email address. */ public String addr; - /* Contact color as hex string. */ + /** Contact color as hex string. */ public String color; - /* The contact's name, or the email address if no name was given. */ + /** The contact's name, or the email address if no name was given. */ public String displayName; - /* Public PGP key in Base64. */ + /** Public PGP key in Base64. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String key; - /* Profile image in Base64. */ + /** Profile image in Base64. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String profileImage; - /* Last update timestamp. */ + /** Last update timestamp. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public Integer timestamp; } \ No newline at end of file diff --git a/src/main/java/chat/delta/rpc/types/Viewtype.java b/src/main/java/chat/delta/rpc/types/Viewtype.java index f7cf9f9a0..b4c5adc16 100644 --- a/src/main/java/chat/delta/rpc/types/Viewtype.java +++ b/src/main/java/chat/delta/rpc/types/Viewtype.java @@ -4,13 +4,13 @@ package chat.delta.rpc.types; public enum Viewtype { Unknown, - /* Text message. */ + /** Text message. */ Text, - /* Image message. If the image is an animated GIF, the type `Viewtype.Gif` should be used. */ + /** Image message. If the image is an animated GIF, the type `Viewtype.Gif` should be used. */ Image, - /* Animated GIF message. */ + /** Animated GIF message. */ Gif, /** @@ -20,24 +20,24 @@ public enum Viewtype { */ Sticker, - /* Message containing an Audio file. */ + /** Message containing an Audio file. */ Audio, - /* A voice message that was directly recorded by the user. For all other audio messages, the type `Viewtype.Audio` should be used. */ + /** A voice message that was directly recorded by the user. For all other audio messages, the type `Viewtype.Audio` should be used. */ Voice, - /* Video messages. */ + /** Video messages. */ Video, - /* Message containing any file, eg. a PDF. */ + /** Message containing any file, eg. a PDF. */ File, - /* Message is a call. */ + /** Message is a call. */ Call, - /* Message is an webxdc instance. */ + /** Message is an webxdc instance. */ Webxdc, - /* Message containing shared contacts represented as a vCard (virtual contact file) with email addresses and possibly other fields. Use `parse_vcard()` to retrieve them. */ + /** Message containing shared contacts represented as a vCard (virtual contact file) with email addresses and possibly other fields. Use `parse_vcard()` to retrieve them. */ Vcard, } \ No newline at end of file diff --git a/src/main/java/chat/delta/rpc/types/WebxdcMessageInfo.java b/src/main/java/chat/delta/rpc/types/WebxdcMessageInfo.java index 8b869d7ed..8cfc09468 100644 --- a/src/main/java/chat/delta/rpc/types/WebxdcMessageInfo.java +++ b/src/main/java/chat/delta/rpc/types/WebxdcMessageInfo.java @@ -2,7 +2,7 @@ package chat.delta.rpc.types; public class WebxdcMessageInfo { - /* if the Webxdc represents a document, then this is the name of the document */ + /** if the Webxdc represents a document, then this is the name of the document */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String document; /** @@ -13,7 +13,7 @@ public class WebxdcMessageInfo { * App icons should should be square, the implementations will add round corners etc. as needed. */ public String icon; - /* True if full internet access should be granted to the app. */ + /** True if full internet access should be granted to the app. */ public Boolean internetAccess; /** * The name of the app. @@ -21,16 +21,16 @@ public class WebxdcMessageInfo { * Defaults to the filename if not set in the manifest. */ public String name; - /* Address to be used for `window.webxdc.selfAddr` in JS land. */ + /** Address to be used for `window.webxdc.selfAddr` in JS land. */ public String selfAddr; - /* Milliseconds to wait before calling `sendUpdate()` again since the last call. Should be exposed to `window.sendUpdateInterval` in JS land. */ + /** Milliseconds to wait before calling `sendUpdate()` again since the last call. Should be exposed to `window.sendUpdateInterval` in JS land. */ public Integer sendUpdateInterval; - /* Maximum number of bytes accepted for a serialized update object. Should be exposed to `window.sendUpdateMaxSize` in JS land. */ + /** Maximum number of bytes accepted for a serialized update object. Should be exposed to `window.sendUpdateMaxSize` in JS land. */ public Integer sendUpdateMaxSize; - /* URL where the source code of the Webxdc and other information can be found; defaults to an empty string. Implementations may offer an menu or a button to open this URL. */ + /** URL where the source code of the Webxdc and other information can be found; defaults to an empty string. Implementations may offer an menu or a button to open this URL. */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String sourceCodeUrl; - /* short string describing the state of the app, sth. as "2 votes", "Highscore: 123", can be changed by the apps */ + /** short string describing the state of the app, sth. as "2 votes", "Highscore: 123", can be changed by the apps */ @com.fasterxml.jackson.annotation.JsonSetter(nulls = com.fasterxml.jackson.annotation.Nulls.SET) public String summary; } \ No newline at end of file diff --git a/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java b/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java index 51f41060a..10273183e 100644 --- a/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java +++ b/src/main/java/org/thoughtcrime/securesms/ApplicationContext.java @@ -89,7 +89,9 @@ public class ApplicationContext extends MultiDexApplication { System.loadLibrary("native-utils"); dcAccounts = new DcAccounts(new File(getFilesDir(), "accounts").getAbsolutePath()); + Log.i(TAG, "DcAccounts created"); rpc = new Rpc(new FFITransport(dcAccounts.getJsonrpcInstance())); + Log.i(TAG, "Rpc created"); AccountManager.getInstance().migrateToDcAccounts(this); // October-2025 migration: delete deprecated "permanent channel" id @@ -98,6 +100,7 @@ public class ApplicationContext extends MultiDexApplication { // end October-2025 migration int[] allAccounts = dcAccounts.getAll(); + Log.i(TAG, "Number of profiles: " + allAccounts.length); for (int accountId : allAccounts) { DcContext ac = dcAccounts.getAccount(accountId); if (!ac.isOpen()) { @@ -131,7 +134,9 @@ public class ApplicationContext extends MultiDexApplication { notificationCenter = new NotificationCenter(this); eventCenter = new DcEventCenter(this); new Thread(() -> { + Log.i(TAG, "Starting event loop"); DcEventEmitter emitter = dcAccounts.getEventEmitter(); + Log.i(TAG, "DcEventEmitter obtained"); while (true) { DcEvent event = emitter.getNextEvent(); if (event==null) { diff --git a/src/main/java/org/thoughtcrime/securesms/BaseActionBarActivity.java b/src/main/java/org/thoughtcrime/securesms/BaseActionBarActivity.java index e4780ea97..b75d76a42 100644 --- a/src/main/java/org/thoughtcrime/securesms/BaseActionBarActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/BaseActionBarActivity.java @@ -37,8 +37,8 @@ public abstract class BaseActionBarActivity extends AppCompatActivity { onPreCreate(); super.onCreate(savedInstanceState); - // Only enable Edge-to-Edge on API 30+ - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { + // Only enable Edge-to-Edge if it is well supported + if (ViewUtil.isEdgeToEdgeSupported()) { // docs says to use: WindowCompat.enableEdgeToEdge(getWindow()); // but it actually makes things worse, the next takes care of setting the 3-buttons navigation bar background EdgeToEdge.enable(this); diff --git a/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java b/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java index 714bd764c..737bfcfa4 100644 --- a/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/ConversationActivity.java @@ -873,6 +873,13 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity ImageButton quickCameraToggle = ViewUtil.findById(this, R.id.quick_camera_toggle); + if (!ViewUtil.isEdgeToEdgeSupported()) { + // since insets will not be applied, we need to set top padding to avoid drawing behind toolbar + try (TypedArray typedArray = obtainStyledAttributes(new int[]{android.R.attr.actionBarSize})) { + int paddingTop = typedArray.getDimensionPixelSize(0, 0); + container.setPadding(container.getPaddingLeft(), paddingTop, container.getPaddingRight() , container.getPaddingBottom()); + } + } // apply padding top to avoid drawing behind top bar ViewUtil.applyWindowInsets(findViewById(R.id.fragment_content), false, true, false, false); // apply padding to root to avoid collision with system bars diff --git a/src/main/java/org/thoughtcrime/securesms/InstantOnboardingActivity.java b/src/main/java/org/thoughtcrime/securesms/InstantOnboardingActivity.java index b567ffc12..4f664af8d 100644 --- a/src/main/java/org/thoughtcrime/securesms/InstantOnboardingActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/InstantOnboardingActivity.java @@ -50,6 +50,7 @@ import org.thoughtcrime.securesms.profiles.AvatarHelper; import org.thoughtcrime.securesms.proxy.ProxySettingsActivity; import org.thoughtcrime.securesms.qr.RegistrationQrActivity; import org.thoughtcrime.securesms.relay.EditRelayActivity; +import org.thoughtcrime.securesms.relay.RelayListActivity; import org.thoughtcrime.securesms.scribbles.ScribbleActivity; import org.thoughtcrime.securesms.util.IntentUtils; import org.thoughtcrime.securesms.util.Prefs; @@ -73,7 +74,6 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements private static final String INSTANCES_URL = "https://chatmail.at/relays"; private static final String DEFAULT_CHATMAIL_HOST = "nine.testrun.org"; - public static final String QR_ACCOUNT_EXTRA = "qr_account_extra"; public static final String FROM_WELCOME = "from_welcome"; private static final int REQUEST_CODE_AVATAR = 1; @@ -106,11 +106,22 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements getSupportActionBar().setDisplayHomeAsUpEnabled(true); boolean fromWelcome = getIntent().getBooleanExtra(FROM_WELCOME, false); + if (DcHelper.getContext(this).isConfigured() == 1) { // if account is configured it means we didn't come from Welcome screen nor from QR scanner, - // instead, user clicked a dcaccount:// URI directly, so we need to switch to a new account: + // instead, user clicked a dcaccount:// URI directly, so we need to just offer to add a new relay + Uri uri = getIntent().getData(); + if (uri != null) { + Intent intent = new Intent(this, RelayListActivity.class); + intent.putExtra(RelayListActivity.EXTRA_QR_DATA, uri.toString()); + startActivity(intent); + finish(); + return; + } + // if URI is unexpectedly null, then fallback to new profile creation AccountManager.getInstance().beginAccountCreation(this); } + getOnBackPressedDispatcher().addCallback(this, new OnBackPressedCallback(!fromWelcome) { @Override public void handleOnBackPressed() { @@ -231,16 +242,6 @@ public class InstantOnboardingActivity extends BaseActionBarActivity implements Permissions.onRequestPermissionsResult(this, requestCode, permissions, grantResults); } - @Override - public void onStart() { - super.onStart(); - String accountQr = getIntent().getStringExtra(QR_ACCOUNT_EXTRA); - if (accountQr != null) { - getIntent().removeExtra(QR_ACCOUNT_EXTRA); - setProviderFromQr(accountQr); - } - } - @Override protected void onPause() { super.onPause(); diff --git a/src/main/java/org/thoughtcrime/securesms/WebViewActivity.java b/src/main/java/org/thoughtcrime/securesms/WebViewActivity.java index 7e47c199a..b092e3c62 100644 --- a/src/main/java/org/thoughtcrime/securesms/WebViewActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/WebViewActivity.java @@ -102,6 +102,8 @@ public class WebViewActivity extends PassphraseRequiredActionBarActivity case "mailto": case "openpgp4fpr": case "geo": + case "dcaccount": + case "dclogin": return openOnlineUrl(url); } } diff --git a/src/main/java/org/thoughtcrime/securesms/connect/AccountManager.java b/src/main/java/org/thoughtcrime/securesms/connect/AccountManager.java index 4997bdf37..12d98b51c 100644 --- a/src/main/java/org/thoughtcrime/securesms/connect/AccountManager.java +++ b/src/main/java/org/thoughtcrime/securesms/connect/AccountManager.java @@ -152,14 +152,6 @@ public class AccountManager { dialog.show(((FragmentActivity) activity).getSupportFragmentManager(), null); } - public void addAccountFromQr(Activity activity, String qr) { - beginAccountCreation(activity); - activity.finishAffinity(); - Intent intent = new Intent(activity, InstantOnboardingActivity.class); - intent.putExtra(InstantOnboardingActivity.QR_ACCOUNT_EXTRA, qr); - activity.startActivity(intent); - } - public void addAccountFromSecondDevice(Activity activity, String backupQr) { switchAccountAndStartActivity(activity, 0, backupQr); } diff --git a/src/main/java/org/thoughtcrime/securesms/preferences/AdvancedPreferenceFragment.java b/src/main/java/org/thoughtcrime/securesms/preferences/AdvancedPreferenceFragment.java index ee4410428..78644a13f 100644 --- a/src/main/java/org/thoughtcrime/securesms/preferences/AdvancedPreferenceFragment.java +++ b/src/main/java/org/thoughtcrime/securesms/preferences/AdvancedPreferenceFragment.java @@ -31,7 +31,6 @@ import org.thoughtcrime.securesms.relay.RelayListActivity; import org.thoughtcrime.securesms.connect.DcEventCenter; import org.thoughtcrime.securesms.proxy.ProxySettingsActivity; import org.thoughtcrime.securesms.util.Prefs; -import org.thoughtcrime.securesms.util.ScreenLockUtil; import org.thoughtcrime.securesms.util.StreamUtil; import org.thoughtcrime.securesms.util.Util; @@ -192,10 +191,7 @@ public class AdvancedPreferenceFragment extends ListSummaryPreferenceFragment Preference relayListBtn = this.findPreference("pref_relay_list_button"); if (relayListBtn != null) { relayListBtn.setOnPreferenceClickListener(((preference) -> { - boolean result = ScreenLockUtil.applyScreenLock(requireActivity(), getString(R.string.transports), getString(R.string.enter_system_secret_to_continue), REQUEST_CODE_CONFIRM_CREDENTIALS_ACCOUNT); - if (!result) { - openRelayListActivity(); - } + openRelayListActivity(); return true; })); } diff --git a/src/main/java/org/thoughtcrime/securesms/qr/QrActivity.java b/src/main/java/org/thoughtcrime/securesms/qr/QrActivity.java index 4676930e8..6be2b363e 100644 --- a/src/main/java/org/thoughtcrime/securesms/qr/QrActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/qr/QrActivity.java @@ -110,7 +110,7 @@ public class QrActivity extends BaseActionBarActivity implements View.OnClickLis .onAllGranted(() -> ((QrScanFragment) adapter.getItem(TAB_SCAN)).handleQrScanWithPermissions(QrActivity.this)) .onAnyDenied(() -> { if (scanRelay) { - finish(); + Toast.makeText(this, getString(R.string.chat_camera_unavailable), Toast.LENGTH_LONG).show(); } else { viewPager.setCurrentItem(TAB_SHOW); } @@ -123,7 +123,7 @@ public class QrActivity extends BaseActionBarActivity implements View.OnClickLis public boolean onPrepareOptionsMenu(Menu menu) { menu.clear(); getMenuInflater().inflate(R.menu.qr_show, menu); - menu.findItem(R.id.new_classic_contact).setVisible(!DcHelper.getContext(this).isChatmail()); + menu.findItem(R.id.new_classic_contact).setVisible(!scanRelay && !DcHelper.getContext(this).isChatmail()); Util.redMenuItem(menu, R.id.withdraw); if(tabLayout.getSelectedTabPosition() == TAB_SCAN) { @@ -162,7 +162,7 @@ public class QrActivity extends BaseActionBarActivity implements View.OnClickLis && Manifest.permission.CAMERA.equals(permissions[0]) && grantResults[0] == PackageManager.PERMISSION_DENIED) { if (scanRelay) { - finish(); + Toast.makeText(this, getString(R.string.chat_camera_unavailable), Toast.LENGTH_LONG).show(); } else { viewPager.setCurrentItem(TAB_SHOW); } diff --git a/src/main/java/org/thoughtcrime/securesms/qr/QrCodeHandler.java b/src/main/java/org/thoughtcrime/securesms/qr/QrCodeHandler.java index e95d072eb..46d9e942b 100644 --- a/src/main/java/org/thoughtcrime/securesms/qr/QrCodeHandler.java +++ b/src/main/java/org/thoughtcrime/securesms/qr/QrCodeHandler.java @@ -17,6 +17,7 @@ import org.thoughtcrime.securesms.ConversationActivity; import org.thoughtcrime.securesms.R; import org.thoughtcrime.securesms.connect.AccountManager; import org.thoughtcrime.securesms.connect.DcHelper; +import org.thoughtcrime.securesms.relay.RelayListActivity; import org.thoughtcrime.securesms.util.IntentUtils; import org.thoughtcrime.securesms.util.Util; import org.thoughtcrime.securesms.util.views.ProgressDialog; @@ -282,7 +283,16 @@ public class QrCodeHandler { Util.runOnMain(() -> { if (!progressDialog.isShowing()) return; // canceled dialog, nothing to do if (finalError != null) { - Toast.makeText(activity, finalError, Toast.LENGTH_LONG).show(); + new AlertDialog.Builder(activity) + .setTitle(R.string.error) + .setMessage(finalError) + .setPositiveButton(R.string.ok, null) + .show(); + } else { + showDoneToast(activity); + if (!(activity instanceof RelayListActivity)) { + activity.startActivity(new Intent(activity, RelayListActivity.class)); + } } try { progressDialog.dismiss(); diff --git a/src/main/java/org/thoughtcrime/securesms/relay/RelayListActivity.java b/src/main/java/org/thoughtcrime/securesms/relay/RelayListActivity.java index 32bfb174d..d0ae1859d 100644 --- a/src/main/java/org/thoughtcrime/securesms/relay/RelayListActivity.java +++ b/src/main/java/org/thoughtcrime/securesms/relay/RelayListActivity.java @@ -37,6 +37,7 @@ public class RelayListActivity extends BaseActionBarActivity implements RelayListAdapter.OnRelayClickListener, DcEventCenter.DcEventDelegate { private static final String TAG = RelayListActivity.class.getSimpleName(); + public static final String EXTRA_QR_DATA = "qr_data"; private RelayListAdapter adapter; private Rpc rpc; @@ -83,6 +84,12 @@ public class RelayListActivity extends BaseActionBarActivity DcEventCenter eventCenter = DcHelper.getEventCenter(this); eventCenter.addObserver(DcContext.DC_EVENT_CONFIGURE_PROGRESS, this); + + String qrdata = getIntent().getStringExtra(EXTRA_QR_DATA); + if (qrdata != null) { + QrCodeHandler qrCodeHandler = new QrCodeHandler(this); + qrCodeHandler.handleQrData(qrdata); + } } @Override diff --git a/src/main/java/org/thoughtcrime/securesms/util/ViewUtil.java b/src/main/java/org/thoughtcrime/securesms/util/ViewUtil.java index cb5cb544a..122cd38e0 100644 --- a/src/main/java/org/thoughtcrime/securesms/util/ViewUtil.java +++ b/src/main/java/org/thoughtcrime/securesms/util/ViewUtil.java @@ -299,6 +299,11 @@ public class ViewUtil { return selection; } + /** Return true if the system supports edge-to-edge properly */ + public static boolean isEdgeToEdgeSupported() { + return Build.VERSION.SDK_INT >= VERSION_CODES.R; + } + /** * Get combined insets from status bar, navigation bar and display cutout areas. * @@ -335,7 +340,7 @@ public class ViewUtil { */ public static void applyWindowInsetsAsMargin(@NonNull View view, boolean left, boolean top, boolean right, boolean bottom) { // Only enable on API 30+ where WindowInsets APIs work correctly - if (Build.VERSION.SDK_INT < VERSION_CODES.R) return; + if (!isEdgeToEdgeSupported()) return; // Store the original margin as a tag only if not already stored // This prevents losing the true original margin on subsequent calls @@ -406,7 +411,7 @@ public class ViewUtil { */ public static void applyWindowInsets(@NonNull View view, boolean left, boolean top, boolean right, boolean bottom) { // Only enable on API 30+ where WindowInsets APIs work correctly - if (Build.VERSION.SDK_INT < VERSION_CODES.R) return; + if (!isEdgeToEdgeSupported()) return; // Store the original padding as a tag only if not already stored // This prevents losing the true original padding on subsequent calls @@ -475,7 +480,7 @@ public class ViewUtil { */ public static void adjustToolbarForE2E(@NonNull AppCompatActivity activity) { // Only enable on API 30+ where WindowInsets APIs work correctly - if (Build.VERSION.SDK_INT < VERSION_CODES.R) return; + if (!isEdgeToEdgeSupported()) return; // The toolbar/app bar should extend behind the status bar with padding applied View toolbar = activity.findViewById(R.id.toolbar); diff --git a/src/main/java/org/thoughtcrime/securesms/webxdc/WebxdcGarbageCollectionWorker.java b/src/main/java/org/thoughtcrime/securesms/webxdc/WebxdcGarbageCollectionWorker.java index 83f15e56a..b5ce3ae4b 100644 --- a/src/main/java/org/thoughtcrime/securesms/webxdc/WebxdcGarbageCollectionWorker.java +++ b/src/main/java/org/thoughtcrime/securesms/webxdc/WebxdcGarbageCollectionWorker.java @@ -18,11 +18,11 @@ import org.thoughtcrime.securesms.connect.DcHelper; public class WebxdcGarbageCollectionWorker extends ListenableWorker { private static final String TAG = WebxdcGarbageCollectionWorker.class.getSimpleName(); - private Rpc rpc; + private Context context; public WebxdcGarbageCollectionWorker(Context context, WorkerParameters params) { super(context, params); - rpc = DcHelper.getRpc(context); + this.context = context; } @Override @@ -42,6 +42,13 @@ public class WebxdcGarbageCollectionWorker extends ListenableWorker { return; } + Rpc rpc = DcHelper.getRpc(context); + if (rpc == null) { + Log.e(TAG, "Failed to get access to RPC, Webxdc storage garbage collection aborted."); + completer.set(Result.failure()); + return; + } + for (Object key : origins.keySet()) { String url = (String)key; Matcher m = WEBXDC_URL_PATTERN.matcher(url); diff --git a/src/main/res/values-ru/strings.xml b/src/main/res/values-ru/strings.xml index 8f2d4f104..b429dc161 100644 --- a/src/main/res/values-ru/strings.xml +++ b/src/main/res/values-ru/strings.xml @@ -368,7 +368,7 @@ Сообщения устройства Сообщения, созданные устройством Сообщения в этом чате создаются локально на вашем устройстве для уведомления о обновлениях и проблемах при использовании приложения. - Оставайтесь на связи!\n\n🙌 Нажмите \"QR-код\" на главном экране обоих устройств. Выберите \"Сканировать QR-код\" на одном устройстве и покажите его на другом.\n\n🌍 Если вы не находитесь в одном помещении, отсканируйте код с помощью видеозвонка или поделитесь ссылкой-приглашением из раздела \"Сканировать QR-код\"\n\nЗатем: наслаждайтесь работой мессенджера через самую крупную децентрализованную сеть, которая когда-либо существовала — электронную почту. И, в отличие от других популярных приложений, без централизованного контроля, отслеживания или продажи вас, ваших друзей, коллег или семьи крупным организациям. + Оставайтесь на связи!\n\n🙌 Нажмите \"QR-код\" на главном экране обоих устройств. Выберите \"Сканировать QR-код\" на одном устройстве и покажите его на другом.\n\n🌍 Если вы не находитесь в одном помещении, отсканируйте код с помощью видеозвонка или поделитесь ссылкой-приглашением из раздела \"Сканировать QR-код\"\n\nЗатем: Наслаждайтесь децентрализованным мессенджером. В отличие от других популярных приложений, он работает без центрального управления, отслеживания и продажи ваших данных, а также данных ваших друзей, коллег или семьи крупным организациям. Редактировать контакт Закрепить чат @@ -648,7 +648,7 @@ У меня уже есть профиль - Использовать электронную почту как транспорт + Использовать электронную почту как релей Ваш профиль @@ -700,15 +700,15 @@ Прокси включен Вы используете прокси. При проблемах с подключением, попробуйте другой прокси. - Транспорты - Добавить транспорт - Удалить транспорт - Редактировать транспорт + Релеи + Добавить релей + Удалить релей + Редактировать релей - Добавить этот транспорт? - Отсканированный QR-код не содержит корректный транспорт. + Добавить этот релей? + Отсканированный QR-код не содержит корректный релей. - Удалить транспорт \"%1$s\"?\n\nВаши контакты смогут связаться с вами, только если вы ранее связывались с ними через другой транспорт.\n\nЕсли сомневаетесь, удалите транспорт позже. + Удалить транспорт \"%1$s\"?\n\nВаши контакты смогут связаться с вами, только если вы ранее связывались с ними через другой релей.\n\nЕсли сомневаетесь, удалите релей позже. Проверки сертификатов Введите корректный адрес электронной почты @@ -981,7 +981,7 @@ %2$s включает автоудаление сообщений через %1$s недель. Сообщения в этом чате используют обычную электронную почту и не зашифрованы сквозным шифрованием. Сообщения защищены сквозным шифрованием. Нажмите, чтобы узнать больше. - Все сообщения в этом чате защищены сквозным шифрованием.\n\nСквозное шифрование гарантирует, что сообщения остаются конфиденциальными между вами и вашими собеседниками. Ни серверы, ни провайдеры, ни ретрансляторы не смогут их прочитать. + Все сообщения в этом чате зашифрованы сквозным шифрованием.\n\nСквозное шифрование обеспечивает конфиденциальность переписки между вами и вашими собеседниками. Ни серверы, ни провайдеры, ни релеи не смогут прочитать сообщения. ⚠️ %1$s требуется сквозное шифрование, которое ещё не настроено для данного чата. Нажмите, чтобы узнать больше. Чтобы установить сквозное шифрование, вы можете встретиться с контактами лично и отсканировать их QR-код, чтобы подтвердить их личность. Узнать больше diff --git a/src/main/res/values-tr/strings.xml b/src/main/res/values-tr/strings.xml index a826922d8..ace4d48d6 100644 --- a/src/main/res/values-tr/strings.xml +++ b/src/main/res/values-tr/strings.xml @@ -612,7 +612,7 @@ Zaten Bir Profilim Var - Taşıma Aracı Olarak Klasik E-Posta Kullan + Aktarıcı Olarak Klasik E-Posta Kullan Profiliniz @@ -664,15 +664,15 @@ Proxy Etkinleştirildi Bir proxy kullanıyorsunuz. Bağlanmakta sorun yaşıyorsanız başka bir proxy deneyin. - Taşıma Araçları - Taşıma Aracı Ekle - Taşıma Aracını Kaldır - Taşıma Aracını Düzenle + Aktarıcılar + Aktarıcı Ekle + Aktarıcıyı Kaldır + Aktarıcıyı Düzenle - Bu taşıma aracı eklensin mi? - Taranan QR kodu, geçerli bir taşıma aracı içermiyor. + Bu aktarıcı eklensin mi? + Taranan QR kodu, geçerli bir aktarıcı içermiyor. - “%1$s” taşıma aracı kaldırılsın mı?\n\nKişileriniz yalnızca onlara önceden ulaştığınız başka bir taşıma aracı üzerinden size ulaşabilir.\n\nKuşkuluysanız taşıma aracını daha sonra kaldırın. + “%1$s” aktarıcısı kaldırılsın mı?\n\nKişileriniz yalnızca onlara önceden ulaştığınız başka bir aktarıcı üzerinden size ulaşabilir.\n\nKuşkuluysanız aktarıcıyı daha sonra kaldırın. Sertifika Denetimleri Lütfen geçerli bir e-posta adresi girin diff --git a/src/main/res/values-zh-rCN/strings.xml b/src/main/res/values-zh-rCN/strings.xml index 5be3606d4..21bc2d50d 100644 --- a/src/main/res/values-zh-rCN/strings.xml +++ b/src/main/res/values-zh-rCN/strings.xml @@ -335,7 +335,7 @@ 设备消息 本地生成的消息 此聊天中的消息是由 Delta Chat 应用本地生成的。 它的制作者使用它来通知应用更新和使用过程中出现的问题。 - 取得联系!\n\n🙌 轻按两台设备主屏上的“二维码”。 在其中一台设备上选择“扫描二维码”,并将其对准另一台设备上显示的二维码\n\n🌍 如果双方不在同一个房间内,可以通过视频通话进行扫描,或从“扫描二维码”那里分享一个邀请链接\n\n接下来: 通过有史以来存在的最大去中心化网络:电子邮件来享受收发消息。和其他流行的即时聊天应用相比,DeltaChat 没有中央控制,不跟踪您本人、您的好友、同事或家人,也不售卖你们的数据给大型组织。 + 取得联系!\n\n🙌 在两台设备的主屏幕上点击“二维码”。在一台设备上选择“扫描二维码”,然后将其对准另一台设备。\n\n🌍 如果双方不在同一个房间内,可以通过视频通话进行扫描,或分享“扫描二维码”中的邀请链接。\n\n然后:尽情享受去中心化的即时通讯应用的体验。与其他流行应用不同,我们不会进行中心化控制、追踪或将您、您的朋友、同事或家人的数据出售给大型组织。 编辑联系人 固定聊天 @@ -594,7 +594,7 @@ 我已有账号 - 使用传统电子邮件作为传输 + 使用传统电子邮件作为中继 个人资料 @@ -646,15 +646,15 @@ 代理已启用 您正在使用代理。如果您在连接时遇到问题,请尝试其他代理。 - 传输 - 添加传输 - 移除传输 - 编辑传输 + 中继 + 添加中继 + 移除中继 + 编辑中继 - 添加此传输? - 扫描的二维码不包含有效的传输。 + 添加此中继? + 扫描的二维码不包含有效的中继。 - 移除传输“%1$s”?\n\n只有您之前通过其他传输联系过您的联系人,他们才能联系到您。\n\n如有疑问,请稍后移除传输。 + 移除中继“%1$s”?\n\n只有您之前通过其他中继联系过您的联系人,他们才能联系到您。\n\n如有疑问,请稍后移除中继。 证书检查 请输入有效的电子邮件地址 diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml index 19be97945..c68e467ca 100644 --- a/src/main/res/values/strings.xml +++ b/src/main/res/values/strings.xml @@ -611,7 +611,7 @@ Create New Profile I Already Have a Profile - + Use Classic Email as Relay Your Profile @@ -636,7 +636,7 @@ Secure Decentralized Chat Scan Invitation Code Log In - This login is for advanced users:\n\n• Do not use an account you\'re using in another app.\n\n• Classic email server allow chats without end-to-end encryption marked by a mail icon. + This login is for advanced users:\n\n• Do not use an address you\'re using in another app.\n\n• Classic email server allow chats without end-to-end encryption marked by a mail icon. Inbox IMAP Login Name IMAP Server @@ -993,13 +993,14 @@ Scan to chat with %1$s No internet connection, can\'t perform QR code setup. Create new profile on \"%1$s\" and log in there? + Create new profile on \"%1$s\" and log in there?\n\nYour existing profile will not be deleted. Use the \"Switch Profile\" item to switch between your profiles. Set a name that your contacts will recognize. You can also set a profile image. Please enter a name. The scanned QR code cannot be used to set up a new profile. Log into \"%1$s\"? - + Log into \"%1$s\"?\n\nYour existing profile will not be deleted. Use the \"Switch Profile\" item to switch between your profiles. %1$s invited you to join this group.\n\nWaiting for the device of %2$s to reply…