mirror of
https://github.com/chatmail/core.git
synced 2026-04-17 21:46:35 +03:00
fix: do not log error if watched folder is not configured
This may happen if Sent folder does not exist but configuration option to watch it is enabled.
This commit is contained in:
@@ -381,7 +381,7 @@ def test_webxdc_download_on_demand(acfactory, data, lp):
|
|||||||
assert msgs_changed_event.data1 == msg2.chat.id
|
assert msgs_changed_event.data1 == msg2.chat.id
|
||||||
assert msgs_changed_event.data2 == 0
|
assert msgs_changed_event.data2 == 0
|
||||||
|
|
||||||
@pytest.mark.xfail(reason="Test server has no sentbox folder")
|
|
||||||
def test_mvbox_sentbox_threads(acfactory, lp):
|
def test_mvbox_sentbox_threads(acfactory, lp):
|
||||||
lp.sec("ac1: start with mvbox thread")
|
lp.sec("ac1: start with mvbox thread")
|
||||||
ac1 = acfactory.new_online_configuring_account(mvbox_move=True, sentbox_watch=True)
|
ac1 = acfactory.new_online_configuring_account(mvbox_move=True, sentbox_watch=True)
|
||||||
|
|||||||
@@ -520,7 +520,10 @@ async fn fetch_idle(ctx: &Context, connection: &mut Imap, folder_meaning: Folder
|
|||||||
let (folder_config, watch_folder) = match convert_folder_meaning(ctx, folder_meaning).await {
|
let (folder_config, watch_folder) = match convert_folder_meaning(ctx, folder_meaning).await {
|
||||||
Ok(meaning) => meaning,
|
Ok(meaning) => meaning,
|
||||||
Err(error) => {
|
Err(error) => {
|
||||||
error!(ctx, "Error converting IMAP Folder name: {:?}", error);
|
// Warning instead of error because the folder may not be configured.
|
||||||
|
// For example, this happens if the server does not have Sent folder
|
||||||
|
// but watching Sent folder is enabled.
|
||||||
|
warn!(ctx, "Error converting IMAP Folder name: {:?}", error);
|
||||||
connection.connectivity.set_not_configured(ctx).await;
|
connection.connectivity.set_not_configured(ctx).await;
|
||||||
connection
|
connection
|
||||||
.fake_idle(ctx, None, FolderMeaning::Unknown)
|
.fake_idle(ctx, None, FolderMeaning::Unknown)
|
||||||
|
|||||||
Reference in New Issue
Block a user