Builtin ConverseJS:
* Building with webpack. TODO: include assets. * Page template
This commit is contained in:
41
conversejs/conversejs.js
Normal file
41
conversejs/conversejs.js
Normal file
@ -0,0 +1,41 @@
|
||||
require('converse.js')
|
||||
|
||||
window.initConverse = function initConverse ({
|
||||
baseStaticUrl,
|
||||
room,
|
||||
boshServiceUrl
|
||||
}) {
|
||||
window.converse.initialize({
|
||||
assets_path: baseStaticUrl,
|
||||
|
||||
authentication: 'anonymous',
|
||||
auto_login: true,
|
||||
auto_join_rooms: [
|
||||
room
|
||||
],
|
||||
bosh_service_url: boshServiceUrl,
|
||||
jid: 'peertube.im.your_domain',
|
||||
notify_all_room_messages: [
|
||||
room
|
||||
],
|
||||
singleton: true,
|
||||
auto_focus: false,
|
||||
hide_muc_participants: false,
|
||||
keepalive: true,
|
||||
play_sounds: false,
|
||||
muc_mention_autocomplete_min_chars: 3,
|
||||
muc_mention_autocomplete_filter: 'contains',
|
||||
modtools_disable_assign: true,
|
||||
muc_disable_slash_commands: [
|
||||
'admin', 'ban', 'clear', 'deop', 'destroy', 'kick',
|
||||
'member', 'modtools', 'mute', 'op', 'owner', 'register',
|
||||
'revoke', 'subject', 'topic', 'voice'
|
||||
],
|
||||
muc_instant_rooms: true,
|
||||
show_client_info: false,
|
||||
allow_adhoc_commands: false,
|
||||
allow_contact_requests: false,
|
||||
show_controlbox_by_default: false,
|
||||
view_mode: 'fullscreen'
|
||||
})
|
||||
}
|
26
conversejs/index.html
Normal file
26
conversejs/index.html
Normal file
@ -0,0 +1,26 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="no-js">
|
||||
<head>
|
||||
<title>Converse</title>
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<meta name="description" content="Converse XMPP/Jabber Chat"/>
|
||||
<script src="{{BASE_STATIC_URL}}/conversejs.js"></script>
|
||||
<style type="text/css">
|
||||
#conversejs .chat-head {
|
||||
display: none;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body class="converse-fullscreen">
|
||||
<noscript>You need to enable JavaScript to run the Converse.js chat app.</noscript>
|
||||
<div id="conversejs-bg"></div>
|
||||
<script>
|
||||
initConverse({
|
||||
baseStaticUrl : '{{BASE_STATIC_URL}}',
|
||||
room: '{{ROOM}}',
|
||||
boshServiceUrl: '{{BOSH_SERVICE_URL}}'
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user