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

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='' id='good1'
  <body>But soft, what light through yonder window breaks?</body>
  <replace id='bad1' xmlns='urn:xmpp:message-correct:0'/>

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 } =[‘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?

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 but not working. is it the full address?

Depends on the domain you use for deployment.

hi @damencho . How are you?
In Jitsi meet:2.0.6826
2.0.6826 there is a release note describes:

  • feat: Adds internal action for editing chat messages.
  • feat: Adds id to chat messages internal state.

Actually, what does it do? Can I use this ID and edit group conference messages as Edit message feature? and other users can get the changes?

This is internal for the react part. Once you implement the signalling part, the xmpp, because of this it will be easier to do the UI.

Thank you. so I have to map the xmpp mesage ID (if implement xep-308) and UI React ID? or I can direct work with xmpp one to send edit request?
In future release is Jitsi planning to add Chat Edit feature?

We don’t have plans for adding it. Any PRs are welcome.
Yeah, ifnyou can reuse ids it will be easier, so you don’t need to keep a mapping.

Ok. @damencho .
According to the doc, disco
its saying:

If a client implements message correction, it MUST specify the ‘urn:xmpp:message-correct:0’ feature in its service discovery information features as specified in Service Discovery (XEP-0030) [1] and the Entity Capabilities profile specified in Entity Capabilities (XEP-0115) [2].

After querying support in Jitsi, I’ve got:

<iq xmlns="jabber:client" to="aurxcy83bb_g6cgc_h8kkjh3@meet.jitsi/OINAFPkdrKEN" from="" type="result" id="info1"><query xmlns="">
<feature var="muc_nonanonymous"/>
<feature var="muc_unmoderated"/>
<feature var="muc_open"/><identity type="text" category="conference"/>
<feature var="jabber:iq:register"/>
<feature var=""/>
<feature var=""/>
<feature var=""/>
<feature var=""/>
<feature var="urn:xmpp:occupant-id:0"/>
<feature var="muc_hidden"/>
<feature var="muc_unsecured"/>
<feature var="muc_temporary"/><x xmlns="jabber:x:data" type="result"><field type="hidden" var="FORM_TYPE"><value></value></field><field type="boolean" label="Allow members to invite new members" var="{}roomconfig_allowmemberinvites"><value>0</value></field><field type="boolean" label="Allow users to invite other users" var="muc#roomconfig_allowinvites"><value>1</value></field><field type="boolean" var="muc#roomconfig_changesubject"/><field type="text-single" label="Title" var="muc#roomconfig_roomname"/><field type="text-single" label="Description" var="muc#roominfo_description"><value/></field><field type="text-single" label="The meeting unique id." var="muc#roominfo_meetingId"><value>8a39d0ad-2e79-44a3-a21a-10f7206786e5</value></field><field type="text-single" label="Number of occupants" var="muc#roominfo_occupants"><value>2</value></field><field type="text-single" var="muc#roominfo_lang"><value>en-US</value></field></x></query></iq>

So, message correction support is not enabled ?