Support the "BCC self" option

This commit is contained in:
2021-01-10 18:08:22 +00:00
parent 83488c31fe
commit 4484f51c5d
3 changed files with 18 additions and 0 deletions

View File

@@ -32,6 +32,8 @@ _transpose_config(dc_context_t *mailbox, PurpleAccount *acct)
const char *smtp_pass = purple_account_get_string(acct, PLUGIN_ACCOUNT_OPT_SMTP_PASS, NULL);
const char *smtp_port = purple_account_get_string(acct, PLUGIN_ACCOUNT_OPT_SMTP_SERVER_PORT, NULL);
gboolean bcc_self = purple_account_get_bool(acct, PLUGIN_ACCOUNT_OPT_BCC_SELF, FALSE);
dc_set_config(mailbox, PLUGIN_ACCOUNT_OPT_ADDR, addr);
dc_set_config(mailbox, PLUGIN_ACCOUNT_OPT_DISPLAY_NAME, display);
@@ -44,6 +46,12 @@ _transpose_config(dc_context_t *mailbox, PurpleAccount *acct)
dc_set_config(mailbox, PLUGIN_ACCOUNT_OPT_SMTP_USER, smtp_user);
dc_set_config(mailbox, PLUGIN_ACCOUNT_OPT_SMTP_PASS, smtp_pass);
dc_set_config(mailbox, PLUGIN_ACCOUNT_OPT_SMTP_SERVER_PORT, smtp_port);
if (bcc_self) {
dc_set_config(mailbox, PLUGIN_ACCOUNT_OPT_BCC_SELF, "1");
} else {
dc_set_config(mailbox, PLUGIN_ACCOUNT_OPT_BCC_SELF, "0");
};
}
typedef struct {