Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

186
Views
How can I add conditional icon in to the user massage in conversejs

I am creating a chat room using the converse js package on my react project. I am trying to add an icon in every massage of the user like the screenshot. The condition is this icon can see only the admin.

enter image description here

I was trying to do that by event but I think there is no event for this, My main purpose is I want to add an icon that can see by the admin if the admin clicks on the icon then a drop menu will show.

export const restrictUserOnLoadPlugin = () => {
  window.converse.plugins.add('restrict-user', {
    dependencies: [],
    initialize: function () {
      const _converse = this._converse;
      //   _converse.api.listen.on('getMessageActionButtons', (el, buttons) => {
      //     console.log(buttons);
      //     buttons.push({
      //       i18n_text: 'Foo',
      //       handler: (ev) => alert('Foo!'),
      //       button_class: 'chat-msg__action-foo',
      //       icon_class: 'fa fa-check',
      //       name: 'foo',
      //     });
      //     console.log(buttons);

      //     return buttons;
      //   });
    },
  });
};

is there any event for adding the icon? or any other way?

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!