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 859c5b3 commit 19e8f75
Show file tree
Hide file tree
Showing 1,867 changed files with 65,082 additions and 46,665 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]
### Added
- add option to use user email as jid

### Fixed
- fix untrimmed settings
- ignore empty webrtc configuration
- do not start jsxc inside a frame

## 3.0.2 - 2016-12-23
### Changed
- rebrand from owncloud to nextcloud
Expand Down
2 changes: 1 addition & 1 deletion appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<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.2</version>
<version>3.1.0-beta</version>
<licence>agpl</licence>
<author mail="[email protected]">Klaus Herberth</author>
<author>Tobia De Koninck</author>
Expand Down
15 changes: 15 additions & 0 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 ['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
25 changes: 23 additions & 2 deletions build/ajax/getUsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,27 @@
$limit = 10;
$offset = 0;

$users = OCP\User::getDisplayNames((string) $_GET['search'], $limit, $offset);
$config = \OC::$server->getConfig();
$preferMail = $config->getAppValue('ojsxc', 'xmppPreferMail');
$preferMail = $preferMail === true || $preferMail === 'true';

echo json_encode($users);
$userManager = \OC::$server->getUserManager();
$users = $userManager->searchDisplayName((string) $_GET['search'], $limit, $offset);
$response = array();

foreach($users as $user) {
$uid = $user->getUID();
$index = $uid;

if ($preferMail) {
$mail = OCP\Config::getUserValue($uid, 'settings', 'email');

if (!empty($mail)) {
$index = $mail;
}
}

$response[$index] = $user->getDisplayName();
}

echo json_encode($response);
4 changes: 4 additions & 0 deletions build/ajax/setAdminSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@
$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', 'xmppPreferMail', (isset($_POST ['xmppPreferMail'])) ? $_POST ['xmppPreferMail'] : 'false');

$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']);

$config->setAppValue('ojsxc', 'firefoxExtension', $_POST ['firefoxExtension']);
$config->setAppValue('ojsxc', 'chromeExtension', $_POST ['chromeExtension']);

echo 'true';
2 changes: 1 addition & 1 deletion build/appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<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.2</version>
<version>3.1.0-beta</version>
<licence>agpl</licence>
<author mail="[email protected]">Klaus Herberth</author>
<author>Tobia De Koninck</author>
Expand Down
Loading

0 comments on commit 19e8f75

Please sign in to comment.