mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 13:19:52 +01:00
Implement deleteMessages in RemoteWipeManagerImpl
This commit is contained in:
@@ -373,15 +373,23 @@ public class RemoteWipeManagerImpl extends ConversationClientImpl
|
|||||||
@Override
|
@Override
|
||||||
public DeletionResult deleteAllMessages(Transaction txn, ContactId c)
|
public DeletionResult deleteAllMessages(Transaction txn, ContactId c)
|
||||||
throws DbException {
|
throws DbException {
|
||||||
DeletionResult result = new DeletionResult();
|
GroupId g = getContactGroup(db.getContact(txn, c)).getId();
|
||||||
return result;
|
for (MessageId messageId : db.getMessageIds(txn, g)) {
|
||||||
|
db.deleteMessage(txn, messageId);
|
||||||
|
db.deleteMessageMetadata(txn, messageId);
|
||||||
|
}
|
||||||
|
messageTracker.initializeGroupCount(txn, g);
|
||||||
|
return new DeletionResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DeletionResult deleteMessages(Transaction txn, ContactId c,
|
public DeletionResult deleteMessages(Transaction txn, ContactId c,
|
||||||
Set<MessageId> messageIds) throws DbException {
|
Set<MessageId> messageIds) throws DbException {
|
||||||
DeletionResult result = new DeletionResult();
|
for (MessageId m : messageIds) {
|
||||||
return result;
|
db.deleteMessage(txn, m);
|
||||||
|
db.deleteMessageMetadata(txn, m);
|
||||||
|
}
|
||||||
|
return new DeletionResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
private ContactId getContactId(Transaction txn, GroupId g)
|
private ContactId getContactId(Transaction txn, GroupId g)
|
||||||
|
|||||||
Reference in New Issue
Block a user