mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +01:00
Private group invitation protocol.
This commit is contained in:
@@ -10,11 +10,17 @@ import org.briarproject.android.sharing.ContactSelectorFragment;
|
||||
import org.briarproject.api.contact.Contact;
|
||||
import org.briarproject.api.db.DatabaseExecutor;
|
||||
import org.briarproject.api.db.DbException;
|
||||
import org.briarproject.api.privategroup.invitation.GroupInvitationManager;
|
||||
import org.briarproject.api.sync.GroupId;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
public class GroupInviteActivity extends BaseGroupInviteActivity
|
||||
implements MessageFragmentListener {
|
||||
|
||||
@Inject
|
||||
GroupInvitationManager groupInvitationManager;
|
||||
|
||||
@Override
|
||||
public void injectActivity(ActivityComponent component) {
|
||||
component.inject(this);
|
||||
@@ -42,9 +48,8 @@ public class GroupInviteActivity extends BaseGroupInviteActivity
|
||||
|
||||
@Override
|
||||
@DatabaseExecutor
|
||||
public boolean isDisabled(GroupId groupId, Contact c) throws DbException {
|
||||
// TODO disable contacts that can not be invited
|
||||
return false;
|
||||
public boolean isDisabled(GroupId g, Contact c) throws DbException {
|
||||
return !groupInvitationManager.isInvitationAllowed(c, g);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user