桌面通知在 Converse 中不起作用.js 5.0.1



>我正在设置一个服务器,服务器是一台 Centos 7 + Apache 机器,我下载了 converse.js并通过他们提供的 CDN 调用"css"和"js",我只是做了下载并放入我的文件夹( css、js (,但我正在尝试使用通知,因为有时我需要在浏览器最小化时收到新消息的通知。

我尝试使用文档将以下选项放入初始化中: show_desktop_notifications:是的,但它不起作用.

<html class="no-js" lang="en">
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Chat.Kmk</title>

<noscript><p><img src="//stats.opkode.com/piwik.php?idsite=5" style="border:0;" alt="" /></p></noscript>
<link type="text/css" rel="stylesheet" href="css/converse.min.css" />
<script src="js/libsignal-protocol.min.js"></script>
<script src="js/converse.min.js"></script>
</head>
<body class="converse-fullscreen">
<div id="conversejs-bg"></div>
<script>
converse.initialize({

authentication: 'login',
auto_away: 300,
auto_reconnect: true,
bosh_service_url: 'http://chat.xxx.xxx:7070/http-bind/', // Please use this connection manager only for testing purposes
message_archiving: 'always',
view_mode: 'fullscreen',
allow_contact_removal:false,
allow_contact_requests:false,
show_chat_state_notifications:true,
show_desktop_notifications:true,
show_chat_state_notifications:'online',
notify_all_room_messages:true
});
</script>
</body>
</html>

我最小化浏览器,打开另一个浏览器,发送消息,但没有显示通知。

我也遇到了这个问题,但就我而言,通知适用于一些过时的 Mozilla 浏览器,我相信 Chrome 只允许源是 HTTPS,今天我可以在 Apache 上放置证书SSL后在 chrome 中收到 converse.js 的通知。

谢谢。

最新更新