Realtime · Socket.IO

Presence

javascript
socket.emit("presence:online", { projectId: "6958511e8397f2dfa88090d8" })
socket.emit("presence:online", { projectId: "6958511e8397f2dfa88090d8" })

Broadcast presence:user:online

json
{
  "userId": "69566c4cf0bdc3ae3e81b108",
  "user": {
    "id": "69566c4cf0bdc3ae3e81b108",
    "email": "user@example.com",
    "firstName": "A",
    "lastName": "B"
  },
  "timestamp": "2026-03-18T10:00:00.000Z"
}
{
  "userId": "69566c4cf0bdc3ae3e81b108",
  "user": {
    "id": "69566c4cf0bdc3ae3e81b108",
    "email": "user@example.com",
    "firstName": "A",
    "lastName": "B"
  },
  "timestamp": "2026-03-18T10:00:00.000Z"
}

presence:get:online → presence:online:list

json
{
  "projectId": "6958511e8397f2dfa88090d8",
  "users": [
    {
      "userId": "69566c4cf0bdc3ae3e81b108",
      "user": { "id": "...", "email": "...", "firstName": "...", "lastName": "..." },
      "lastSeen": "2026-03-18T10:00:00.000Z"
    }
  ],
  "count": 1
}
{
  "projectId": "6958511e8397f2dfa88090d8",
  "users": [
    {
      "userId": "69566c4cf0bdc3ae3e81b108",
      "user": { "id": "...", "email": "...", "firstName": "...", "lastName": "..." },
      "lastSeen": "2026-03-18T10:00:00.000Z"
    }
  ],
  "count": 1
}