Remove group from database in PrivateGroupManager

This commit is contained in:
Torsten Grote
2016-10-26 18:19:02 -02:00
parent a18317e912
commit b0a5a69b81

View File

@@ -138,12 +138,13 @@ public class PrivateGroupManagerImpl extends BdfIncomingMessageHook implements
@Override @Override
public void removePrivateGroup(GroupId g) throws DbException { public void removePrivateGroup(GroupId g) throws DbException {
// TODO
Transaction txn = db.startTransaction(false); Transaction txn = db.startTransaction(false);
try { try {
for (PrivateGroupHook hook : hooks) { for (PrivateGroupHook hook : hooks) {
hook.removingGroup(txn, g); hook.removingGroup(txn, g);
} }
Group group = db.getGroup(txn, g);
db.removeGroup(txn, group);
txn.setComplete(); txn.setComplete();
} finally { } finally {
db.endTransaction(txn); db.endTransaction(txn);