aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/src/meshbay_node/transport/webrtc/group_ops.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/transport/webrtc/group_ops.py')
-rw-r--r--packages/meshbay-node/src/meshbay_node/transport/webrtc/group_ops.py22
1 files changed, 7 insertions, 15 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/transport/webrtc/group_ops.py b/packages/meshbay-node/src/meshbay_node/transport/webrtc/group_ops.py
index 5f5f9ed..3756eac 100644
--- a/packages/meshbay-node/src/meshbay_node/transport/webrtc/group_ops.py
+++ b/packages/meshbay-node/src/meshbay_node/transport/webrtc/group_ops.py
@@ -113,8 +113,9 @@ class GroupOpsMixin:
self._audit("admin_auth_failed", f"member_unpin:{user_id[:8]}")
return
try:
+ # The new chat epochs and the closed sessions are the op's own
+ # (`ops.members._after_removal`), for every door alike.
await self._run_op(ops.unpin_member, user_id)
- await self._new_chat_epoch(self._group_id or "", "member_unpin")
except ops.OpError as e:
self._send({"type": "error", "detail": e.message})
return
@@ -331,26 +332,17 @@ class GroupOpsMixin:
return
try:
+ # The op opens the new chat epoch and closes every connection the
+ # account holds in this group (`ops.members._after_removal`), for
+ # the loopback API and the CLI as much as for this door. They keep
+ # the key they already unwrapped; rotating it is the operator's
+ # call, and the ack says so.
result = await self._run_op(
ops.revoke_member, user_id, self._group_id or "")
- await self._new_chat_epoch(self._group_id or "", "member_revoke")
except ops.OpError as e:
self._send({"type": "error", "detail": e.message})
return
- # Anyone connected right now keeps the key they already unwrapped; what
- # they lose is the next one. Rotating it is the operator's call, and the
- # ack says so rather than implying this undid anything already read.
- # Every connection that account holds, not "the" one: with device
- # linking a person may be connected from several at once, and the
- # registry is keyed per connection precisely because it cannot hold
- # only one of them.
- for peer in self._sessions_of(user_id):
- try:
- await peer.close()
- except Exception:
- pass
-
self._audit("member_revoke", user_id)
self._send({
"type": MNP.MEMBER_REVOKE_ACK, "v": MNP_VERSION,