diff options
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/api/revocation.py')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/api/revocation.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/api/revocation.py b/packages/meshbay-hub/src/meshbay_hub/api/revocation.py index 2e3323c..58ebf50 100644 --- a/packages/meshbay-hub/src/meshbay_hub/api/revocation.py +++ b/packages/meshbay-hub/src/meshbay_hub/api/revocation.py @@ -122,6 +122,9 @@ async def _handle_chat_notify(group_id: str, sender_name: str, sender_user_id: s db, uid, "chat_message", f"{sender_name or 'Someone'} posted in {group.name}", link=f"#/group/{group_id}", + group_id=group_id, + # One line per conversation, moved to when it last spoke. + aggregate=True, ) await db.commit() except Exception as e: @@ -250,7 +253,12 @@ async def node_websocket(ws: WebSocket): asyncio.ensure_future(_handle_chat_notify( msg.get("group_id", ""), msg.get("sender_name", ""), - decoded.get("sub", ""), + # The author, as the node authenticated them — not + # decoded["sub"], which is the machine's own account and + # made this filter miss everyone except the operator. A node + # that lied here could only suppress one notification, which + # is the same power it has by not sending the message at all. + msg.get("sender_user_id", ""), )) except WebSocketDisconnect: |