This commit is contained in:
Mid
2025-06-17 22:10:19 +03:00
parent 079fd61390
commit e929b5af1e
3 changed files with 51 additions and 48 deletions

View File

@@ -122,19 +122,13 @@
<script>
document.querySelector("#BLARF").setAttribute("data-target", STREAM_SOURCE_WS)
function randomHex(size) {
return [...self.crypto.getRandomValues(new Uint8Array(size))].map(b=>b.toString(16).padStart(2, "0")).join("")
}
const un = 'lol' + randomHex(16)
if(ENABLE_CHAT) {
converse.initialize({
view_mode: 'embedded',
websocket_url: CHAT_HOST_WS_URL,
login: 'anonymous',
jid: un + '@' + CHAT_HOST,
authentication: 'anonymous',
jid: CHAT_HOST,
auto_login: true,
password: 'lol',
auto_join_rooms: [CHAT_MUC],
show_message_avatar: false,
show_controlbox_by_default: false,