当 converse 在嵌入模式下初始化为单例时,有没有办法在 conversejs 中不显示邀请弹出窗口?

Is there a way to not show invite popups in conversejs when converse is initialized as singleton in embeded mode?

我使用 conversejs 作为客户端来提供嵌入在 html 页面中的多用户聊天。用户可能会被添加到很多组中。当用户在一个组中聊天并收到加入另一个组的邀请时,会显示一个弹出窗口以接受邀请,我不希望用户看到该邀请,而是用户应该留在他打开的同一个组中。

下面是初始化示例:

converse.initialize({
  authentication: 'login',
  credentials_url: 'https://myserver.primet.com/chatapi/apiserver/api/chat/autologin/auth?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImtpZCI6ImFQY3R3X29kdlJPb0VOZzNWb09sSWgydGlFcyJ9.eyJhdWQiOiI2YTE1NzNkMS03ZDZjLTRkZGItYjVlYS1hZGQyZWM1MDkzZjEiLCJpc3MiOiJodHRwczovL2xvZ2luLm1pY3Jvc29mdG9ubGluZS5jb20vZmNlNTAxOTUtMjMxNS00N2FmLWE2ODQtZmY5M',
  auto_login: 'true',
  bosh_service_url: 'https://myserver.primet.com/chatserver/http-bind/',
  jid: ‘james@qachatserver.primet.com',
  keepalive: true,
  trusted: false,
  auto_reconnect: true,
  muc_nickname_from_jid: true,
  auto_join_rooms: ['deal_909090390898989090909@conference.qachatserver.primet.com'],
  auto_focus: false,
  locked_muc_nickname: true,
  show_desktop_notifications: false,
  send_chat_state_notifications: false,
  blacklisted_plugins: [
    'converse-notification'
  ],
  singleton: true,
  muc_show_join_leave: false,
  visible_toolbar_buttons: {
    call: false,
    spoiler: false,
    emoji: false,
    toggle_occupants: true
  },
  notify_all_room_messages: false,
  notification_delay: 3000,
  allow_message_corrections: 'false',
  view_mode: 'embedded'
}).then(() => {   setTimeout(function(){   var toggleButton = document.getElementsByClassName('toggle-occupants fa fa-angle-double-right')[0]; if (toggleButton) { toggleButton.click(); toggleButton.style.display="none"}},500);})

您可以将 allow_muc_invitations 设置为 false