diff options
author | Joas Schilling <coding@schilljs.com> | 2020-09-22 18:04:22 +0200 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2020-09-22 18:07:11 +0200 |
commit | 5817fdf1a7f165661d5a0dccbf637911417fe455 (patch) | |
tree | e48a91587dce3b0f09257853f70691fbabfb6efa /lib/MatterbridgeManager.php | |
parent | ac1ce3c885e7326c8607a931dc6d446fe0cfd618 (diff) |
Don't error when a room was deleted
Can't delete the bridge atm as we dont have a room object
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/MatterbridgeManager.php')
-rw-r--r-- | lib/MatterbridgeManager.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/MatterbridgeManager.php b/lib/MatterbridgeManager.php index 9fa515b98..5296fc762 100644 --- a/lib/MatterbridgeManager.php +++ b/lib/MatterbridgeManager.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace OCA\Talk; +use OCA\Talk\Exceptions\RoomNotFoundException; use OCP\IConfig; use OCP\IDBConnection; use OCP\DB\QueryBuilder\IQueryBuilder; @@ -202,7 +203,11 @@ class MatterbridgeManager { 'pid' => (int) $row['pid'], 'parts' => json_decode($row['json_values'], true), ]; - $room = $this->manager->getRoomById((int) $row['room_id']); + try { + $room = $this->manager->getRoomById((int) $row['room_id']); + } catch (RoomNotFoundException $e) { + continue; + } $this->checkBridge($room, $bridge); } $result->closeCursor(); |