gpt4 book ai didi

javascript - 匡威JS : how to enable sound notifications for all messages in a muc chat room?

转载 作者:行者123 更新时间:2023-11-30 21:15:17 25 4
gpt4 key购买 nike

ConverseJS 中的 play_sounds 选项(版本 3.2)允许“当您收到个人消息或在聊天室中提及您的昵称时播放通知声音”(see here)。有没有办法为 muc 聊天室中的每条新消息播放声音,而不仅仅是提及用户的消息?

最佳答案

是的,有办法做到这一点。

使用 notify_all_room_messages设置。

来自上面的链接:

如果您将此设置设为 true,那么您将收到房间内收到的所有消息的通知。

这指的是声音通知和 HTML5 桌面通知。

只收到部分房间的通知:

converse.initialize({
// Other config settings omitted for brevity
// ...

notify_all_room_messages: [
'foo@conference.exampl.org',
'bar@conference.example.org',

]
});

或者为所有房间启用通知:

converse.initialize({
// Other config settings omitted for brevity
// ...

notify_all_room_messages: true
});

关于javascript - 匡威JS : how to enable sound notifications for all messages in a muc chat room?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45740780/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com