In a project of our company we are using "rooms" approach and it's name is a combination of user ids of all users in a conversation as a unique identifier (our implementation is more like facebook messenger), example:
|id | name |1 | Scott |2 | Susan
"room" name will be "1-2" (ids are ordered Asc.) and on disconnect socket.io automatically cleans up the room
this way you send messages just to that room and only to online (connected) users (less packages sent throughout the server).