How to store every instance of a room in a database

I have successfully installed jitsi meet on my own ubuntu server. I have also added authentication using Secure Domain. Now I want to edit the source code, so that whenever a room is created / whenever a user enters a room, i want to connect to a remote mysql database(I know how to do that using Node.js) and store the TIMESTAMP,username of the user and the name of the room. I wish to do the same when a user exits too. Could anyone guide me on this? I just want to know where that particular method is implemented in the source files, so that I can go and edit the methods ?

From my previous experience MySQL is not a very viable option. A lot of the in becomes unreliable. For instance, user joined from very bad network and suddenly internet gets disconnected and dB is not notified and so on. If u really want to implement anyway u could look into lib-jitsi-meet events docs there are 2 events called USER_JOINED that fires when local user join MUC and USER_LEFT event when any user leaves the MUC u can leverage that.

Could you please tell me where those events have been declared in the jitsi meet server(among the files, and where they are implemented/received), and in which file I should get this object ? The structure of the server is a little confusing to me!

Thanks!