Skip to content

Commit

Permalink
build v3.1.0-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
sualko committed Jan 23, 2017
1 parent e9ed529 commit d76d907
Show file tree
Hide file tree
Showing 1,872 changed files with 65,101 additions and 46,964 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[Unreleased]
===
- upgrade jsxc to v3.1.0-beta
- add option to use user email as jid
- fix untrimmed settings
- ignore empty webrtc configuration

v3.0.1 / 2016-10-28
===
- upgrade jsxc to v3.0.1
Expand Down Expand Up @@ -193,6 +200,6 @@ v0.3 / 2013-10-28
- add basic muc support (alpha)
- create DSA key in background
- fix notification with multiple tabs
- reorganize files
- reorganize files
- add MIT license
- minor fixes
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<id>ojsxc</id>
<name>JavaScript XMPP Chat</name>
<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.1.0-beta</version>
<licence>MIT</licence>
<author>Klaus Herberth, Tobia De Koninck</author>
<requiremin>8.0</requiremin>
Expand Down
2 changes: 1 addition & 1 deletion appinfo/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.1
3.1.0-beta
224 changes: 0 additions & 224 deletions auth_ejabberd_oc.php

This file was deleted.

53 changes: 0 additions & 53 deletions auth_oc_user.php

This file was deleted.

21 changes: 18 additions & 3 deletions build/ajax/getSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,27 @@ function validateBoolean($val)
exit;
}

$data ['xmpp'] ['url'] = $config->getAppValue('ojsxc', 'boshUrl');
$data ['xmpp'] ['domain'] = $config->getAppValue('ojsxc', 'xmppDomain');
$data ['xmpp'] ['resource'] = $config->getAppValue('ojsxc', 'xmppResource');
$data ['screenMediaExtension']['firefox'] = trim($config->getAppValue('ojsxc', 'firefoxExtension'));
$data ['screenMediaExtension']['chrome'] = trim($config->getAppValue('ojsxc', 'chromeExtension'));

$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;

if (validateBoolean($config->getAppValue('ojsxc', 'xmppPreferMail'))) {
$mail = $config->getUserValue($username,'settings','email');

if ($mail !== null) {
list($u, $d) = explode("@", $mail, 2);
if ($d !== null && $d !== "") {
$data ['xmpp'] ['username'] = $u;
$data ['xmpp'] ['domain'] = $d;
}
}
}

$options = $config->getUserValue($username, 'ojsxc', 'options');

if ($options !== null) {
Expand Down
26 changes: 15 additions & 11 deletions build/ajax/getTurnCredentials.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

$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', '');
Expand All @@ -21,15 +21,19 @@
$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);
Loading

0 comments on commit d76d907

Please sign in to comment.