mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Add revoke remote wipe method
This commit is contained in:
@@ -47,6 +47,8 @@ public interface RemoteWipeManager extends ConversationManager.ConversationClien
|
||||
|
||||
boolean amWiper(Transaction txn, ContactId contactId);
|
||||
|
||||
boolean isWiper(Transaction txn, ContactId contactId);
|
||||
|
||||
void revoke(Transaction txn, ContactId contactId)
|
||||
throws DbException, FormatException;
|
||||
|
||||
|
||||
@@ -318,16 +318,20 @@ public class RemoteWipeManagerImpl extends ConversationClientImpl
|
||||
messageTracker.trackOutgoingMessage(txn, m);
|
||||
}
|
||||
|
||||
private boolean isWiper(Transaction txn, ContactId contactId)
|
||||
throws DbException {
|
||||
Author author = contactManager.getContact(txn, contactId).getAuthor();
|
||||
List<Author> currentWipers = getWipers(txn);
|
||||
for (Author a : currentWipers) {
|
||||
if (a.getId().equals(author.getId())) {
|
||||
return true;
|
||||
public boolean isWiper(Transaction txn, ContactId contactId) {
|
||||
try {
|
||||
Author author =
|
||||
contactManager.getContact(txn, contactId).getAuthor();
|
||||
List<Author> currentWipers = getWipers(txn);
|
||||
for (Author a : currentWipers) {
|
||||
if (a.getId().equals(author.getId())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
} catch (DbException e) {
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean amWiper(Transaction txn, ContactId contactId) {
|
||||
|
||||
Reference in New Issue
Block a user