fix: Make pre-messages w/o text want MDNs (#8004)#8008
fix: Make pre-messages w/o text want MDNs (#8004)#8008
Conversation
4fdd476 to
9afce7d
Compare
|
I made a bug in the test -- bob doesn't accept the chat -- and this looks suspicious to me: Why is bob's self-MDN being processed after the decryption failure? It should go to the trash just because of that and no message should be tried to be added. |
9afce7d to
d3370d5
Compare
|
|
||
| pub async fn pop_sent_msg_opt(&self, timeout: Duration) -> Option<SentMessage<'_>> { | ||
| let from_head = self | ||
| .get_config_bool(Config::PopSentMsgFromHead) |
There was a problem hiding this comment.
Can we instead have a new function shift_sent_msg_opt that does this and not a global config that is only used for tests? Otherwise we will have to add this config to all tests over time.
There was a problem hiding this comment.
Otherwise we will have to add this config to all tests over time.
Why? Only to those where sending messages from head is needed to reproduce some regression. Anyway, do you mean adding a function that moves an smtp job from head to tail?
There was a problem hiding this comment.
I mean creating a function shift_sent_msg_opt that takes message from the beginning of the queue rather than the end, so we can use it in new tests.
There was a problem hiding this comment.
The first i wanted to do is to create unqueue_sent_msg_opt() which does the same as pop_sent_msg_opt(), but takes the first queued message. But there are other functions calling pop_sent_msg_opt(), so we should forward some flag everywhere. E.g. in the new test it's send_msg() returning SentMessage. Note sure you mean the same, what does shift_ mean? Anyway, i'd avoid adding a flag everywhere, better we add a new Config key or some flag (maybe one-shot) to Context.
I also don't expect many tests needing this, so a config key doesn't look like a problem.
There was a problem hiding this comment.
Also it appeared that not the sending order is a problem, but absence of message text, so i can drop this part at all. But as it's already done, maybe let it remain?
…ssage state to OutMdnRcvd (#8004)
d3370d5 to
d2f33f5
Compare
This fixes the failing `test_pre_msg_mdn_before_sending_full`. Maybe it's even good that MDNs will be sent for pre-messages only having placeholder text with the viewtype and size, at least this way we notify the contact that we've noticed the message. Anyway, with adding message previews the problem will be solved for the corresponding viewtypes.
9a4b1ed to
40058de
Compare
This fixes failing
test_pre_msg_mdn_before_sending_full. Maybe it's even good that MDNs willbe sent for pre-messages only having placeholder text with the viewtype and size, at least this way
we notify the contact that we've noticed the message. Anyway, with adding message previews the
problem will be solved for the corresponding viewtypes.
Fix #8004