Customizing lib-jitsi-meet API (low level)

I created custom web ui using lib-jitsi-meet low level api. I want to customize the sendTextMessage(text) method : lib-jitsi-meet/JitsiConference.js at master · jitsi/lib-jitsi-meet · GitHub

MESSAGE_RECEIVED - new text message received I want my method to be like this so

room.on(JitsiMeetJS.events.conference.MESSAGE_RECEIVED , (id, text, ts, extraParams) => {

        console.log('messageReceived', id, text, ts);
        console.log('messages', mainRoomMessages)
        console.log('extraParams', extraParams));

How can I customize it to send an extra parameter to the sendTextMessage method to do this?

min.js codes in my server are on this path : /usr/share/jitsi-meet/libs/lib-jitsi-meet.min.js

and the sendTextMessage codes here are like this:

Zu.prototype.sendTextMessage=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"body";this.room&&this.room.sendMessage(e,t)}

Do I need to make a change here, if so, can I use this method in a customized way on the distribution I use?

In summary, can you guide me how to customize and use the methods in lib-jitsi-meet low level API?

For modifying the message you need changes in ljm.
But there is an option to send custom messages in ljm, why don’t you use that.

I’d recommend sending an object with the text and metadata. It will be JSON encoded.