Skip to content

Commit

Permalink
Merge pull request #27053 from nextcloud/bugfix/noid/dont-throw-when-…
Browse files Browse the repository at this point in the history
…comments-is-disabled

Don't throw when comments is disabled
  • Loading branch information
nickvergessen authored Jun 2, 2021
2 parents d9a9714 + 5ae5729 commit 6578a93
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/private/Comments/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

use Doctrine\DBAL\Exception\DriverException;
use Doctrine\DBAL\Exception\InvalidFieldNameException;
use OCA\Comments\AppInfo\Application;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Comments\CommentsEvent;
use OCP\Comments\IComment;
Expand Down Expand Up @@ -1309,7 +1308,7 @@ private function sendEvent($eventType, IComment $comment) {
* @since 21.0.0
*/
public function load(): void {
$this->initialStateService->provideInitialState(Application::APP_ID, 'max-message-length', IComment::MAX_MESSAGE_LENGTH);
Util::addScript(Application::APP_ID, 'comments-app');
$this->initialStateService->provideInitialState('comments', 'max-message-length', IComment::MAX_MESSAGE_LENGTH);
Util::addScript('comments', 'comments-app');
}
}

0 comments on commit 6578a93

Please sign in to comment.