Type: Bug
Summary: A has 1-1 chat with B. A deletes chat with B. A starts new chat with B by opening B from Contacts and sending new message "New after delete". For B new message is shown in the beginning of 1-1 chat instead of being shown at the end.
Issue demonstrates itself in the same way as in #1051 and #1015

New message is shown at the end of conversation in 1-1 chat
New message is shown as a second message in the beginning of 1-1 chat
I can reproduce it as described in case we have syncing very slow, so the very first message from A to B is "pending" and appears in the end of the chat later
@asemiankevich At what time in that video does this happen?
@oskarth I 've seen it today less then hour ago on 0.9.8-114-g243cb7de+ branch, right after this syncing became slow again.
@asemiankevich I mean the linked video is almost 40 minutes long, at what timestamp does the problem occur?
@oskarth gosh))) sorry for that) it is the first 5 minutes)
@asemiankevich thanks, will have a look
@asemiankevich The sequence of events in the video in first 3 minutes isn't clear to me, it seems like it is all happening on a different phone not recorded? Could you write down what action what account is taking in what order? Thanks
@oskarth yeah sure
@asemiankevich Unable to reproduce the original issue on this branch. I suspect this has something to do with: (notice the message status is stuck on "sending" As far as I can tell from the issue description this is a separate issue.
Would you mind trying to reproduce again when there are no weird pending message issues? The related PR should be merged into develop soon, which might introduce related fixes that makes the pending message / syncing more stable.
If you are unable to reproduce the original issue I think we should open a new issue, since, if I understand it correctly, the problem might not have anything to do with "deleting" messages but just a pending message being resent after another message? It'd be great to get a minimal case on that one, since I suspect it has something to do with the order we retry sending messages. I don't know how to simulate the bad pending message, though.
If you are able to reproduce the original issue again without the pending message thing, we'll have to debug further to see what is different in our setups.
@oskarth yeah, I will open separate issue for this Pending messages. Need to test and dig more into it as I can't reproduce it now. The original PR can be merged as planned