aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/src/meshbay_node/ui/app.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-node/src/meshbay_node/ui/app.py')
-rw-r--r--packages/meshbay-node/src/meshbay_node/ui/app.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/meshbay-node/src/meshbay_node/ui/app.py b/packages/meshbay-node/src/meshbay_node/ui/app.py
index fc6c04a..2b99f20 100644
--- a/packages/meshbay-node/src/meshbay_node/ui/app.py
+++ b/packages/meshbay-node/src/meshbay_node/ui/app.py
@@ -334,6 +334,24 @@ def create_ui_app(state: dict) -> FastAPI:
async def unpin_member(user_id: str):
return await _op(lambda: ops.unpin_member(state, user_id))
+ # ── Chat encryption (operator only, localhost) ─────────────────────────
+
+ @app.get("/api/groups/{group_id}/chat")
+ async def chat_status(group_id: str):
+ return await _op(lambda: ops.chat_status(state, group_id))
+
+ @app.post("/api/groups/{group_id}/chat/epoch")
+ async def rotate_chat_epoch(group_id: str):
+ return await _op(lambda: ops.open_chat_epoch(state, group_id))
+
+ @app.post("/api/groups/{group_id}/chat/encrypt-history")
+ async def encrypt_chat_history(group_id: str):
+ return await _op(lambda: ops.encrypt_chat_history(state, group_id))
+
+ @app.post("/api/groups/{group_id}/chat/prune")
+ async def prune_chat(group_id: str, max_age_days: int):
+ return await _op(lambda: ops.prune_chat(state, group_id, max_age_days))
+
# ── GEK initialization (operator only, localhost) ──────────────────────
@app.post("/api/groups/{group_id}/gek")