Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

183
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda