diff --git a/python/tests/test_increation.py b/python/tests/test_increation.py index b5c8a33b..095a9592 100644 --- a/python/tests/test_increation.py +++ b/python/tests/test_increation.py @@ -25,6 +25,7 @@ class TestInCreation: open(path, 'a').close() prepared_original = chat.prepare_file(path) assert prepared_original.get_state().is_out_preparing() + wait_msgs_changed(ac1, chat.id, prepared_original.id) lp.sec("forward the message while still in creation") chat2 = ac1.create_group_chat("newgroup") diff --git a/src/dc_chat.c b/src/dc_chat.c index 4d2b9b3f..4bd77b74 100644 --- a/src/dc_chat.c +++ b/src/dc_chat.c @@ -2533,7 +2533,11 @@ uint32_t dc_prepare_msg(dc_context_t* context, uint32_t chat_id, dc_msg_t* msg) } msg->state = DC_STATE_OUT_PREPARING; - return prepare_msg_common(context, chat_id, msg); + uint32_t msg_id = prepare_msg_common(context, chat_id, msg); + + context->cb(context, DC_EVENT_MSGS_CHANGED, msg->chat_id, msg->id); + + return msg_id; } /**