diff options
Diffstat (limited to 'build/appinfo')
-rw-r--r-- | build/appinfo/app.php | 2 | ||||
-rw-r--r-- | build/appinfo/application.php | 30 | ||||
-rw-r--r-- | build/appinfo/info.xml | 4 | ||||
-rw-r--r-- | build/appinfo/register_command.php | 3 |
4 files changed, 25 insertions, 14 deletions
diff --git a/build/appinfo/app.php b/build/appinfo/app.php index a96c757..e813fa0 100644 --- a/build/appinfo/app.php +++ b/build/appinfo/app.php @@ -73,7 +73,7 @@ if(!$apiSecret) { $config->setAppValue('ojsxc', 'apiSecret', $apiSecret); } -if (Application::getServerType() === 'internal') { +if (Application::getServerType() === Application::INTERNAL) { Hooks::register(); } diff --git a/build/appinfo/application.php b/build/appinfo/application.php index 44cf35b..6c8d9f0 100644 --- a/build/appinfo/application.php +++ b/build/appinfo/application.php @@ -2,16 +2,17 @@ namespace OCA\OJSXC\AppInfo; +use OCA\DAV\Server; use OCA\OJSXC\Controller\ManagedServerController; use OCA\OJSXC\Controller\SettingsController; use OCA\OJSXC\Controller\ExternalApiController; use OCA\OJSXC\Middleware\ExternalApiMiddleware; use OCA\OJSXC\Command\RefreshRoster; +use OCA\OJSXC\Command\ServerSharing; use OCA\OJSXC\Controller\HttpBindController; use OCA\OJSXC\Db\IQRosterPushMapper; use OCA\OJSXC\Db\MessageMapper; use OCA\OJSXC\Db\PresenceMapper; -use OCA\OJSXC\Db\Stanza; use OCA\OJSXC\Db\StanzaMapper; use OCA\OJSXC\Migration\RefreshRoster as RefreshRosterMigration; use OCA\OJSXC\NewContentContainer; @@ -31,7 +32,6 @@ use OCA\OJSXC\ContactsStoreUserProvider; use OCP\AppFramework\App; use OCP\IContainer; use OCP\IRequest; -use OCP\IUserBackend; class Application extends App { @@ -64,7 +64,7 @@ class Application extends App { return new HttpBindController( $c->query('AppName'), $c->query('Request'), - $c->query('OJSXC_UserId'), + $c->query('UserId'), $c->query('StanzaMapper'), $c->query('IQHandler'), $c->query('MessageHandler'), @@ -161,7 +161,7 @@ class Application extends App { return new PresenceMapper( $container->getServer()->getDatabaseConnection(), $c->query('Host'), - $c->query('OJSXC_UserId'), + $c->query('UserId'), $c->query('MessageMapper'), $c->query('NewContentContainer'), self::$config['polling']['timeout'], @@ -175,7 +175,7 @@ class Application extends App { */ $container->registerService('IQHandler', function(IContainer $c) { return new IQ( - $c->query('OJSXC_UserId'), + $c->query('UserId'), $c->query('Host'), $c->query('OCP\IUserManager'), $c->query('OCP\IConfig'), @@ -185,7 +185,7 @@ class Application extends App { $container->registerService('PresenceHandler', function(IContainer $c) { return new Presence( - $c->query('OJSXC_UserId'), + $c->query('UserId'), $c->query('Host'), $c->query('PresenceMapper'), $c->query('MessageMapper') @@ -194,7 +194,7 @@ class Application extends App { $container->registerService('MessageHandler', function(IContainer $c) { return new Message( - $c->query('OJSXC_UserId'), + $c->query('UserId'), $c->query('Host'), $c->query('MessageMapper'), $c->query('UserProvider'), @@ -276,6 +276,12 @@ class Application extends App { ); }); + $container->registerService('ServerSharingCommand', function($c) { + return new ServerSharing( + $c->query('OCP\IConfig') + ); + }); + /** * A modified userID for use in OJSXC. * This is automatically made lowercase. @@ -325,7 +331,7 @@ class Application extends App { } else if ($cache->isAvailable()) { $memcache = $cache->create('ojsxc'); return new MemLock( - $c->query('OJSXC_UserId'), + $c->query('UserId'), $memcache ); } else { @@ -335,7 +341,7 @@ class Application extends App { // default return new DbLock( - $c->query('OJSXC_UserId'), + $c->query('UserId'), $c->query('OCP\IConfig'), $c->getServer()->getDatabaseConnection() ); @@ -386,7 +392,11 @@ class Application extends App { */ public static function contactsStoreApiSupported() { $version = \OCP\Util::getVersion(); - return $version[0] >= 13; + if ($version[0] >= 13 && \OC::$server->getConfig()->getAppValue('ojsxc', 'use_server_sharing_settings', 'no') === 'yes') { + // ContactsStore API is supported and feature is enabled + return true; + } + return false; } public static function getServerType() { diff --git a/build/appinfo/info.xml b/build/appinfo/info.xml index d75890b..9c4a451 100644 --- a/build/appinfo/info.xml +++ b/build/appinfo/info.xml @@ -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.4.2</version> + <version>3.4.3</version> <licence>agpl</licence> <author mail="klaus@jsxc.org">Klaus Herberth</author> <author>Tobia De Koninck</author> @@ -37,7 +37,7 @@ <lib>xmlreader</lib> <lib>xmlwriter</lib> <lib>dom</lib> - <nextcloud min-version="12" max-version="14"/> + <nextcloud min-version="12" max-version="16"/> </dependencies> <repair-steps> diff --git a/build/appinfo/register_command.php b/build/appinfo/register_command.php index fb69e9f..cf616ac 100644 --- a/build/appinfo/register_command.php +++ b/build/appinfo/register_command.php @@ -5,4 +5,5 @@ use OCA\OJSXC\AppInfo\Application; $app = new Application(); /** @var Symfony\Component\Console\Application $application */ -$application->add($app->getContainer()->query('RefreshRosterCommand'));
\ No newline at end of file +$application->add($app->getContainer()->query('RefreshRosterCommand')); +$application->add($app->getContainer()->query('ServerSharingCommand')); |