mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 05:09:53 +01:00
Revoke all wipers method
This commit is contained in:
@@ -400,9 +400,7 @@ public class RemoteWipeManagerImpl extends ConversationClientImpl
|
||||
BdfDictionary meta = clientHelper.getGroupMetadataAsDictionary(txn,
|
||||
localGroup.getId());
|
||||
return meta.getBoolean(GROUP_KEY_AM_WIPER, false);
|
||||
} catch (DbException e) {
|
||||
return false;
|
||||
} catch (FormatException e) {
|
||||
} catch (DbException | FormatException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -434,6 +432,21 @@ public class RemoteWipeManagerImpl extends ConversationClientImpl
|
||||
}
|
||||
}
|
||||
|
||||
public void revokeAll(Transaction txn) throws DbException, FormatException {
|
||||
List<ContactId> currentWipers = getWiperContactIds(txn);
|
||||
for (ContactId c : currentWipers) {
|
||||
sendRevokeMessage(txn, db.getContact(txn, c));
|
||||
}
|
||||
|
||||
BdfList noWipers = new BdfList();
|
||||
BdfDictionary meta = new BdfDictionary();
|
||||
meta.put(GROUP_KEY_WIPERS, noWipers);
|
||||
|
||||
if (!db.containsGroup(txn, localGroup.getId()))
|
||||
db.addGroup(txn, localGroup);
|
||||
clientHelper.mergeGroupMetadata(txn, localGroup.getId(), meta);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Group getContactGroup(Contact c) {
|
||||
return contactGroupFactory.createContactGroup(CLIENT_ID,
|
||||
|
||||
Reference in New Issue
Block a user