summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/src/meshbay_node/daemon.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-20 18:56:58 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-20 18:56:58 +0200
commit375ad7d0435a176ad593a32045a5f0182a36d505 (patch)
tree87dc2e5c5398cd2f5c5008160d259e97749b4efa /packages/meshbay-node/src/meshbay_node/daemon.py
parentbe50f1442148c21cabf039abdcae5fe20bc690e8 (diff)
downloadmeshbay-375ad7d0435a176ad593a32045a5f0182a36d505.tar.gz
fix: removing someone who never redeemed their invitation
A member row appears only when a code is consumed, so revoking someone invited to the wrong group was refused for having no row — and the node's refusal aborted the browser's removal before its hub half, leaving them a member everywhere with a live code. Revoking now cancels unredeemed codes for that group, and a node refusal no longer cancels the hub removal. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/daemon.py')
-rw-r--r--packages/meshbay-node/src/meshbay_node/daemon.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/daemon.py b/packages/meshbay-node/src/meshbay_node/daemon.py
index bb50bcf..c16e49f 100644
--- a/packages/meshbay-node/src/meshbay_node/daemon.py
+++ b/packages/meshbay-node/src/meshbay_node/daemon.py
@@ -2409,9 +2409,17 @@ def main() -> None:
cfg, f"/api/members/{match['user_id']}/revoke?group_id={group_id}",
method="POST")
print(f"{args.target} revoked from {group_id[:8]}")
- print("They stop receiving the group key on their next connection.")
- print("They still hold the current one — rotate it:")
- print(f" meshbay-node gek-init --group {group_id}")
+ if out.get("invites_dropped"):
+ print("Their unredeemed invitation was cancelled.")
+ # The node decides whether a rotation is warranted and says so in
+ # the reminder — somebody who never redeemed a code never held the
+ # key, and advising a rotation there is advice to ignore the next
+ # time it is real. Deciding it again here is the second
+ # implementation this file exists not to have.
+ if out.get("reminder"):
+ print("They stop receiving the group key on their next connection.")
+ print("They still hold the current one — rotate it:")
+ print(f" meshbay-node gek-init --group {group_id}")
return
if sub == "unpin":