Skip to content

Commit

Permalink
Only admin can cancel any invite.
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-signal authored and greyson-signal committed May 29, 2020
1 parent 297a7d0 commit 67a8ec0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Expand Up @@ -56,13 +56,13 @@ private void setMembers(PendingMemberRepository.InviteeResult inviteeResult) {
for (PendingMemberRepository.SinglePendingMemberInvitedByYou pendingMember : inviteeResult.getByMe()) {
byMe.add(new GroupMemberEntry.PendingMember(pendingMember.getInvitee(),
pendingMember.getInviteeCipherText(),
true));
inviteeResult.isCanCancelInvites()));
}

for (PendingMemberRepository.MultiplePendingMembersInvitedByAnother pendingMembers : inviteeResult.getByOthers()) {
byOthers.add(new GroupMemberEntry.UnknownPendingMemberCount(pendingMembers.getInviter(),
pendingMembers.getUuidCipherTexts(),
inviteeResult.isCanCancelOthersInvites()));
inviteeResult.isCanCancelInvites()));
}

setInvitees(byMe, byOthers);
Expand Down
Expand Up @@ -114,15 +114,15 @@ boolean cancelInvites(@NonNull Collection<UuidCiphertext> uuidCipherTexts) {
public static final class InviteeResult {
private final List<SinglePendingMemberInvitedByYou> byMe;
private final List<MultiplePendingMembersInvitedByAnother> byOthers;
private final boolean canCancelOthersInvites;
private final boolean canCancelInvites;

private InviteeResult(List<SinglePendingMemberInvitedByYou> byMe,
List<MultiplePendingMembersInvitedByAnother> byOthers,
boolean canCancelOthersInvites)
boolean canCancelInvites)
{
this.byMe = byMe;
this.byOthers = byOthers;
this.canCancelOthersInvites = canCancelOthersInvites;
this.byMe = byMe;
this.byOthers = byOthers;
this.canCancelInvites = canCancelInvites;
}

public List<SinglePendingMemberInvitedByYou> getByMe() {
Expand All @@ -133,8 +133,8 @@ public List<MultiplePendingMembersInvitedByAnother> getByOthers() {
return byOthers;
}

public boolean isCanCancelOthersInvites() {
return canCancelOthersInvites;
public boolean isCanCancelInvites() {
return canCancelInvites;
}
}

Expand Down

0 comments on commit 67a8ec0

Please sign in to comment.