mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 09:26:29 +03:00
chore: cleanup deprecated functions/defines (#7763)
this PR cleans up with some easy, deprecated stuff. i roughly checked that they are no longer in use - by these checks, other deprecated function were kept, eg. dc_provider_new_from_email_with_dns() and dc_chat_is_protected() is still used by deltatouch - to not add noise there, we remove them here on the next cleanup ... for DC_STR_*, however, if they are in used, the corresponding lines should just be removed this will cleanup https://c.delta.chat/deprecated.html as well
This commit is contained in:
@@ -2220,10 +2220,6 @@ uint32_t dc_lookup_contact_id_by_addr (dc_context_t* context, const char*
|
|||||||
uint32_t dc_create_contact (dc_context_t* context, const char* name, const char* addr);
|
uint32_t dc_create_contact (dc_context_t* context, const char* name, const char* addr);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Deprecated 2025-05-20, setting this flag is a no-op.
|
|
||||||
#define DC_GCL_DEPRECATED_VERIFIED_ONLY 0x01
|
|
||||||
|
|
||||||
#define DC_GCL_ADD_SELF 0x02
|
#define DC_GCL_ADD_SELF 0x02
|
||||||
#define DC_GCL_ADDRESS 0x04
|
#define DC_GCL_ADDRESS 0x04
|
||||||
|
|
||||||
@@ -2296,17 +2292,6 @@ dc_array_t* dc_import_vcard (dc_context_t* context, const char*
|
|||||||
dc_array_t* dc_get_contacts (dc_context_t* context, uint32_t flags, const char* query);
|
dc_array_t* dc_get_contacts (dc_context_t* context, uint32_t flags, const char* query);
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the number of blocked contacts.
|
|
||||||
*
|
|
||||||
* @deprecated Deprecated 2021-02-22, use dc_array_get_cnt() on dc_get_blocked_contacts() instead.
|
|
||||||
* @memberof dc_context_t
|
|
||||||
* @param context The context object.
|
|
||||||
* @return The number of blocked contacts.
|
|
||||||
*/
|
|
||||||
int dc_get_blocked_cnt (dc_context_t* context);
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get blocked contacts.
|
* Get blocked contacts.
|
||||||
*
|
*
|
||||||
@@ -2579,7 +2564,6 @@ void dc_stop_ongoing_process (dc_context_t* context);
|
|||||||
#define DC_QR_FPR_MISMATCH 220 // id=contact
|
#define DC_QR_FPR_MISMATCH 220 // id=contact
|
||||||
#define DC_QR_FPR_WITHOUT_ADDR 230 // test1=formatted fingerprint
|
#define DC_QR_FPR_WITHOUT_ADDR 230 // test1=formatted fingerprint
|
||||||
#define DC_QR_ACCOUNT 250 // text1=domain
|
#define DC_QR_ACCOUNT 250 // text1=domain
|
||||||
#define DC_QR_BACKUP 251 // deprecated
|
|
||||||
#define DC_QR_BACKUP2 252
|
#define DC_QR_BACKUP2 252
|
||||||
#define DC_QR_BACKUP_TOO_NEW 255
|
#define DC_QR_BACKUP_TOO_NEW 255
|
||||||
#define DC_QR_PROXY 271 // text1=address (e.g. "127.0.0.1:9050")
|
#define DC_QR_PROXY 271 // text1=address (e.g. "127.0.0.1:9050")
|
||||||
@@ -4675,7 +4659,6 @@ uint32_t dc_msg_get_info_contact_id (const dc_msg_t* msg);
|
|||||||
#define DC_INFO_LOCATION_ONLY 9
|
#define DC_INFO_LOCATION_ONLY 9
|
||||||
#define DC_INFO_EPHEMERAL_TIMER_CHANGED 10
|
#define DC_INFO_EPHEMERAL_TIMER_CHANGED 10
|
||||||
#define DC_INFO_PROTECTION_ENABLED 11
|
#define DC_INFO_PROTECTION_ENABLED 11
|
||||||
#define DC_INFO_PROTECTION_DISABLED 12 // deprecated 2025-07
|
|
||||||
#define DC_INFO_INVALID_UNENCRYPTED_MAIL 13
|
#define DC_INFO_INVALID_UNENCRYPTED_MAIL 13
|
||||||
#define DC_INFO_WEBXDC_INFO_MESSAGE 32
|
#define DC_INFO_WEBXDC_INFO_MESSAGE 32
|
||||||
#define DC_INFO_CHAT_E2EE 50
|
#define DC_INFO_CHAT_E2EE 50
|
||||||
@@ -7022,61 +7005,16 @@ void dc_event_unref(dc_event_t* event);
|
|||||||
/// Used in summaries.
|
/// Used in summaries.
|
||||||
#define DC_STR_FILE 12
|
#define DC_STR_FILE 12
|
||||||
|
|
||||||
/// "Group name changed from %1$s to %2$s."
|
|
||||||
///
|
|
||||||
/// Used in status messages for group name changes.
|
|
||||||
/// - %1$s will be replaced by the old group name
|
|
||||||
/// - %2$s will be replaced by the new group name
|
|
||||||
///
|
|
||||||
/// @deprecated 2022-09-10
|
|
||||||
#define DC_STR_MSGGRPNAME 15
|
|
||||||
|
|
||||||
/// "Group image changed."
|
|
||||||
///
|
|
||||||
/// Used in status messages for group images changes.
|
|
||||||
///
|
|
||||||
/// @deprecated 2022-09-10
|
|
||||||
#define DC_STR_MSGGRPIMGCHANGED 16
|
|
||||||
|
|
||||||
/// "Member %1$s added."
|
|
||||||
///
|
|
||||||
/// Used in status messages for added members.
|
|
||||||
/// - %1$s will be replaced by the name of the added member
|
|
||||||
///
|
|
||||||
/// @deprecated 2022-09-10
|
|
||||||
#define DC_STR_MSGADDMEMBER 17
|
|
||||||
|
|
||||||
/// "Member %1$s removed."
|
|
||||||
///
|
|
||||||
/// Used in status messages for removed members.
|
|
||||||
/// - %1$s will be replaced by the name of the removed member
|
|
||||||
///
|
|
||||||
/// @deprecated 2022-09-10
|
|
||||||
#define DC_STR_MSGDELMEMBER 18
|
|
||||||
|
|
||||||
/// "Group left."
|
|
||||||
///
|
|
||||||
/// Used in status messages.
|
|
||||||
///
|
|
||||||
/// @deprecated 2022-09-10
|
|
||||||
#define DC_STR_MSGGROUPLEFT 19
|
|
||||||
|
|
||||||
/// "GIF"
|
/// "GIF"
|
||||||
///
|
///
|
||||||
/// Used in summaries.
|
/// Used in summaries.
|
||||||
#define DC_STR_GIF 23
|
#define DC_STR_GIF 23
|
||||||
|
|
||||||
/// @deprecated 2025-07, this string is no longer needed.
|
|
||||||
#define DC_STR_ENCRYPTEDMSG 24
|
|
||||||
|
|
||||||
/// "End-to-end encryption available."
|
/// "End-to-end encryption available."
|
||||||
///
|
///
|
||||||
/// Used to build the string returned by dc_get_contact_encrinfo().
|
/// Used to build the string returned by dc_get_contact_encrinfo().
|
||||||
#define DC_STR_E2E_AVAILABLE 25
|
#define DC_STR_E2E_AVAILABLE 25
|
||||||
|
|
||||||
/// @deprecated Deprecated 2021-02-07, this string is no longer needed.
|
|
||||||
#define DC_STR_ENCR_TRANSP 27
|
|
||||||
|
|
||||||
/// "No encryption."
|
/// "No encryption."
|
||||||
///
|
///
|
||||||
/// Used to build the string returned by dc_get_contact_encrinfo().
|
/// Used to build the string returned by dc_get_contact_encrinfo().
|
||||||
@@ -7087,90 +7025,23 @@ void dc_event_unref(dc_event_t* event);
|
|||||||
/// Used to build the string returned by dc_get_contact_encrinfo().
|
/// Used to build the string returned by dc_get_contact_encrinfo().
|
||||||
#define DC_STR_FINGERPRINTS 30
|
#define DC_STR_FINGERPRINTS 30
|
||||||
|
|
||||||
/// "Message opened"
|
|
||||||
///
|
|
||||||
/// Used in subjects of outgoing read receipts.
|
|
||||||
///
|
|
||||||
/// @deprecated Deprecated 2024-07-26
|
|
||||||
#define DC_STR_READRCPT 31
|
|
||||||
|
|
||||||
/// "The message '%1$s' you sent was displayed on the screen of the recipient."
|
|
||||||
///
|
|
||||||
/// Used as message text of outgoing read receipts.
|
|
||||||
/// - %1$s will be replaced by the subject of the displayed message
|
|
||||||
///
|
|
||||||
/// @deprecated Deprecated 2024-06-23
|
|
||||||
#define DC_STR_READRCPT_MAILBODY 32
|
|
||||||
|
|
||||||
/// @deprecated Deprecated, this string is no longer needed.
|
|
||||||
#define DC_STR_MSGGRPIMGDELETED 33
|
|
||||||
|
|
||||||
/// "End-to-end encryption preferred."
|
|
||||||
///
|
|
||||||
/// Used to build the string returned by dc_get_contact_encrinfo().
|
|
||||||
/// @deprecated 2025-06-05
|
|
||||||
#define DC_STR_E2E_PREFERRED 34
|
|
||||||
|
|
||||||
/// "%1$s verified"
|
/// "%1$s verified"
|
||||||
///
|
///
|
||||||
/// Used in status messages.
|
/// Used in status messages.
|
||||||
/// - %1$s will be replaced by the name of the verified contact
|
/// - %1$s will be replaced by the name of the verified contact
|
||||||
#define DC_STR_CONTACT_VERIFIED 35
|
#define DC_STR_CONTACT_VERIFIED 35
|
||||||
|
|
||||||
/// "Cannot establish guaranteed end-to-end encryption with %1$s."
|
|
||||||
///
|
|
||||||
/// Used in status messages.
|
|
||||||
/// - %1$s will be replaced by the name of the contact that cannot be verified
|
|
||||||
/// @deprecated 2025-06-05
|
|
||||||
#define DC_STR_CONTACT_NOT_VERIFIED 36
|
|
||||||
|
|
||||||
/// "Changed setup for %1$s."
|
|
||||||
///
|
|
||||||
/// Used in status messages.
|
|
||||||
/// - %1$s will be replaced by the name of the contact with the changed setup
|
|
||||||
/// @deprecated 2025-06-05
|
|
||||||
#define DC_STR_CONTACT_SETUP_CHANGED 37
|
|
||||||
|
|
||||||
/// "Archived chats"
|
/// "Archived chats"
|
||||||
///
|
///
|
||||||
/// Used as the name for the corresponding chatlist entry.
|
/// Used as the name for the corresponding chatlist entry.
|
||||||
#define DC_STR_ARCHIVEDCHATS 40
|
#define DC_STR_ARCHIVEDCHATS 40
|
||||||
|
|
||||||
/// "Autocrypt Setup Message"
|
|
||||||
///
|
|
||||||
/// @deprecated 2025-04
|
|
||||||
#define DC_STR_AC_SETUP_MSG_SUBJECT 42
|
|
||||||
|
|
||||||
/// "This is the Autocrypt Setup Message, open it in a compatible client to use your setup"
|
|
||||||
///
|
|
||||||
/// @deprecated 2025-04
|
|
||||||
#define DC_STR_AC_SETUP_MSG_BODY 43
|
|
||||||
|
|
||||||
/// "Cannot login as %1$s."
|
/// "Cannot login as %1$s."
|
||||||
///
|
///
|
||||||
/// Used in error strings.
|
/// Used in error strings.
|
||||||
/// - %1$s will be replaced by the failing login name
|
/// - %1$s will be replaced by the failing login name
|
||||||
#define DC_STR_CANNOT_LOGIN 60
|
#define DC_STR_CANNOT_LOGIN 60
|
||||||
|
|
||||||
/// "%1$s by %2$s"
|
|
||||||
///
|
|
||||||
/// Used to concretize actions,
|
|
||||||
/// - %1$s will be replaced by an action
|
|
||||||
/// as #DC_STR_MSGADDMEMBER or #DC_STR_MSGGRPIMGCHANGED (full-stop removed, if any)
|
|
||||||
/// - %2$s will be replaced by the name of the user taking that action
|
|
||||||
///
|
|
||||||
/// @deprecated 2022-09-10
|
|
||||||
#define DC_STR_MSGACTIONBYUSER 62
|
|
||||||
|
|
||||||
/// "%1$s by me"
|
|
||||||
///
|
|
||||||
/// Used to concretize actions.
|
|
||||||
/// - %1$s will be replaced by an action
|
|
||||||
/// as #DC_STR_MSGADDMEMBER or #DC_STR_MSGGRPIMGCHANGED (full-stop removed, if any)
|
|
||||||
///
|
|
||||||
/// @deprecated 2022-09-10
|
|
||||||
#define DC_STR_MSGACTIONBYME 63
|
|
||||||
|
|
||||||
/// "Location streaming enabled."
|
/// "Location streaming enabled."
|
||||||
///
|
///
|
||||||
/// Used in status messages.
|
/// Used in status messages.
|
||||||
@@ -7211,13 +7082,6 @@ void dc_event_unref(dc_event_t* event);
|
|||||||
/// Used as message text for the message added to the device chat after successful login.
|
/// Used as message text for the message added to the device chat after successful login.
|
||||||
#define DC_STR_WELCOME_MESSAGE 71
|
#define DC_STR_WELCOME_MESSAGE 71
|
||||||
|
|
||||||
/// "Unknown sender for this chat. See 'info' for more details."
|
|
||||||
///
|
|
||||||
/// Use as message text if assigning the message to a chat is not totally correct.
|
|
||||||
///
|
|
||||||
/// @deprecated 2025-08-18
|
|
||||||
#define DC_STR_UNKNOWN_SENDER_FOR_CHAT 72
|
|
||||||
|
|
||||||
/// "Message from %1$s"
|
/// "Message from %1$s"
|
||||||
///
|
///
|
||||||
/// Used in subjects of outgoing messages in one-to-one chats.
|
/// Used in subjects of outgoing messages in one-to-one chats.
|
||||||
@@ -7231,53 +7095,6 @@ void dc_event_unref(dc_event_t* event);
|
|||||||
/// - %1$s will be replaced by the name of the contact the message cannot be sent to
|
/// - %1$s will be replaced by the name of the contact the message cannot be sent to
|
||||||
#define DC_STR_FAILED_SENDING_TO 74
|
#define DC_STR_FAILED_SENDING_TO 74
|
||||||
|
|
||||||
/// "Message deletion timer is disabled."
|
|
||||||
///
|
|
||||||
/// Used in status messages.
|
|
||||||
///
|
|
||||||
/// @deprecated 2022-09-10
|
|
||||||
#define DC_STR_EPHEMERAL_DISABLED 75
|
|
||||||
|
|
||||||
/// "Message deletion timer is set to %1$s s."
|
|
||||||
///
|
|
||||||
/// Used in status messages when the other constants
|
|
||||||
/// (#DC_STR_EPHEMERAL_MINUTE, #DC_STR_EPHEMERAL_HOUR and so on) do not match the timer.
|
|
||||||
/// - %1$s will be replaced by the number of seconds the timer is set to
|
|
||||||
///
|
|
||||||
/// @deprecated 2022-09-10
|
|
||||||
#define DC_STR_EPHEMERAL_SECONDS 76
|
|
||||||
|
|
||||||
/// "Message deletion timer is set to 1 minute."
|
|
||||||
///
|
|
||||||
/// Used in status messages.
|
|
||||||
///
|
|
||||||
/// @deprecated 2022-09-10
|
|
||||||
#define DC_STR_EPHEMERAL_MINUTE 77
|
|
||||||
|
|
||||||
/// "Message deletion timer is set to 1 hour."
|
|
||||||
///
|
|
||||||
/// Used in status messages.
|
|
||||||
///
|
|
||||||
/// @deprecated 2022-09-10
|
|
||||||
#define DC_STR_EPHEMERAL_HOUR 78
|
|
||||||
|
|
||||||
/// "Message deletion timer is set to 1 day."
|
|
||||||
///
|
|
||||||
/// Used in status messages.
|
|
||||||
///
|
|
||||||
/// @deprecated 2022-09-10
|
|
||||||
#define DC_STR_EPHEMERAL_DAY 79
|
|
||||||
|
|
||||||
/// "Message deletion timer is set to 1 week."
|
|
||||||
///
|
|
||||||
/// Used in status messages.
|
|
||||||
///
|
|
||||||
/// @deprecated 2022-09-10
|
|
||||||
#define DC_STR_EPHEMERAL_WEEK 80
|
|
||||||
|
|
||||||
/// @deprecated Deprecated 2021-01-30, DC_STR_EPHEMERAL_WEEKS is used instead.
|
|
||||||
#define DC_STR_EPHEMERAL_FOUR_WEEKS 81
|
|
||||||
|
|
||||||
/// "Error: %1$s"
|
/// "Error: %1$s"
|
||||||
///
|
///
|
||||||
/// Used in error strings.
|
/// Used in error strings.
|
||||||
@@ -7311,42 +7128,6 @@ void dc_event_unref(dc_event_t* event);
|
|||||||
/// Used as device message text.
|
/// Used as device message text.
|
||||||
#define DC_STR_SELF_DELETED_MSG_BODY 91
|
#define DC_STR_SELF_DELETED_MSG_BODY 91
|
||||||
|
|
||||||
/// "Message deletion timer is set to %1$s minutes."
|
|
||||||
///
|
|
||||||
/// Used in status messages.
|
|
||||||
///
|
|
||||||
/// `%1$s` will be replaced by the number of minutes (always >1) the timer is set to.
|
|
||||||
///
|
|
||||||
/// @deprecated Replaced by DC_STR_MSG_YOU_EPHEMERAL_TIMER_MINUTES and DC_STR_MSG_EPHEMERAL_TIMER_MINUTES_BY.
|
|
||||||
#define DC_STR_EPHEMERAL_MINUTES 93
|
|
||||||
|
|
||||||
/// "Message deletion timer is set to %1$s hours."
|
|
||||||
///
|
|
||||||
/// Used in status messages.
|
|
||||||
///
|
|
||||||
/// `%1$s` will be replaced by the number of hours (always >1) the timer is set to.
|
|
||||||
///
|
|
||||||
/// @deprecated Replaced by DC_STR_MSG_YOU_EPHEMERAL_TIMER_HOURS and DC_STR_MSG_EPHEMERAL_TIMER_HOURS_BY.
|
|
||||||
#define DC_STR_EPHEMERAL_HOURS 94
|
|
||||||
|
|
||||||
/// "Message deletion timer is set to %1$s days."
|
|
||||||
///
|
|
||||||
/// Used in status messages.
|
|
||||||
///
|
|
||||||
/// `%1$s` will be replaced by the number of days (always >1) the timer is set to.
|
|
||||||
///
|
|
||||||
/// @deprecated Replaced by DC_STR_MSG_YOU_EPHEMERAL_TIMER_DAYS and DC_STR_MSG_EPHEMERAL_TIMER_DAYS_BY.
|
|
||||||
#define DC_STR_EPHEMERAL_DAYS 95
|
|
||||||
|
|
||||||
/// "Message deletion timer is set to %1$s weeks."
|
|
||||||
///
|
|
||||||
/// Used in status messages.
|
|
||||||
///
|
|
||||||
/// `%1$s` will be replaced by the number of weeks (always >1) the timer is set to.
|
|
||||||
///
|
|
||||||
/// @deprecated Replaced by DC_STR_MSG_YOU_EPHEMERAL_TIMER_WEEKS and DC_STR_MSG_EPHEMERAL_TIMER_WEEKS_BY.
|
|
||||||
#define DC_STR_EPHEMERAL_WEEKS 96
|
|
||||||
|
|
||||||
/// "Forwarded"
|
/// "Forwarded"
|
||||||
///
|
///
|
||||||
/// Used in message summary text for notifications and chatlist.
|
/// Used in message summary text for notifications and chatlist.
|
||||||
@@ -7359,9 +7140,6 @@ void dc_event_unref(dc_event_t* event);
|
|||||||
/// `%1$s` will be replaced by the percentage used
|
/// `%1$s` will be replaced by the percentage used
|
||||||
#define DC_STR_QUOTA_EXCEEDING_MSG_BODY 98
|
#define DC_STR_QUOTA_EXCEEDING_MSG_BODY 98
|
||||||
|
|
||||||
/// @deprecated Deprecated 2025-11-12, this string is no longer needed.
|
|
||||||
#define DC_STR_PARTIAL_DOWNLOAD_MSG_BODY 99
|
|
||||||
|
|
||||||
/// "Multi Device Synchronization"
|
/// "Multi Device Synchronization"
|
||||||
///
|
///
|
||||||
/// Used in subjects of outgoing sync messages.
|
/// Used in subjects of outgoing sync messages.
|
||||||
@@ -7387,10 +7165,6 @@ void dc_event_unref(dc_event_t* event);
|
|||||||
/// Used as a headline in the connectivity view.
|
/// Used as a headline in the connectivity view.
|
||||||
#define DC_STR_OUTGOING_MESSAGES 104
|
#define DC_STR_OUTGOING_MESSAGES 104
|
||||||
|
|
||||||
|
|
||||||
/// @deprecated Deprecated 2022-04-16, this string is no longer needed.
|
|
||||||
#define DC_STR_ONE_MOMENT 106
|
|
||||||
|
|
||||||
/// "Connected"
|
/// "Connected"
|
||||||
///
|
///
|
||||||
/// Used as status in the connectivity view.
|
/// Used as status in the connectivity view.
|
||||||
@@ -7481,12 +7255,6 @@ void dc_event_unref(dc_event_t* event);
|
|||||||
/// Used as status in the connectivity view.
|
/// Used as status in the connectivity view.
|
||||||
#define DC_STR_NOT_CONNECTED 121
|
#define DC_STR_NOT_CONNECTED 121
|
||||||
|
|
||||||
/// "%1$s changed their address from %2$s to %3$s"
|
|
||||||
///
|
|
||||||
/// Used as an info message to chats with contacts that changed their address.
|
|
||||||
/// @deprecated 2025-06-05
|
|
||||||
#define DC_STR_AEAP_ADDR_CHANGED 122
|
|
||||||
|
|
||||||
/// "You changed group name from \"%1$s\" to \"%2$s\"."
|
/// "You changed group name from \"%1$s\" to \"%2$s\"."
|
||||||
///
|
///
|
||||||
/// `%1$s` will be replaced by the old group name.
|
/// `%1$s` will be replaced by the old group name.
|
||||||
@@ -7601,17 +7369,6 @@ void dc_event_unref(dc_event_t* event);
|
|||||||
/// Used in status messages.
|
/// Used in status messages.
|
||||||
#define DC_STR_EPHEMERAL_TIMER_SECONDS_BY_OTHER 141
|
#define DC_STR_EPHEMERAL_TIMER_SECONDS_BY_OTHER 141
|
||||||
|
|
||||||
/// "You set message deletion timer to 1 minute."
|
|
||||||
///
|
|
||||||
/// @deprecated 2025-11-14, this string is no longer needed
|
|
||||||
#define DC_STR_EPHEMERAL_TIMER_1_MINUTE_BY_YOU 142
|
|
||||||
|
|
||||||
/// "Message deletion timer is set to 1 minute by %1$s."
|
|
||||||
///
|
|
||||||
/// `%1$s` will be replaced by name of the contact.
|
|
||||||
/// @deprecated 2025-11-14, this string is no longer needed
|
|
||||||
#define DC_STR_EPHEMERAL_TIMER_1_MINUTE_BY_OTHER 143
|
|
||||||
|
|
||||||
/// "You set message deletion timer to 1 hour."
|
/// "You set message deletion timer to 1 hour."
|
||||||
///
|
///
|
||||||
/// Used in status messages.
|
/// Used in status messages.
|
||||||
@@ -7781,17 +7538,6 @@ void dc_event_unref(dc_event_t* event);
|
|||||||
/// Used as info message.
|
/// Used as info message.
|
||||||
#define DC_STR_SECUREJOIN_WAIT 190
|
#define DC_STR_SECUREJOIN_WAIT 190
|
||||||
|
|
||||||
/// "Could not yet establish guaranteed end-to-end encryption, but you may already send a message."
|
|
||||||
///
|
|
||||||
/// @deprecated 2025-03
|
|
||||||
#define DC_STR_SECUREJOIN_WAIT_TIMEOUT 191
|
|
||||||
|
|
||||||
/// "The contact must be online to proceed. This process will continue automatically in background."
|
|
||||||
///
|
|
||||||
/// Used as info message.
|
|
||||||
/// @deprecated 2025-06-05
|
|
||||||
#define DC_STR_SECUREJOIN_TAKES_LONGER 192
|
|
||||||
|
|
||||||
/// "❤️ Seems you're enjoying Delta Chat!"… (donation request device message)
|
/// "❤️ Seems you're enjoying Delta Chat!"… (donation request device message)
|
||||||
#define DC_STR_DONATION_REQUEST 193
|
#define DC_STR_DONATION_REQUEST 193
|
||||||
|
|
||||||
|
|||||||
@@ -2260,22 +2260,6 @@ pub unsafe extern "C" fn dc_get_contacts(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
|
||||||
pub unsafe extern "C" fn dc_get_blocked_cnt(context: *mut dc_context_t) -> libc::c_int {
|
|
||||||
if context.is_null() {
|
|
||||||
eprintln!("ignoring careless call to dc_get_blocked_cnt()");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
let ctx = &*context;
|
|
||||||
|
|
||||||
block_on(async move {
|
|
||||||
Contact::get_all_blocked(ctx)
|
|
||||||
.await
|
|
||||||
.unwrap_or_log_default(ctx, "failed to get blocked count")
|
|
||||||
.len() as libc::c_int
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
pub unsafe extern "C" fn dc_get_blocked_contacts(
|
pub unsafe extern "C" fn dc_get_blocked_contacts(
|
||||||
context: *mut dc_context_t,
|
context: *mut dc_context_t,
|
||||||
|
|||||||
@@ -258,9 +258,6 @@ class TestOfflineChat:
|
|||||||
with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
ac1.set_stock_translation(dc.const.DC_STR_FILE, "xyz %1$s")
|
ac1.set_stock_translation(dc.const.DC_STR_FILE, "xyz %1$s")
|
||||||
ac1._evtracker.get_matching("DC_EVENT_WARNING")
|
ac1._evtracker.get_matching("DC_EVENT_WARNING")
|
||||||
with pytest.raises(ValueError):
|
|
||||||
ac1.set_stock_translation(dc.const.DC_STR_CONTACT_NOT_VERIFIED, "xyz %2$s")
|
|
||||||
ac1._evtracker.get_matching("DC_EVENT_WARNING")
|
|
||||||
with pytest.raises(ValueError):
|
with pytest.raises(ValueError):
|
||||||
ac1.set_stock_translation(500, "xyz %1$s")
|
ac1.set_stock_translation(500, "xyz %1$s")
|
||||||
ac1._evtracker.get_matching("DC_EVENT_WARNING")
|
ac1._evtracker.get_matching("DC_EVENT_WARNING")
|
||||||
|
|||||||
@@ -1299,18 +1299,6 @@ WHERE addr=?
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns number of blocked contacts.
|
|
||||||
pub async fn get_blocked_cnt(context: &Context) -> Result<usize> {
|
|
||||||
let count = context
|
|
||||||
.sql
|
|
||||||
.count(
|
|
||||||
"SELECT COUNT(*) FROM contacts WHERE id>? AND blocked!=0",
|
|
||||||
(ContactId::LAST_SPECIAL,),
|
|
||||||
)
|
|
||||||
.await?;
|
|
||||||
Ok(count)
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Get blocked contacts.
|
/// Get blocked contacts.
|
||||||
pub async fn get_all_blocked(context: &Context) -> Result<Vec<ContactId>> {
|
pub async fn get_all_blocked(context: &Context) -> Result<Vec<ContactId>> {
|
||||||
Contact::update_blocked_mailinglist_contacts(context)
|
Contact::update_blocked_mailinglist_contacts(context)
|
||||||
|
|||||||
Reference in New Issue
Block a user