forked from conversejs/roundcube-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.inc.php.dist
77 lines (63 loc) · 2.85 KB
/
config.inc.php.dist
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php
// important variables in the following anonymous functions:
// $args['host'] : IMAP hostname
// $args['user'] : IMAP username
// $args['pass'] : IMAP password
// Hostname of BOSH endpoint, used for prebinding only (called by PHP),
// this must be an absolute URL
$rcmail_config['converse_xmpp_bosh_prebind_url']= function($args) {
return 'http://localhost:5280/http-bind';
# return sprintf('http://%s/http-bind', $_SERVER['HTTP_HOST']);
# return sprintf('http://%s/http-bind', $args['host']);
};
// Hostname of BOSH endpoint, used by web browsers (called by Javascript code),
// this can be a relative URL
$rcmail_config['converse_xmpp_bosh_url']= function($args) {
return '/http-bind';
};
// Hostname portion of XMPP username (bare JID), example: "example.net"
$rcmail_config['converse_xmpp_hostname']= function($args) {
return 'example.net';
# return preg_replace('/^.*@/', '', $args['user']);
# return $args['host'];
};
// Username portion of XMPP username (bare JID), example: "user"
// if this contains @, this will only take the part before @,
// and the part after @ will replace the hostname definition above.
$rcmail_config['converse_xmpp_username']= function($args) {
return $args['user'];
# return preg_replace('/@.*$/', '', $args['user']);
};
// XMPP password
$rcmail_config['converse_xmpp_password']= function($args) {
return $args['pass'];
};
// converse.js file to use, defaults to converse.nojquery.min.js
// If you want to disable OTR and/or locales, use one of the alternatives
$rcmail_config['converse_jsfile'] = 'converse.nojquery.min.js';
// Additional converse.js option to use
// refer to https://conversejs.org/docs/html/index.html#configuration-variables
// some options are overriden: expose_rid_and_sid, bosh_service_url, debug,
// prebind, jid, sid, rid
$rcmail_config['converse_config'] = array(
#'animate' => false
);
// Always embed chat even if prebinding is not configured or failed
$rcmail_config['converse_xmpp_enable_always'] = false;
// Enable debug mode
$rcmail_config['converse_xmpp_debug'] = false;
// Enable development mode
$rcmail_config['converse_xmpp_devel_mode'] = false;
// Use older XMPP bind code (in case someone is having problem with
// newer code using Candy Chat's prebind library)
$rcmail_config['converse_xmpp_old_style_prebind'] = false;
// Configure XMPP resource prefix. XMPP resource is set to this variable
// appended with a unique id. Defaults to 'Roundcube-'.
$rcmail_config['converse_xmpp_resource_prefix'] = 'Roundcube-';
// Default for user preference if converse should be enabled
// 0 = never, 1 = if prebind url configured, 2 = always
$rcmail_config['converse_prebind'] = 2;
// URL prefix of the CDN where Converse.js is being included from.
// May point to a local path, if you use the same directory structure as
// on the CDN (dist/ + css/).
$rcmail_config['converse_cdn'] = 'https://cdn.conversejs.org/2.0.6';