Custom Notification to selected participants

We are consuming external API and would like to send custom notifications to participants.
From our web app we will call this function and would like to send custom notifications to participants passed in the array

I have exposed one function in external_api like below

 showCustomNitification(participants, message) {
        return this._transport.sendRequest({
            name: 'show-custom-notification',

Then in API.js

transport.on('request', (request, callback) => {   
case 'show-custom-notification': {
           const {participants, message} = request;

In Conference.js

//Would like to iterate the participants and dispatch below Notification{
                        titleKey: 'custome message',
                        descriptionKey: 'custom message'
                    }, NOTIFICATION_TIMEOUT_TYPE.SHORT));

How can Iterate and send Notification to only participants passed in the array ?

You should probably do it differently: use an endpoint message and send a message to the participants you want to create a notification for, and they, upon the reception of the endpoint message create a custom notification locally.

Hi Sagul

Thanks for your reply
I did not get on what an endpoint message is , can you provide some example reference here
How to create an endpoint message and send a message.

If you point me here any existing workflow from Jitsi-Meet I will try to debug the code.

See here: Commands | Jitsi Meet

Hi Saghul
Thanks , makes some sense now

Can I define my own Command or use the “end-endpoint-text-message”
Hope form where I am using this (my web app) I can iterate the participants and call the executecommand in a loop

And I guess when I use “executecommand” it will be received in the below code in /conference.js
but ENDPOINT_MESSAGE_RECEIVED is not getting triggered.

            (...args) => {
                if (args && args.length >= 2) {
                    const [ sender, eventData ] = args;

                    if ( === ENDPOINT_TEXT_MESSAGE_NAME) {
                            senderInfo: {
                                jid: sender._jid,
                                id: sender._id
  • Where could I show the CustomNotification, should it be in the react/features/subtitles/middleware.js ? function _endpointMessageReceived(

You can define your own, it’s free form.

Yes, the recipient should see this. Are you executing the command with the right recipients?

Since you are defining this yourself, no big deal, I guess you could that wherever feels easier for you.

Thanks Saghul

can we run api.executecommand(…) in a for loop from a web app?

sure thing!

Hi Saghul
I am unable to read the data passed form below command, is the below format correct
API.executeCommand("sendEndpointTextMessage","dc1ab555", "Test");

Also I would like to pass a flag in the above command to show the notification or not like below

API.executeCommand("sendEndpointTextMessage","dc1ec555", "Test", showNotify);

I would like to show the Notification in below function only

            (...args) => {

How could I parse the args to get PartID, Text and Flag ?

Yes, this looks about right. Do you not get the event in the recipient?

You can JSON-encode it in the text field, for example.

How Can I define my own ENDPOINT_MESSAGE_RECEIVED event
something like below

In which areas should I make the changes ?

You don’t need to define a custom one, just put your own payload and parse it on the other end.


Thanks, Appreciate your response.
One change in our requirement, can I pass array of Participant ID’s

I believe this ENDPOINT_MESSAGE_RECEIVED is triggered for each participant, I am looking for a way to send Participant Array. I know that passing “” will send to all the participants but would like to pass an array of Participants
Is there any method currently that supports this

Call the function in a loop, which will send each participant you want the message.

You mean calling the executeCommand(…) in a loop ? I tired that and it works fine but I would
like to send the participant array to executeCommand(…) and handle in the Jitsi-Meet repo

Can this be achieved ?

This API will send a message to ONE participant. You can’t trigger a remote notification, so you’ll send the message to everyone, then EACH of them will locally triiger the notification.


From your statement “so you’ll send the message to everyone, then EACH of them will locally trigger the notification.”

How could I send the message to everyone and how could each of them who received the message trigger the notification. is there any particular event that sends the message to everyone ?

Sigh, I worded that wrong. You send the messsage to each participant you want to display a notification for. They then display it locally. This last part is where your custom code in conference.js does it.

You have answered a lot in this thread and would like to close this with below

In layman terms we cannot pass array of participants to executeCommand(sendEndPoint…)

And Current Jitsi Meet Architecture behaves in a way that message is sent to each participant and not array of participants at once