[core] Add method to ConversationClient for deleting a set of messages

This also implements the method for MessagingManager
(including integration tests) and adds no-op implementations for other
clients.
This commit is contained in:
Torsten Grote
2019-10-21 16:23:55 -03:00
parent 190a6bff96
commit 124e2f99b0
8 changed files with 370 additions and 1 deletions

View File

@@ -72,6 +72,17 @@ public interface ConversationManager {
*/
boolean deleteAllMessages(Transaction txn,
ContactId c) throws DbException;
/**
* Deletes the given set of messages associated with the given contact.
* <p>
* The set of message IDs must only include message IDs returned by
* {@link #getMessageIds}.
*
* @return true if all messages could be deleted, false otherwise
*/
boolean deleteMessages(Transaction txn, ContactId c,
Set<MessageId> messageIds) throws DbException;
}
}