Working DMs

This commit is contained in:
2025-08-25 17:47:36 +03:00
Unverified
parent 8acb2dd507
commit bddf34de2d
2 changed files with 35 additions and 4 deletions
+6
View File
@@ -246,6 +246,12 @@ class MessaggingSocketManager:
return None
if type == "ping":
try:
current_user = get_current_user_inner()
if current_user:
self.user_by_ws[websocket] = current_user.id
except HTTPException:
pass
await websocket.send_json({"type": "ping", "data": {"status": "success"}})
elif type == "getMessages":
try: