Skip to content
This repository was archived by the owner on Feb 9, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
5bff9ef
Use server broadcast events to send events via Mercure
ChristophWurst Sep 16, 2019
7119512
fixup! Use server broadcast events to send events via Mercure
ChristophWurst Sep 16, 2019
aaeb3cb
fixup! Use server broadcast events to send events via Mercure
ChristophWurst Sep 16, 2019
f8515f8
fixup! Use server broadcast events to send events via Mercure
ChristophWurst Sep 17, 2019
1e44e92
fixup! Use server broadcast events to send events via Mercure
ChristophWurst Sep 20, 2019
79c3db3
fixup! Use server broadcast events to send events via Mercure
ChristophWurst Sep 21, 2019
11336fd
fixup! Use server broadcast events to send events via Mercure
ChristophWurst Sep 23, 2019
959b895
fixup! Use server broadcast events to send events via Mercure
ChristophWurst Sep 23, 2019
9ad8e15
fixup! Use server broadcast events to send events via Mercure
ChristophWurst Sep 23, 2019
b69c83a
fixup! Use server broadcast events to send events via Mercure
ChristophWurst Sep 23, 2019
8df7759
fixup! Use server broadcast events to send events via Mercure
ChristophWurst Sep 23, 2019
4bf9404
fixup! Use server broadcast events to send events via Mercure
ChristophWurst Oct 22, 2019
923ea17
fixup! Use server broadcast events to send events via Mercure
rullzer Apr 9, 2020
beb30d9
fixup! Use server broadcast events to send events via Mercure
rullzer Apr 9, 2020
d920119
fixup! Use server broadcast events to send events via Mercure
rullzer Apr 9, 2020
2378713
fixup! Use server broadcast events to send events via Mercure
rullzer Apr 9, 2020
eed616d
fixup! Use server broadcast events to send events via Mercure
rullzer Apr 9, 2020
bcd9cb3
fixup! Use server broadcast events to send events via Mercure
rullzer Apr 9, 2020
d2ab7a2
fixup! Use server broadcast events to send events via Mercure
rullzer Apr 9, 2020
70be61a
fixup! Use server broadcast events to send events via Mercure
rullzer Apr 10, 2020
8550ed0
fixup! Use server broadcast events to send events via Mercure
rullzer Apr 10, 2020
4483c60
fixup! Use server broadcast events to send events via Mercure
rullzer Apr 10, 2020
ce9b109
fixup! Use server broadcast events to send events via Mercure
rullzer Apr 10, 2020
1c0f093
fixup! Use server broadcast events to send events via Mercure
rullzer Apr 10, 2020
e118c44
Move to new push interface etc
rullzer May 15, 2020
d029cbd
Bump version
rullzer May 15, 2020
bded2e5
Minimal push to be compatible with the server impl
rullzer May 15, 2020
72544d4
Move to new IBootstrap version
rullzer Jun 18, 2020
7fc2e29
Pass topic correctly
rullzer Jul 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 2 additions & 25 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,9 @@ module.exports = {
extends: [
'eslint:recommended',
'plugin:node/recommended',
'plugin:vue/essential',
'plugin:vue/recommended',
'standard'
],
plugins: ['vue', 'node'],
plugins: ['node'],
rules: {
// space before function ()
'space-before-function-paren': ['error', 'never'],
Expand All @@ -65,7 +63,6 @@ module.exports = {
// tabs only
indent: ['error', 'tab'],
'no-tabs': 0,
'vue/html-indent': ['error', 'tab'],
// only debug console
'no-console': ['error', {allow: ['error', 'warn', 'debug']}],
// classes blocks
Expand All @@ -76,27 +73,7 @@ module.exports = {
'multiline-ternary': ['error', 'always-multiline'],
// es6 import/export and require
'node/no-unpublished-require': ['off'],
'node/no-unsupported-features/es-syntax': ['off'],
// kebab case components for vuejs
'vue/component-name-in-template-casing': ['error', 'kebab-case'],
// space before self-closing elements
'vue/html-closing-bracket-spacing': 'error',
// newline before closing bracket
'vue/html-closing-bracket-newline': ["error", {
"singleline": "never",
"multiline": "never"
}
],
// code spacing with attributes
'vue/max-attributes-per-line': [
'error',
{
singleline: 3,
multiline: {
max: 3,
allowFirstLine: true
}
}
'node/no-unsupported-features/es-syntax': ['off']
]
}
}
39 changes: 0 additions & 39 deletions appinfo/autoload.php

This file was deleted.

9 changes: 2 additions & 7 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

]]>
</description>
<version>0.6.10</version>
<version>0.7.0</version>
<licence>agpl</licence>
<author>Maxence Lange</author>
<namespace>Push</namespace>
Expand All @@ -19,12 +19,7 @@
<website>https://github.com/nextcloud/push</website>
<bugs>https://github.com/nextcloud/push/issues</bugs>
<repository>https://github.com/nextcloud/push.git</repository>
<screenshot>https://raw.githubusercontent.com/nextcloud/push/master/screenshots/0.3.0.png</screenshot>
<dependencies>
<nextcloud min-version="18" max-version="18"/>
<nextcloud min-version="20" max-version="20"/>
</dependencies>

