Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .drone.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ local Pipeline(test_set, database, services) = {
environment: {
APP_NAME: "spreed",
CORE_BRANCH: "stable24",
GUESTS_BRANCH: "stable24",
GUESTS_BRANCH: "master",
NOTIFICATIONS_BRANCH: "stable24",
DATABASEHOST: database
},
Expand Down
54 changes: 27 additions & 27 deletions .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: sqlite
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-callapi
Expand Down Expand Up @@ -54,7 +54,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: sqlite
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-chat
Expand Down Expand Up @@ -87,7 +87,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: sqlite
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-command
Expand Down Expand Up @@ -121,7 +121,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: sqlite
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-conversation
Expand Down Expand Up @@ -155,7 +155,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: sqlite
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-conversation-2
Expand Down Expand Up @@ -188,7 +188,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: sqlite
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-federation
Expand Down Expand Up @@ -221,7 +221,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: sqlite
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-reaction
Expand Down Expand Up @@ -254,7 +254,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: sqlite
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-sharing
Expand Down Expand Up @@ -287,7 +287,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: sqlite
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-sharing-2
Expand Down Expand Up @@ -334,7 +334,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: mysql
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-callapi
Expand Down Expand Up @@ -382,7 +382,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: mysql
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-chat
Expand Down Expand Up @@ -430,7 +430,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: mysql
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-command
Expand Down Expand Up @@ -479,7 +479,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: mysql
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-conversation
Expand Down Expand Up @@ -528,7 +528,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: mysql
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-conversation-2
Expand Down Expand Up @@ -576,7 +576,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: mysql
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-federation
Expand Down Expand Up @@ -624,7 +624,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: mysql
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-reaction
Expand Down Expand Up @@ -672,7 +672,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: mysql
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-sharing
Expand Down Expand Up @@ -720,7 +720,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: mysql
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-sharing-2
Expand Down Expand Up @@ -763,7 +763,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: pgsql
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-callapi
Expand Down Expand Up @@ -805,7 +805,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: pgsql
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-chat
Expand Down Expand Up @@ -847,7 +847,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: pgsql
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-command
Expand Down Expand Up @@ -890,7 +890,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: pgsql
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-conversation
Expand Down Expand Up @@ -933,7 +933,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: pgsql
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-conversation-2
Expand Down Expand Up @@ -975,7 +975,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: pgsql
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-federation
Expand Down Expand Up @@ -1017,7 +1017,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: pgsql
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-reaction
Expand Down Expand Up @@ -1059,7 +1059,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: pgsql
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-sharing
Expand Down Expand Up @@ -1101,7 +1101,7 @@ steps:
APP_NAME: spreed
CORE_BRANCH: stable24
DATABASEHOST: pgsql
GUESTS_BRANCH: stable24
GUESTS_BRANCH: master
NOTIFICATIONS_BRANCH: stable24
image: ghcr.io/nextcloud/continuous-integration-php8.0:latest
name: integration-sharing-2
Expand Down
22 changes: 0 additions & 22 deletions lib/Share/RoomShareProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
namespace OCA\Talk\Share;

use OC\Files\Cache\Cache;
use OCA\Talk\Events\ParticipantEvent;
use OCA\Talk\Events\RemoveUserEvent;
use OCA\Talk\Events\RoomEvent;
use OCA\Talk\Exceptions\ParticipantNotFoundException;
use OCA\Talk\Exceptions\RoomNotFoundException;
Expand Down Expand Up @@ -106,26 +104,6 @@ public function __construct(
}

public static function register(IEventDispatcher $dispatcher): void {
$listener = static function (ParticipantEvent $event): void {
$room = $event->getRoom();

if ($event->getParticipant()->getAttendee()->getParticipantType() === Participant::USER_SELF_JOINED) {
/** @var self $roomShareProvider */
$roomShareProvider = \OC::$server->get(self::class);
$roomShareProvider->deleteInRoom($room->getToken(), $event->getParticipant()->getAttendee()->getActorId());
}
};
$dispatcher->addListener(Room::EVENT_AFTER_ROOM_DISCONNECT, $listener);

$listener = static function (RemoveUserEvent $event): void {
$room = $event->getRoom();

/** @var self $roomShareProvider */
$roomShareProvider = \OC::$server->get(self::class);
$roomShareProvider->deleteInRoom($room->getToken(), $event->getUser()->getUID());
};
$dispatcher->addListener(Room::EVENT_AFTER_USER_REMOVE, $listener);

$listener = static function (RoomEvent $event): void {
$room = $event->getRoom();

Expand Down
Loading