Bugs when adding and removing the same contact more than once
The ConversationModule::removeContact function currently loops over all 1:1 conversations with the contact it's trying to remove and, for each of them:
- sets its
removedtimestamp to the current time; - sends a
ConversationRemovedsignal to the client.
However, if the contact had been removed and then re-added at least once in the past, then its list of 1:1 conversations will include conversations that have already been removed; for these conversations, doing 1. is incorrect and doing 2. is unnecessary.