You can know if another user has the same document open that you are working on, if their avatar appears at the same time as yours on the document.
Remember, that you can also use document check-in and check-out if you need another user to not be able to modify it.
Document Check-in and Check-out
In order to use the active users feature, websockets must be enabled How to configure ASGI for Websockets?