Skip to content

Commit

Permalink
Allow for group member to join group in rotation if they already have…
Browse files Browse the repository at this point in the history
… an updated version of the KEL with a valid event that adds them as a member. (#562)
  • Loading branch information
pfeairheller authored Aug 27, 2023
1 parent 5315279 commit f7df7fb
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/keri/app/cli/commands/multisig/join.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,12 +225,6 @@ def rotate(self, attrs):
serder = coring.Serder(ked=ked)
seqner = coring.Seqner(sn=serder.sn)

if serder.sner.num <= kever.sner.num:
print(f"Discarding stale rotation event for AID {gid} to sequence number {serder.sner.num}")
return True # return True here so event is deleted, we will never process this event
elif serder.sner.num != kever.sner.num + 1:
print(f"Unable to joid {gid}, current KEL out of date")

if gid not in self.hby.habs:
print(f"\nRequest to add local AID '{mhab.name}' to multisig AID {gid} in rotation to {serder.sner.num}:")
self.showEvent(mhab, both, ked)
Expand All @@ -254,6 +248,13 @@ def rotate(self, attrs):
ghab.inited = True
self.hby.habs[ghab.pre] = ghab

if serder.sner.num <= kever.sner.num:
print(f"Caught up to existing rotation event for AID {gid} to sequence number {serder.sner.num}")
return True # return True here so event is deleted, we will never process this event
elif serder.sner.num != kever.sner.num + 1:
print(f"Unable to joid {gid}, current KEL out of date")
return False

local = False

else:
Expand Down

0 comments on commit f7df7fb

Please sign in to comment.