mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 14:49:53 +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 amWiper(Transaction txn, ContactId contactId);
|
||||||
|
|
||||||
|
boolean isWiper(Transaction txn, ContactId contactId);
|
||||||
|
|
||||||
void revoke(Transaction txn, ContactId contactId)
|
void revoke(Transaction txn, ContactId contactId)
|
||||||
throws DbException, FormatException;
|
throws DbException, FormatException;
|
||||||
|
|
||||||
|
|||||||
@@ -318,16 +318,20 @@ public class RemoteWipeManagerImpl extends ConversationClientImpl
|
|||||||
messageTracker.trackOutgoingMessage(txn, m);
|
messageTracker.trackOutgoingMessage(txn, m);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isWiper(Transaction txn, ContactId contactId)
|
public boolean isWiper(Transaction txn, ContactId contactId) {
|
||||||
throws DbException {
|
try {
|
||||||
Author author = contactManager.getContact(txn, contactId).getAuthor();
|
Author author =
|
||||||
List<Author> currentWipers = getWipers(txn);
|
contactManager.getContact(txn, contactId).getAuthor();
|
||||||
for (Author a : currentWipers) {
|
List<Author> currentWipers = getWipers(txn);
|
||||||
if (a.getId().equals(author.getId())) {
|
for (Author a : currentWipers) {
|
||||||
return true;
|
if (a.getId().equals(author.getId())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
} catch (DbException e) {
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean amWiper(Transaction txn, ContactId contactId) {
|
public boolean amWiper(Transaction txn, ContactId contactId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user