fix(conversations): whitelist event object type

Signed-off-by: Anna Larch <anna@nextcloud.com>
This commit is contained in:
Anna Larch 2025-02-27 12:34:15 +01:00
parent 7f79bd4c26
commit f9d5a73a2b
2 changed files with 5 additions and 0 deletions

View file

@ -705,6 +705,10 @@ class RoomController extends AEnvironmentAwareOCSController {
} elseif ($objectType === Room::OBJECT_TYPE_PHONE) {
// Ignoring any user input on this one
$objectId = $objectType;
} elseif ($objectType === Room::OBJECT_TYPE_EVENT) {
// Allow event rooms in future versions without breaking in older talk versions that the same calendar version supports
$objectType = '';
$objectId = '';
} elseif ($objectType !== '') {
return new DataResponse(['error' => 'object'], Http::STATUS_BAD_REQUEST);
}

View file

@ -44,6 +44,7 @@ class Room {
public const OBJECT_TYPE_PHONE = 'phone';
public const OBJECT_TYPE_VIDEO_VERIFICATION = 'share:password';
public const OBJECT_TYPE_SAMPLE = 'sample';
public const OBJECT_TYPE_EVENT = 'event';
public const RECORDING_NONE = 0;
public const RECORDING_VIDEO = 1;