diff options
author | sualko <klaus@jsxc.org> | 2016-12-23 14:33:35 +0300 |
---|---|---|
committer | sualko <klaus@jsxc.org> | 2016-12-23 14:33:35 +0300 |
commit | 1c25cd04ec61818745b641fe8e1ff514c20326cb (patch) | |
tree | 246190e0077169dbe6bfa3f23a0872df044e1f0f /build | |
parent | bf31120a1649ec420ad23eaa9ae38d86f31c0673 (diff) |
build v3.0.2v3.0.2
Diffstat (limited to 'build')
-rw-r--r-- | build/ajax/getSettings.php | 6 | ||||
-rw-r--r-- | build/ajax/getTurnCredentials.php | 26 | ||||
-rw-r--r-- | build/ajax/setAdminSettings.php | 10 | ||||
-rw-r--r-- | build/appinfo/info.xml | 17 | ||||
-rw-r--r-- | build/appinfo/version | 1 | ||||
-rw-r--r-- | build/css/jsxc.oc.css | 4 | ||||
-rw-r--r-- | build/js/admin.js | 4 | ||||
-rw-r--r-- | build/js/eof.js | 4 | ||||
-rw-r--r-- | build/js/ojsxc.js | 6 |
9 files changed, 43 insertions, 35 deletions
diff --git a/build/ajax/getSettings.php b/build/ajax/getSettings.php index 2865d1d..e638a20 100644 --- a/build/ajax/getSettings.php +++ b/build/ajax/getSettings.php @@ -39,9 +39,9 @@ if ($data ['serverType'] === 'internal') { exit; } -$data ['xmpp'] ['url'] = $config->getAppValue('ojsxc', 'boshUrl'); -$data ['xmpp'] ['domain'] = $config->getAppValue('ojsxc', 'xmppDomain'); -$data ['xmpp'] ['resource'] = $config->getAppValue('ojsxc', 'xmppResource'); +$data ['xmpp'] ['url'] = trim($config->getAppValue('ojsxc', 'boshUrl')); +$data ['xmpp'] ['domain'] = trim($config->getAppValue('ojsxc', 'xmppDomain')); +$data ['xmpp'] ['resource'] = trim($config->getAppValue('ojsxc', 'xmppResource')); $data ['xmpp'] ['overwrite'] = validateBoolean($config->getAppValue('ojsxc', 'xmppOverwrite')); $data ['xmpp'] ['onlogin'] = true; diff --git a/build/ajax/getTurnCredentials.php b/build/ajax/getTurnCredentials.php index c424fda..d7ac3d1 100644 --- a/build/ajax/getTurnCredentials.php +++ b/build/ajax/getTurnCredentials.php @@ -11,7 +11,7 @@ $user = \OC::$server->getUserSession()->getUser()->getUID(); $ttl = $config->getAppValue('ojsxc', 'iceTtl', 3600 * 24); // one day (according to TURN-REST-API) $url = $config->getAppValue('ojsxc', 'iceUrl'); -$url = $url ? "turn:$url" : $url; +$url = preg_match('/^(turn|stun):/', $url) || empty($url) ? $url : "turn:$url"; $usernameTRA = $secret ? (time() + $ttl).':'.$user : $user; $username = $config->getAppValue('ojsxc', 'iceUsername', ''); @@ -21,15 +21,19 @@ $credentialTRA = ($secret) ? base64_encode(hash_hmac('sha1', $username, $secret, $credential = $config->getAppValue('ojsxc', 'iceCredential', ''); $credential = (!empty($credential)) ? $credential : $credentialTRA; -$data = array( - 'ttl' => $ttl, - 'iceServers' => array( - array( - 'urls' => array($url), - 'credential' => $credential, - 'username' => $username, - ), - ), -); +if (!empty($url)) { + $data = array( + 'ttl' => $ttl, + 'iceServers' => array( + array( + 'urls' => array($url), + 'credential' => $credential, + 'username' => $username, + ), + ), + ); +} else { + $data = array(); +} echo json_encode($data); diff --git a/build/ajax/setAdminSettings.php b/build/ajax/setAdminSettings.php index b087df6..d327e72 100644 --- a/build/ajax/setAdminSettings.php +++ b/build/ajax/setAdminSettings.php @@ -6,14 +6,14 @@ OCP\JSON::callCheck(); $config = \OC::$server->getConfig(); $config->setAppValue('ojsxc', 'serverType', $_POST ['serverType']); -$config->setAppValue('ojsxc', 'boshUrl', $_POST ['boshUrl']); -$config->setAppValue('ojsxc', 'xmppDomain', $_POST ['xmppDomain']); -$config->setAppValue('ojsxc', 'xmppResource', $_POST ['xmppResource']); +$config->setAppValue('ojsxc', 'boshUrl', trim($_POST ['boshUrl'])); +$config->setAppValue('ojsxc', 'xmppDomain', trim($_POST ['xmppDomain'])); +$config->setAppValue('ojsxc', 'xmppResource', trim($_POST ['xmppResource'])); $config->setAppValue('ojsxc', 'xmppOverwrite', (isset($_POST ['xmppOverwrite'])) ? $_POST ['xmppOverwrite'] : 'false'); $config->setAppValue('ojsxc', 'xmppStartMinimized', (isset($_POST ['xmppStartMinimized'])) ? $_POST ['xmppStartMinimized'] : 'false'); -$config->setAppValue('ojsxc', 'iceUrl', $_POST ['iceUrl']); -$config->setAppValue('ojsxc', 'iceUsername', $_POST ['iceUsername']); +$config->setAppValue('ojsxc', 'iceUrl', trim($_POST ['iceUrl'])); +$config->setAppValue('ojsxc', 'iceUsername', trim($_POST ['iceUsername'])); $config->setAppValue('ojsxc', 'iceCredential', $_POST ['iceCredential']); $config->setAppValue('ojsxc', 'iceSecret', $_POST ['iceSecret']); $config->setAppValue('ojsxc', 'iceTtl', $_POST ['iceTtl']); diff --git a/build/appinfo/info.xml b/build/appinfo/info.xml index 36ecd02..56ee80b 100644 --- a/build/appinfo/info.xml +++ b/build/appinfo/info.xml @@ -1,11 +1,14 @@ <?xml version="1.0"?> -<info> +<info xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="https://apps.nextcloud.com/schema/apps/info.xsd"> <id>ojsxc</id> <name>JavaScript XMPP Chat</name> + <summary>Facebook-like chat</summary> <description>Facebook-like chat with end-to-end encrypted conversation, video calls, multi-user rooms, XMPP and internal server backend.</description> - <version>3.0.1</version> + <version>3.0.2</version> <licence>MIT</licence> - <author>Klaus Herberth, Tobia De Koninck</author> + <author mail="klaus@jsxc.org">Klaus Herberth</author> + <author>Tobia De Koninck</author> <requiremin>8.0</requiremin> <namespace>OJSXC</namespace> @@ -16,14 +19,15 @@ <documentation> <user>https://www.jsxc.org/manual.html</user> <admin>https://github.com/jsxc/jsxc/wiki/Install-ojsxc-(owncloud)</admin> - <developer>https://github.com/jsxc/jsxc/wiki/Contributor-Guide</developer> + <developer>https://github.com/jsxc/jsxc/wiki/Contributor-Guide</developer> </documentation> <category>tools</category> <website>https://www.jsxc.org</website> <bugs>http://github.com/jsxc/jsxc/issues</bugs> - <repository type="git">https://github.com/owncloud/jsxc.chat.git</repository> + <repository type="git">https://github.com/jsxc/jsxc.nextcloud.git</repository> + <screenshot>https://www.jsxc.org/assets/screenshot-owncloud-latest.png</screenshot> <ocsid>162257</ocsid> @@ -36,6 +40,7 @@ <lib>xmlreader</lib> <lib>xmlwriter</lib> <lib>dom</lib> - <owncloud min-version="8.0" max-version="9.2"/> + <owncloud min-version="8.0" max-version="9"/> + <nextcloud min-version="8.0" max-version="11"/> </dependencies> </info> diff --git a/build/appinfo/version b/build/appinfo/version deleted file mode 100644 index 13d683c..0000000 --- a/build/appinfo/version +++ /dev/null @@ -1 +0,0 @@ -3.0.1
\ No newline at end of file diff --git a/build/css/jsxc.oc.css b/build/css/jsxc.oc.css index 09823e2..98dddf8 100644 --- a/build/css/jsxc.oc.css +++ b/build/css/jsxc.oc.css @@ -1,5 +1,5 @@ /*! - * ojsxc v3.0.1 - 2016-10-28 + * ojsxc v3.0.2 - 2016-12-23 * * Copyright (c) 2016 Klaus Herberth <klaus@jsxc.org> <br> * Released under the MIT license @@ -7,7 +7,7 @@ * Please see http://www.jsxc.org/ * * @author Klaus Herberth <klaus@jsxc.org> - * @version 3.0.1 + * @version 3.0.2 * @license MIT */ diff --git a/build/js/admin.js b/build/js/admin.js index 433524f..9f13be8 100644 --- a/build/js/admin.js +++ b/build/js/admin.js @@ -1,5 +1,5 @@ /*! - * ojsxc v3.0.1 - 2016-10-28 + * ojsxc v3.0.2 - 2016-12-23 * * Copyright (c) 2016 Klaus Herberth <klaus@jsxc.org> <br> * Released under the MIT license @@ -7,7 +7,7 @@ * Please see http://www.jsxc.org/ * * @author Klaus Herberth <klaus@jsxc.org> - * @version 3.0.1 + * @version 3.0.2 * @license MIT */ diff --git a/build/js/eof.js b/build/js/eof.js index 3e95d1e..2a92242 100644 --- a/build/js/eof.js +++ b/build/js/eof.js @@ -1,5 +1,5 @@ /*! - * ojsxc v3.0.1 - 2016-10-28 + * ojsxc v3.0.2 - 2016-12-23 * * Copyright (c) 2016 Klaus Herberth <klaus@jsxc.org> <br> * Released under the MIT license @@ -7,7 +7,7 @@ * Please see http://www.jsxc.org/ * * @author Klaus Herberth <klaus@jsxc.org> - * @version 3.0.1 + * @version 3.0.2 * @license MIT */ diff --git a/build/js/ojsxc.js b/build/js/ojsxc.js index dab8780..826fbda 100644 --- a/build/js/ojsxc.js +++ b/build/js/ojsxc.js @@ -1,5 +1,5 @@ /*! - * ojsxc v3.0.1 - 2016-10-28 + * ojsxc v3.0.2 - 2016-12-23 * * Copyright (c) 2016 Klaus Herberth <klaus@jsxc.org> <br> * Released under the MIT license @@ -7,7 +7,7 @@ * Please see http://www.jsxc.org/ * * @author Klaus Herberth <klaus@jsxc.org> - * @version 3.0.1 + * @version 3.0.2 * @license MIT */ @@ -158,7 +158,7 @@ $(function() { }); jsxc.init({ - app_name: 'Owncloud', + app_name: 'Nextcloud', loginForm: { form: '#body-login form', jid: '#user', |