From 4e21917c0e8bb250ff74bd213ee290210b4e2f81 Mon Sep 17 00:00:00 2001 From: link2xt Date: Thu, 2 Nov 2023 12:47:32 +0000 Subject: [PATCH] feat: enable sync messages by default --- deltachat-jsonrpc/typescript/test/basic.ts | 3 +++ python/src/deltachat/testplugin.py | 1 + src/config.rs | 2 +- src/test_utils.rs | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/deltachat-jsonrpc/typescript/test/basic.ts b/deltachat-jsonrpc/typescript/test/basic.ts index 1c430f3f5..d5ce57aec 100644 --- a/deltachat-jsonrpc/typescript/test/basic.ts +++ b/deltachat-jsonrpc/typescript/test/basic.ts @@ -79,6 +79,9 @@ describe("basic tests", () => { accountId = await dc.rpc.addAccount(); }); it("should block and unblock contact", async function () { + // Cannot send sync messages to self as we do not have a self address. + await dc.rpc.setConfig(accountId, "sync_msgs", "0"); + const contactId = await dc.rpc.createContact( accountId, "example@delta.chat", diff --git a/python/src/deltachat/testplugin.py b/python/src/deltachat/testplugin.py index 13904913b..f0c3a6546 100644 --- a/python/src/deltachat/testplugin.py +++ b/python/src/deltachat/testplugin.py @@ -546,6 +546,7 @@ class ACFactory: configdict.setdefault("bcc_self", False) configdict.setdefault("mvbox_move", False) configdict.setdefault("sentbox_watch", False) + configdict.setdefault("sync_msgs", False) ac.update_config(configdict) self._preconfigure_key(ac, configdict["addr"]) return ac diff --git a/src/config.rs b/src/config.rs index 1440b381d..53fed8338 100644 --- a/src/config.rs +++ b/src/config.rs @@ -302,7 +302,7 @@ pub enum Config { DownloadLimit, /// Enable sending and executing (applying) sync messages. Sending requires `BccSelf` to be set. - #[strum(props(default = "0"))] + #[strum(props(default = "1"))] SyncMsgs, /// Space-separated list of all the authserv-ids which we believe diff --git a/src/test_utils.rs b/src/test_utils.rs index 3807a25cb..a3011a142 100644 --- a/src/test_utils.rs +++ b/src/test_utils.rs @@ -377,6 +377,7 @@ impl TestContext { ctx.set_config(Config::SkipStartMessages, Some("1")) .await .unwrap(); + ctx.set_config(Config::SyncMsgs, Some("0")).await.unwrap(); Self { ctx,