1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-04 10:19:16 +02:00

Issue #427: avoid late generation of mime-structure

MIME mails for both messages and MDNs are stored in the blobdir.
There are still two job types due to their different priorities, but
they are processed by the same function now (dc_job_do_DC_JOB_SEND).
This commit is contained in:
VP- 2019-03-04 16:59:58 +01:00
parent 5191b77165
commit 22ebb26843
9 changed files with 195 additions and 78 deletions

View file

@ -184,7 +184,7 @@ class Chat(object):
msg_id = lib.dc_send_msg(self._dc_context, 0, message._dc_msg)
if msg_id == 0:
raise ValueError("message could not be sent")
return message.from_db(self._dc_context, msg_id)
return Message.from_db(self._dc_context, msg_id)
def get_messages(self):
""" return list of messages in this chat.

View file

@ -39,12 +39,14 @@ class TestInCreation:
shutil.copy(data.get_path("d.png"), path)
sent_original = chat.send_prepared(prepared_original)
assert sent_original.id == prepared_original.id
assert sent_original.get_state().is_out_pending()
state = sent_original.get_state()
assert state.is_out_pending() or state.is_out_delivered()
wait_msgs_changed(ac1, chat.id, sent_original.id)
lp.sec("expect the forwarded message to be sent now too")
wait_msgs_changed(ac1, chat2.id, forwarded_id)
assert ac1.get_message_by_id(forwarded_id).get_state().is_out_pending()
state = ac1.get_message_by_id(forwarded_id).get_state()
assert state.is_out_pending() or state.is_out_delivered()
lp.sec("wait for the messages to be delivered to SMTP")
ev = ac1._evlogger.get_matching("DC_EVENT_MSG_DELIVERED")