<commands>
<command>OCA\Push\Command\Test</command>
</commands>
</info>
38 changes: 0 additions & 38 deletions appinfo/routes.php

This file was deleted.

1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
}
],
"require": {
"daita/my-small-php-tools": "dev-master"
},
"scripts": {
"lint": "find . -name \\*.php -not -path './vendor/*' -exec php -l \"{}\" \\;"
Expand Down
56 changes: 0 additions & 56 deletions composer.lock

This file was deleted.

Binary file removed documentations/PushTest.gif
Binary file not shown.
Binary file removed documentations/SocialPush.gif
Binary file not shown.
71 changes: 14 additions & 57 deletions lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<?php
declare(strict_types=1);

<?php declare(strict_types=1);

/**
* Push - Nextcloud Push Service
Expand All @@ -27,77 +25,36 @@
*
*/


namespace OCA\Push\AppInfo;


use OC;
use OCA\Push\Helper\PushHelper;
use OCA\Push\Service\Extensions\NextcloudFilesAppService;
use OCA\Push\Service\PushService;
use OCA\Push\Listener\CspListener;
use OCA\Push\Service\PushClient;
use OCP\AppFramework\App;
use OCP\AppFramework\Bootstrap\IBootContext;
use OCP\AppFramework\Bootstrap\IBootstrap;
use OCP\AppFramework\Bootstrap\IRegistrationContext;
use OCP\AppFramework\IAppContainer;
use OCP\AppFramework\QueryException;
use OCP\Push\IPushManager;
use OCP\Util;


/**
* Class Application
*
* @package OCA\Push\AppInfo
*/
class Application extends App {
use OCP\EventDispatcher\IEventDispatcher;
use OCP\Push\IManager;
use OCP\Security\CSP\AddContentSecurityPolicyEvent;

class Application extends App implements IBootstrap {

const APP_NAME = 'push';


/** @var IAppContainer */
private $container;


/**
* @param array $params
*/
public function __construct(array $params = []) {
parent::__construct(self::APP_NAME, $params);

$this->container = $this->getContainer();
}


/**
*
*/
public function registerPush() {
try {
/** @var IPushManager $pushManager */
$pushManager = $this->container->query(IPushManager::class);
$pushService = $this->container->query(PushService::class);
$pushHelper = $this->container->query(PushHelper::class);
$pushManager->registerPushApp($pushService, $pushHelper);

Util::addScript('push', 'polling');
} catch (QueryException $e) {
OC::$server->getLogger()
->log(1, 'issue while registering Nextcloud Push : ' . $e->getMessage());
}
public function register(IRegistrationContext $context): void {
$context->registerPushApp(PushClient::class);
$context->registerEventListener(AddContentSecurityPolicyEvent::class, CspListener::class);
}

public function boot(IBootContext $context): void {

/**
*
*/
public function registerExtensions() {
$eventDispatcher = OC::$server->getEventDispatcher();
try {
$extendsFilesApp = $this->container->query(NextcloudFilesAppService::class);
$extendsFilesApp->attach($eventDispatcher);
} catch (QueryException $e) {
}
}


}

Loading