当在嵌入模式下将converse初始化为单例时,是否可以在conversejs中不显示邀请弹出窗口?

问题描述 投票:0回答:1

我使用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: ‘[email protected]',
  keepalive: true,
  trusted: false,
  auto_reconnect: true,
  muc_nickname_from_jid: true,
  auto_join_rooms: ['[email protected]'],
  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);})
xmpp ejabberd converse.js
1个回答
0
投票

您可以将allow_muc_invitations设置为false

© www.soinside.com 2019 - 2024. All rights reserved.