How to add Chat room message Edit and Delete feature in Jitsi and how to get chat messages in Jicofo logs?

Hi.
We want to add Chat message Edit and Delete option in our system.

from xmpp
XEP-0308: Last Message Correction Last Message Correction
there is option to replace previous messge by id.

<message to='juliet@capulet.net/balcony' id='good1'
  <body>But soft, what light through yonder window breaks?</body>
  <replace id='bad1' xmlns='urn:xmpp:message-correct:0'/>
</message>

So, from jitsi meet we have to get the sent messages id to edit that later. can we have message ID that has been used to send in lib-jitsi-meet?

We don’t have this functionality in ljm at the moment.

Yes. Message edit functionality is not available,
Still can I get Message ID in Client side? that way would like to try to implement the Edit feature.

Nope, is what I said. The send message functions are send and forget, that needs to be implemented first.

hi @damencho , although slightly another topic:
In Jicofo is there way to retrieve all chat messages?
as in, Jitsi meet:
const { messages } = APP.store.getState()[‘features/chat’];
getting all the messages as json object.
So, how to achieve this same is Jicofo.

Why do you need it in jicofo?

I am trying to save a meeting’s chat transcripts in server side when the meeting ends. My thought is if Jicofo has all these chat messages data, will just save in Jicofo side?
Actually what should be the optimal way to achieve this

Found that “muc_mam” should save chat log. But not getting in docker /var/lib/prosody folder. also rather from prosody module, we would like to customize our chat text files. so getting those message json would be helpful in Jicofo

You need a prosody module for that. Jicofo is just a client that connects, and keeping jicofo updated with modifications will be hard.

Ok thank you damencho.

@damencho ,
as in Jitsi meet frontend, we get trigger in ENDPOINT_MESSAGE_RECEIVED in conference.js when a new text message is received.
What event is triggered in Jicofo, I mean in which class I can get trigger in Jicofo if a new message is received in the room?

In Chatroom message listener.

1 Like

Thank you, it worked, I can get data in Jicofo for group chat messages.
I want to do another part, Can I send any private message to Jicofo from any user?
like:

conference.sendPrivateTextMessage('focus', action.message);

How can I target focus to send a private message?

You need to send the message to the full address of.jicofo

right. i was also sending with focus@jitsi.meet.si. but not working. is it the full address?

Depends on the domain you use for deployment.