mirror of
https://github.com/chatmail/core.git
synced 2026-05-16 21:36:30 +03:00
fix: raise lower auto-download limit to 160k
This commit is contained in:
@@ -367,7 +367,7 @@ def test_webxdc_download_on_demand(acfactory, data, lp):
|
|||||||
|
|
||||||
lp.sec("ac2 sets download limit")
|
lp.sec("ac2 sets download limit")
|
||||||
ac2.set_config("download_limit", "100")
|
ac2.set_config("download_limit", "100")
|
||||||
assert msg1.send_status_update({"payload": base64.b64encode(os.urandom(50000))}, "some test data")
|
assert msg1.send_status_update({"payload": base64.b64encode(os.urandom(300000))}, "some test data")
|
||||||
ac2_update = ac2._evtracker.wait_next_incoming_message()
|
ac2_update = ac2._evtracker.wait_next_incoming_message()
|
||||||
assert ac2_update.download_state == dc.const.DC_DOWNLOAD_AVAILABLE
|
assert ac2_update.download_state == dc.const.DC_DOWNLOAD_AVAILABLE
|
||||||
assert not msg2.get_status_updates()
|
assert not msg2.get_status_updates()
|
||||||
@@ -1445,7 +1445,7 @@ def test_reaction_to_partially_fetched_msg(acfactory, lp, tmp_path):
|
|||||||
message, then processes a partially downloaded message.
|
message, then processes a partially downloaded message.
|
||||||
- As a result, Bob does not see a reaction
|
- As a result, Bob does not see a reaction
|
||||||
"""
|
"""
|
||||||
download_limit = 32768
|
download_limit = 300000
|
||||||
ac1, ac2 = acfactory.get_online_accounts(2)
|
ac1, ac2 = acfactory.get_online_accounts(2)
|
||||||
ac1_addr = ac1.get_config("addr")
|
ac1_addr = ac1.get_config("addr")
|
||||||
chat = ac1.create_chat(ac2)
|
chat = ac1.create_chat(ac2)
|
||||||
|
|||||||
@@ -18,12 +18,11 @@ use crate::{stock_str, EventType};
|
|||||||
|
|
||||||
/// Download limits should not be used below `MIN_DOWNLOAD_LIMIT`.
|
/// Download limits should not be used below `MIN_DOWNLOAD_LIMIT`.
|
||||||
///
|
///
|
||||||
/// Some messages as non-delivery-reports (NDN) or read-receipts (MDN)
|
/// For better UX, some messages as add-member, non-delivery-reports (NDN) or read-receipts (MDN)
|
||||||
/// need to be downloaded completely to handle them correctly,
|
/// should always be downloaded completely to handle them correctly,
|
||||||
/// eg. to assign them to the correct chat.
|
/// also in larger groups and if group and contact avatar are attached.
|
||||||
/// As these messages are typically small,
|
/// Most of these cases are caught by `MIN_DOWNLOAD_LIMIT`.
|
||||||
/// they're caught by `MIN_DOWNLOAD_LIMIT`.
|
pub(crate) const MIN_DOWNLOAD_LIMIT: u32 = 163840;
|
||||||
pub(crate) const MIN_DOWNLOAD_LIMIT: u32 = 32768;
|
|
||||||
|
|
||||||
/// If a message is downloaded only partially
|
/// If a message is downloaded only partially
|
||||||
/// and `delete_server_after` is set to small timeouts (eg. "at once"),
|
/// and `delete_server_after` is set to small timeouts (eg. "at once"),
|
||||||
|
|||||||
Reference in New Issue
Block a user