Skip to content

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:

  1. sets its removed timestamp to the current time;
  2. sends a ConversationRemoved signal 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.