UPSTREAM BASELINE: nextcloud/spreed v22.0.12 (без изменений)
Type checking / changes (push) Has been cancelled
Type checking / test (push) Has been cancelled
Type checking / typescript-summary (push) Has been cancelled
Node tests / changes (push) Has been cancelled
Node tests / test (push) Has been cancelled
Node tests / test-summary (push) Has been cancelled

Источник: https://github.com/nextcloud/spreed/archive/refs/tags/v22.0.12.tar.gz
С этого коммита ветка официального Nextcloud Talk отрезана (решение владельца 2026-07-06).
Все дальнейшие изменения — только наши; версии релизов: 22.0.12-f7.N.
This commit is contained in:
2026-07-06 14:07:50 +00:00
commit 01acfa3b40
1716 changed files with 613013 additions and 0 deletions
@@ -0,0 +1,38 @@
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\TalkWebhookDemo\Migration;
use OCA\Talk\Events\BotInstallEvent;
use OCA\TalkWebhookDemo\Service\BotService;
use OCP\IURLGenerator;
use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep;
class InstallBot implements IRepairStep {
public function __construct(
protected IURLGenerator $url,
protected BotService $service,
) {
}
public function getName(): string {
return 'Install as Talk bot';
}
public function run(IOutput $output): void {
if (!class_exists(BotInstallEvent::class)) {
$output->warning('Talk not found, not installing bots');
return;
}
$backend = $this->url->getAbsoluteURL('');
$this->service->installBot($backend);
}
}
@@ -0,0 +1,48 @@
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\TalkWebhookDemo\Migration;
use OCA\Talk\Events\BotUninstallEvent;
use OCA\TalkWebhookDemo\Service\BotService;
use OCP\IConfig;
use OCP\IURLGenerator;
use OCP\Migration\IOutput;
use OCP\Migration\IRepairStep;
class UninstallBot implements IRepairStep {
public function __construct(
protected IConfig $config,
protected IURLGenerator $url,
protected BotService $service,
) {
}
public function getName(): string {
return 'Uninstall Talk bots';
}
public function run(IOutput $output): void {
if (!class_exists(BotUninstallEvent::class)) {
$output->warning('Talk not found, not removing the bots');
return;
}
$backend = $this->url->getAbsoluteURL('');
$id = sha1($backend);
$secretData = $this->config->getAppValue('talk_webhook_demo', 'secret_' . $id);
if ($secretData) {
$secretArray = json_decode($secretData, true, 512, JSON_THROW_ON_ERROR);
if ($secretArray['secret']) {
$this->service->uninstallBot($secretArray['secret'], $backend);
}
}
}
}
@@ -0,0 +1,76 @@
<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OCA\TalkWebhookDemo\Migration;
use Closure;
use OCP\DB\ISchemaWrapper;
use OCP\DB\Types;
use OCP\Migration\IOutput;
use OCP\Migration\SimpleMigrationStep;
class Version1000Date20230719061613 extends SimpleMigrationStep {
/**
* @param IOutput $output
* @param Closure(): ISchemaWrapper $schemaClosure
* @param array $options
*/
public function preSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void {
}
/**
* @param IOutput $output
* @param Closure(): ISchemaWrapper $schemaClosure
* @param array $options
* @return null|ISchemaWrapper
*/
public function changeSchema(IOutput $output, Closure $schemaClosure, array $options): ?ISchemaWrapper {
/** @var ISchemaWrapper $schema */
$schema = $schemaClosure();
if (!$schema->hasTable('twd_log_entries')) {
$table = $schema->createTable('twd_log_entries');
$table->addColumn('id', Types::BIGINT, [
'autoincrement' => true,
'notnull' => true,
'length' => 11,
]);
$table->addColumn('server', Types::STRING, [
'notnull' => true,
'length' => 512,
]);
$table->addColumn('token', Types::STRING, [
'notnull' => true,
'length' => 64,
]);
$table->addColumn('type', Types::STRING, [
'notnull' => true,
'length' => 32,
]);
$table->addColumn('details', Types::TEXT, [
'notnull' => false,
]);
$table->setPrimaryKey(['id']);
$table->addIndex(['server', 'token'], 'twd_log_entry_origin');
return $schema;
}
return null;
}
/**
* @param IOutput $output
* @param Closure(): ISchemaWrapper $schemaClosure
* @param array $options
*/
public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void {
}
}