From fadd7c761a2d5f4e30da450468ae70fc0b4a776c Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 12 Jul 2024 09:57:57 +0200 Subject: [PATCH 1/2] fix(federation): Also fix room::remote_server and pcm::remote_server_url Signed-off-by: Joas Schilling --- appinfo/info.xml | 2 +- ...php => Version19000Date20240709183938.php} | 19 +++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) rename lib/Migration/{Version19000Date20240709183937.php => Version19000Date20240709183938.php} (58%) diff --git a/appinfo/info.xml b/appinfo/info.xml index 9928fa6aa25..a32bafc8dc8 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -14,7 +14,7 @@ * 🌉 **Sync with other chat solutions** With [Matterbridge](https://github.com/42wim/matterbridge/) being integrated in Talk, you can easily sync a lot of other chat solutions to Nextcloud Talk and vice-versa. ]]> - 19.0.5 + 19.0.6-dev.1 agpl Daniel Calviño Sánchez diff --git a/lib/Migration/Version19000Date20240709183937.php b/lib/Migration/Version19000Date20240709183938.php similarity index 58% rename from lib/Migration/Version19000Date20240709183937.php rename to lib/Migration/Version19000Date20240709183938.php index 4b133f6ea7d..f2c54adf7da 100644 --- a/lib/Migration/Version19000Date20240709183937.php +++ b/lib/Migration/Version19000Date20240709183938.php @@ -19,7 +19,7 @@ * Heal federation from before Nextcloud 29.0.4 which sends requests * without the protocol on the remote in case it is https:// */ -class Version19000Date20240709183937 extends SimpleMigrationStep { +class Version19000Date20240709183938 extends SimpleMigrationStep { public function __construct( protected IDBConnection $connection, ) { @@ -32,15 +32,22 @@ public function __construct( * @param array $options */ public function postSchemaChange(IOutput $output, Closure $schemaClosure, array $options): void { + $this->addMissingProtocol('talk_invitations', 'remote_server_url'); + $this->addMissingProtocol('talk_proxy_messages', 'remote_server_url'); + $this->addMissingProtocol('talk_rooms', 'remote_server'); + } + + protected function addMissingProtocol(string $table, string $column): void { $query = $this->connection->getQueryBuilder(); - $query->update('talk_invitations') - ->set('remote_server_url', $query->func()->concat($query->createNamedParameter('https://'), 'remote_server_url')) - ->where($query->expr()->notLike('remote_server_url', $query->createNamedParameter( + $query->update($table) + ->set($column, $query->func()->concat($query->createNamedParameter('https://'), $column)) + ->where($query->expr()->notLike($column, $query->createNamedParameter( $this->connection->escapeLikeParameter('http://'). '%' ))) - ->andWhere($query->expr()->notLike('remote_server_url', $query->createNamedParameter( + ->andWhere($query->expr()->notLike($column, $query->createNamedParameter( $this->connection->escapeLikeParameter('https://'). '%' - ))); + ))) + ->andWhere($query->expr()->nonEmptyString($column)); $query->executeStatement(); } } From 4826c0750ad23ab35a7e5853c9c4ea632c4b4b8d Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 12 Jul 2024 11:40:23 +0200 Subject: [PATCH 2/2] fix(CI): Adjust guests app branch Signed-off-by: Joas Schilling --- .github/workflows/integration-mysql.yml | 2 +- .github/workflows/integration-oci.yml | 2 +- .github/workflows/integration-pgsql.yml | 2 +- .github/workflows/integration-sqlite.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integration-mysql.yml b/.github/workflows/integration-mysql.yml index a39ab4a31d1..935638189c2 100644 --- a/.github/workflows/integration-mysql.yml +++ b/.github/workflows/integration-mysql.yml @@ -57,7 +57,7 @@ jobs: test-suite: ['callapi', 'chat-1', 'chat-2', 'command', 'conversation-1', 'conversation-2', 'conversation-3', 'conversation-4', 'conversation-5', 'federation', 'integration', 'sharing-1', 'sharing-2', 'sharing-3', 'sharing-4'] php-versions: ['8.2'] server-versions: ['stable29'] - guests-versions: ['master'] + guests-versions: ['stable29'] call-summary-bot-versions: ['main'] notifications-versions: ['stable29'] diff --git a/.github/workflows/integration-oci.yml b/.github/workflows/integration-oci.yml index 3b47584d019..0451590373e 100644 --- a/.github/workflows/integration-oci.yml +++ b/.github/workflows/integration-oci.yml @@ -57,7 +57,7 @@ jobs: test-suite: ['callapi', 'chat-1', 'chat-2', 'command', 'conversation-1', 'conversation-2', 'conversation-3', 'conversation-4', 'conversation-5', 'federation', 'integration', 'sharing-1', 'sharing-2', 'sharing-3', 'sharing-4'] php-versions: ['8.2'] server-versions: ['stable29'] - guests-versions: ['master'] + guests-versions: ['stable29'] call-summary-bot-versions: ['main'] notifications-versions: ['stable29'] diff --git a/.github/workflows/integration-pgsql.yml b/.github/workflows/integration-pgsql.yml index e6d3baa1740..6938db09117 100644 --- a/.github/workflows/integration-pgsql.yml +++ b/.github/workflows/integration-pgsql.yml @@ -54,7 +54,7 @@ jobs: test-suite: ['callapi', 'chat-1', 'chat-2', 'command', 'conversation-1', 'conversation-2', 'conversation-3', 'conversation-4', 'conversation-5', 'federation', 'integration', 'sharing-1', 'sharing-2', 'sharing-3', 'sharing-4'] php-versions: ['8.3'] server-versions: ['stable29'] - guests-versions: ['master'] + guests-versions: ['stable29'] call-summary-bot-versions: ['main'] notifications-versions: ['stable29'] diff --git a/.github/workflows/integration-sqlite.yml b/.github/workflows/integration-sqlite.yml index d50231d3e3b..b27ef1917b9 100644 --- a/.github/workflows/integration-sqlite.yml +++ b/.github/workflows/integration-sqlite.yml @@ -57,7 +57,7 @@ jobs: test-suite: ['callapi', 'chat-1', 'chat-2', 'command', 'conversation-1', 'conversation-2', 'conversation-3', 'conversation-4', 'conversation-5', 'federation', 'integration', 'sharing-1', 'sharing-2', 'sharing-3', 'sharing-4'] php-versions: ['8.2'] server-versions: ['stable29'] - guests-versions: ['master'] + guests-versions: ['stable29'] call-summary-bot-versions: ['main'] notifications-versions: ['stable29']