Fix remove recipient method

Fixes #1183
This commit is contained in:
AsamK 2023-02-19 14:20:39 +01:00
parent f97543eecd
commit 91e0db185c

View file

@ -415,9 +415,9 @@ public class SignalAccount implements Closeable {
}
public void removeRecipient(final RecipientId recipientId) {
final var recipientAddress = getRecipientStore().resolveRecipientAddress(recipientId);
getRecipientStore().deleteRecipientData(recipientId);
getMessageCache().deleteMessages(recipientId);
final var recipientAddress = getRecipientStore().resolveRecipientAddress(recipientId);
if (recipientAddress.serviceId().isPresent()) {
final var serviceId = recipientAddress.serviceId().get();
getAciSessionStore().deleteAllSessions(serviceId);